This repository was archived by the owner on Aug 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPathHome.cs
More file actions
47 lines (43 loc) · 1.29 KB
/
PathHome.cs
File metadata and controls
47 lines (43 loc) · 1.29 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
using System;
using System.Windows.Forms;
using WowsTools.Properties;
namespace WowsTools
{
public partial class PathHome : Form
{
public PathHome()
{
InitializeComponent();
}
/// <summary>
/// 选择目录
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button2_Click(object sender, EventArgs e)
{
FolderBrowserDialog dilog = new FolderBrowserDialog();
dilog.Description = "请选择游戏根目录";
DialogResult dialogResult = dilog.ShowDialog();
if (dialogResult == DialogResult.OK || dialogResult == DialogResult.Yes)
{
textBox1.Text = dilog.SelectedPath;
}
}
/// <summary>
/// 保存
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button1_Click(object sender, EventArgs e)
{
Settings.Default.GameHomePath = textBox1.Text + "\\";
Settings.Default.Save();
this.Close();
}
private void PathHome_Load(object sender, EventArgs e)
{
textBox1.Text = Settings.Default.GameHomePath;
}
}
}