Mercurial > hg > AutoCRCheck
diff frmOptions.cs @ 0:8ac8eb805b6c default tip
Initial commit
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Fri, 07 Feb 2014 23:23:08 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/frmOptions.cs Fri Feb 07 23:23:08 2014 +0100 @@ -0,0 +1,37 @@ +using System; +using System.IO; +using System.Windows.Forms; + +namespace AutoCRCheck { + public partial class frmOptions : Form { + public frmOptions() { + InitializeComponent(); + } + + private void Form1_Load(object sender, EventArgs e) { + txtRootDirectory.Text = Environment.CurrentDirectory; + } + + private void radMismatch_CheckedChanged(object sender, EventArgs e) { + txtMismatchRenameSuffix.Enabled = radMismatchRename.Checked; + } + + private void btnStart_Click(object sender, EventArgs e) { + DialogResult = DialogResult.OK; + Close(); + } + + private void btnRootDirectoryBrowse_Click(object sender, EventArgs e) { + fbdDirectoryBrowser.Description = "Select root directory"; + if (Directory.Exists(txtRootDirectory.Text)) fbdDirectoryBrowser.SelectedPath = txtRootDirectory.Text; + fbdDirectoryBrowser.ShowNewFolderButton = false; + if (fbdDirectoryBrowser.ShowDialog() == DialogResult.OK) { + txtRootDirectory.Text = fbdDirectoryBrowser.SelectedPath; + } + } + + public String RootDirectory { get { return txtRootDirectory.Text; } } + public Boolean MismatchDelete { get { return radMismatchDelete.Checked; } } + public String MismatchRenameSuffix { get { return radMismatchRename.Checked ? txtMismatchRenameSuffix.Text : null; } } + } +}