Techblox Mod Manager / Launcher
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.0KB

  1. using System;
  2. using System.Windows.Forms;
  3. namespace TBMM
  4. {
  5. public partial class SettingsForm : Form
  6. {
  7. private MainForm mainForm;
  8. public SettingsForm()
  9. {
  10. InitializeComponent();
  11. }
  12. private void Form1_Load(object sender, EventArgs e)
  13. {
  14. mainForm = (MainForm) Owner;
  15. gamelocation.Text = mainForm.Configuration.GamePath;
  16. keepPatched.Checked = mainForm.Configuration.KeepPatched;
  17. }
  18. private void browsebtn_Click(object sender, EventArgs e)
  19. {
  20. gamelocation.Text = mainForm.SelectGameFolder() ?? gamelocation.Text;
  21. }
  22. private void savebtn_Click(object sender, EventArgs e)
  23. {
  24. mainForm.Configuration.GamePath = gamelocation.Text;
  25. mainForm.Configuration.KeepPatched = keepPatched.Checked;
  26. mainForm.Configuration.Save();
  27. Close();
  28. }
  29. private void cancelbtn_Click(object sender, EventArgs e)
  30. {
  31. Close();
  32. }
  33. }
  34. }