0
|
1 ???using System; |
|
2 using System.IO; |
|
3 using System.Windows.Forms; |
|
4 |
|
5 namespace AutoCRCheck { |
|
6 public partial class frmOptions : Form { |
|
7 public frmOptions() { |
|
8 InitializeComponent(); |
|
9 } |
|
10 |
|
11 private void Form1_Load(object sender, EventArgs e) { |
|
12 txtRootDirectory.Text = Environment.CurrentDirectory; |
|
13 } |
|
14 |
|
15 private void radMismatch_CheckedChanged(object sender, EventArgs e) { |
|
16 txtMismatchRenameSuffix.Enabled = radMismatchRename.Checked; |
|
17 } |
|
18 |
|
19 private void btnStart_Click(object sender, EventArgs e) { |
|
20 DialogResult = DialogResult.OK; |
|
21 Close(); |
|
22 } |
|
23 |
|
24 private void btnRootDirectoryBrowse_Click(object sender, EventArgs e) { |
|
25 fbdDirectoryBrowser.Description = "Select root directory"; |
|
26 if (Directory.Exists(txtRootDirectory.Text)) fbdDirectoryBrowser.SelectedPath = txtRootDirectory.Text; |
|
27 fbdDirectoryBrowser.ShowNewFolderButton = false; |
|
28 if (fbdDirectoryBrowser.ShowDialog() == DialogResult.OK) { |
|
29 txtRootDirectory.Text = fbdDirectoryBrowser.SelectedPath; |
|
30 } |
|
31 } |
|
32 |
|
33 public String RootDirectory { get { return txtRootDirectory.Text; } } |
|
34 public Boolean MismatchDelete { get { return radMismatchDelete.Checked; } } |
|
35 public String MismatchRenameSuffix { get { return radMismatchRename.Checked ? txtMismatchRenameSuffix.Text : null; } } |
|
36 } |
|
37 } |