|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- using GCMM.Properties;
- using Newtonsoft.Json.Linq;
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Drawing;
- using System.IO;
- using System.IO.Compression;
- using System.Linq;
- using System.Net;
- using System.Reflection;
- using System.Text.RegularExpressions;
- using System.Threading.Tasks;
- using System.Windows.Forms;
-
- namespace GCMM
- {
- public partial class MainForm : Form
- {
- public MainForm()
- {
- InitializeComponent();
- }
-
- private Dictionary<string, ModInfo> mods = new Dictionary<string, ModInfo>();
-
- private void Form1_Load(object sender, EventArgs e)
- {
- modlist.Items.Clear();
- UpdateButton(installbtn, false);
- modinfobox.Text = "";
- if (string.IsNullOrWhiteSpace(Settings.Default.GamePath))
- {
- Settings.Default.GamePath = GetGameFolder();
- if (string.IsNullOrWhiteSpace(Settings.Default.GamePath))
- Settings.Default.GamePath = SelectGameFolder();
- else
- MessageBox.Show("Found game at " + Settings.Default.GamePath);
- Settings.Default.Save();
- }
- if(string.IsNullOrWhiteSpace(Settings.Default.GamePath))
- {
- status.Text = "Status: Game not found";
- return;
- }
- CheckIfPatched();
- GetInstalledMods();
- GetAvailableMods();
- }
-
- private void playbtn_Click(object sender, EventArgs e)
- {
- if (playbtn.ForeColor == Color.Green) return; //Disabled
- PatchGame();
- }
-
- private void settingsbtn_Click(object sender, EventArgs e)
- {
- if (settingsbtn.ForeColor == Color.Green) return; //Disabled
- var sf = new SettingsForm();
- sf.ShowDialog(this);
- }
-
- private void modlist_SelectedIndexChanged(object sender, EventArgs e)
- {
-
- }
- }
- }
|