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.

SettingsForm.cs 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using GCMM.Properties;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Data;
  6. using System.Drawing;
  7. using System.IO;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Text.RegularExpressions;
  11. using System.Threading.Tasks;
  12. using System.Windows.Forms;
  13. namespace GCMM
  14. {
  15. public partial class SettingsForm : Form
  16. {
  17. private MainForm mainForm;
  18. public SettingsForm()
  19. {
  20. InitializeComponent();
  21. }
  22. private void Form1_Load(object sender, EventArgs e)
  23. {
  24. gamelocation.Text = Settings.Default.GamePath;
  25. useProxy.Checked = Settings.Default.UseProxy;
  26. mainForm = Owner as MainForm;
  27. }
  28. private void browsebtn_Click(object sender, EventArgs e)
  29. {
  30. gamelocation.Text = mainForm.SelectGameFolder() ?? gamelocation.Text;
  31. }
  32. private void savebtn_Click(object sender, EventArgs e)
  33. {
  34. Settings.Default.GamePath = gamelocation.Text;
  35. Settings.Default.UseProxy = useProxy.Checked;
  36. Settings.Default.Save();
  37. Close();
  38. }
  39. private void cancelbtn_Click(object sender, EventArgs e)
  40. {
  41. Close();
  42. }
  43. }
  44. }