SECI  1
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
AddConfig.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.Data;
5 using System.Drawing;
6 using System.Text;
7 using System.Windows.Forms;
8 
9 namespace Sample_Environment_Control_Interface.Dialogs.Config
10 {
11  public partial class AddConfig : Form
12  {
13  public AddConfig()
14  {
15  InitializeComponent();
16  }
17 
18  private void btnBrowse_Click(object sender, EventArgs e)
19  {
20  openFileDialog1.InitialDirectory = Seci.SeciInterface.SeciStatus.ConfigDir;
21 
22  if (openFileDialog1.ShowDialog() == DialogResult.OK)
23  {
24  txtFile.Text = openFileDialog1.FileName;
25  }
26  }
27 
28  private void btnAdd_Click(object sender, EventArgs e)
29  {
30  if (!String.IsNullOrEmpty(txtFile.Text))
31  {
32  Seci.SeciInterface.Configuration_Merge(txtFile.Text);
33 
34  DialogResult = DialogResult.OK;
35 
36  Close();
37  }
38  else
39  {
40  MessageBox.Show("Please select a configuration to add.", "Configuration Not Selected!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
41  }
42  }
43  }
44 }