forked from BenDizer/SMM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForm2.cs
More file actions
60 lines (52 loc) · 1.71 KB
/
Form2.cs
File metadata and controls
60 lines (52 loc) · 1.71 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
using System;
using System.Drawing;
using System.Windows.Forms;
namespace stellaris_mod_manager
{
public partial class Form2 : Form
{
string File, File_Doc;
public Form2()
{
InitializeComponent();
textBox1.Text = Properties.Settings.Default.Folder;
textBox2.Text = Properties.Settings.Default.Key;
}
private void Button1_Click(object sender, EventArgs e)
{
if (textBox1.Text != "")
{
Properties.Settings.Default.Folder = File;
Properties.Settings.Default.Folder_Doc = File_Doc;
Properties.Settings.Default.Key = textBox2.Text;
Properties.Settings.Default.Save();
this.Close();
}
else
{
label1.ForeColor = Color.Red;
}
}
private void Button2_Click(object sender, EventArgs e)
{
this.Close();
}
private void Button3_Click(object sender, EventArgs e)
{
Properties.Settings.Default.Reset();
Properties.Settings.Default.Save();
textBox1.Text = Properties.Settings.Default.Folder;
textBox2.Text = Properties.Settings.Default.Key;
}
private void Label1_Click(object sender, EventArgs e)
{
}
private void Button4_Click(object sender, EventArgs e)
{
folderBrowserDialog1.ShowDialog();
File_Doc = folderBrowserDialog1.SelectedPath + @"\Stellaris";
File = folderBrowserDialog1.SelectedPath + @"\Stellaris\mod";
textBox1.Text = folderBrowserDialog1.SelectedPath;
}
}
}