|
- 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)
- {
-
- }
- }
- }
|