2 using System.Collections;
3 using System.Collections.Generic;
4 using System.ComponentModel;
8 using System.Windows.Forms;
10 namespace SeciUserInterface.Dialogs.AssocFiles
17 InitializeComponent();
23 browseDialog.InitialDirectory = Seci.Definitions.Status.LabViewDir;
24 if (browseDialog.ShowDialog() == DialogResult.OK)
26 txtExe.Text = browseDialog.FileName;
32 if (!String.IsNullOrEmpty(txtExe.Text))
34 btnAdd.Enabled =
false;
36 if (Seci.Managers.AssocFileMgr.IsDuplicate(txtExe.Text))
38 MessageBox.Show(
"The name needs to be unique; a file with this name already exists!",
"Not Unique!", MessageBoxButtons.OK, MessageBoxIcon.Error);
39 btnAdd.Enabled =
true;
43 Seci.Managers.AssocFileMgr.AddFile(txtExe.Text);
44 DialogResult = DialogResult.OK;
50 MessageBox.Show(
"Please enter a name and the path of the file",
"Missing Values!", MessageBoxButtons.OK, MessageBoxIcon.Error);
void btnBrowse_Click(object sender, EventArgs e)
void btnAdd_Click(object sender, EventArgs e)