-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFormSettings.cs
47 lines (41 loc) · 1.29 KB
/
FormSettings.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BotM
{
public partial class FormSettings : Form
{
public FormSettings()
{
InitializeComponent();
CenterToScreen();
Shown += FormSettings_Shown;
}
private void FormSettings_Shown(object sender, EventArgs e)
{
checkBoxCloseOnRun.Checked = MainForm.Settings.CloseOnRun;
textBoxCommand.Text = MainForm.Settings.LaunchCommand;
textBoxMlc.Text = MainForm.Settings.UpdatePath;
textBoxGamePath.Text = MainForm.Settings.GamePath;
}
private void ButtonCancel_Click(object sender, EventArgs e)
{
Close();
}
private void ButtonOK_Click(object sender, EventArgs e)
{
MainForm.Settings.CloseOnRun = checkBoxCloseOnRun.Checked;
MainForm.Settings.LaunchCommand = textBoxCommand.Text;
MainForm.Settings.UpdatePath = textBoxMlc.Text;
MainForm.Settings.GamePath = textBoxGamePath.Text;
MainForm.SaveSettings();
Close();
}
}
}