using System; using System.Windows.Forms; namespace TBMM { public partial class SettingsForm : Form { private MainForm mainForm; public SettingsForm() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { mainForm = (MainForm) Owner; gamelocation.Text = mainForm.Configuration.GamePath; keepPatched.Checked = mainForm.Configuration.KeepPatched; } 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; mainForm.Configuration.KeepPatched = keepPatched.Checked; mainForm.Configuration.Save(); Close(); } private void cancelbtn_Click(object sender, EventArgs e) { Close(); } } }