SECI  1
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
AddExe.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections;
3 using System.Collections.Generic;
4 using System.ComponentModel;
5 using System.Data;
6 using System.Drawing;
7 using System.Text;
8 using System.Windows.Forms;
9 
10 namespace Sample_Environment_Control_Interface.Dialogs.Exe
11 {
12  public partial class AddExe : Form
13  {
14 
15  public AddExe()
16  {
17  InitializeComponent();
18 
19  }
20 
21  private void btnBrowse_Click(object sender, EventArgs e)
22  {
23  if (browseDialog.ShowDialog() == DialogResult.OK)
24  {
25  txtExe.Text = browseDialog.FileName;
26  }
27  }
28 
29  private void btnAdd_Click(object sender, EventArgs e)
30  {
31  if (!String.IsNullOrEmpty(txtExe.Text))
32  {
33  btnAdd.Enabled = false;
34 
35  if (Seci.SeciInterface.Exe_AddExecutable(txtExe.Text) == false)
36  {
37  MessageBox.Show("The name needs to be unique; an executable with this name already exists!", "Not Unique!", MessageBoxButtons.OK, MessageBoxIcon.Error);
38  btnAdd.Enabled = true;
39  }
40  else
41  {
42  DialogResult = DialogResult.OK;
43  Close();
44  }
45  }
46  else
47  {
48  MessageBox.Show("Please enter a name and the path of the executable", "Missing Values!", MessageBoxButtons.OK, MessageBoxIcon.Error);
49  }
50  }
51 
52 
53  }
54 }
void btnAdd_Click(object sender, EventArgs e)
Definition: AddExe.cs:29
void btnBrowse_Click(object sender, EventArgs e)
Definition: AddExe.cs:21