|
123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using System;
- using System.Windows.Forms;
-
- namespace GCMM
- {
- public partial class SettingsForm : Form
- {
- private MainForm mainForm;
- private bool autopatchingEnabled;
- public SettingsForm()
- {
- InitializeComponent();
- }
-
- private void Form1_Load(object sender, EventArgs e)
- {
- mainForm = (MainForm) Owner;
- gamelocation.Text = mainForm.Configuration.GamePath;
- autopatchingEnabled = mainForm.Configuration.AutoPatch == AutoPatchingState.Enabled;
- autopatching.Checked = autopatchingEnabled;
- }
-
- private void browsebtn_Click(object sender, EventArgs e)
- {
- gamelocation.Text = mainForm.SelectGameFolder() ?? gamelocation.Text;
- }
-
- private void savebtn_Click(object sender, EventArgs e)
- {
- mainForm.Configuration.GamePath = gamelocation.Text;
- if (autopatching.Checked != autopatchingEnabled)
- mainForm.EnableDisableAutoPatchingWithDialog(autopatching.Checked);
- mainForm.Configuration.Save();
- Close();
- }
-
- private void cancelbtn_Click(object sender, EventArgs e)
- {
- Close();
- }
- }
- }
|