2 using System.Collections.Generic;
 
    3 using System.ComponentModel;
 
    7 using System.Windows.Forms;
 
    9 namespace Sample_Environment_Control_Interface.Dialogs.Config
 
   15             InitializeComponent();
 
   21             openFileDialog1.InitialDirectory = Seci.SeciInterface.SeciStatus.CompDir;
 
   22             openFileDialog1.Filter = 
"SECI Component|*.comp";
 
   24             if (openFileDialog1.ShowDialog() == DialogResult.OK)
 
   26                 txtFile.Text = openFileDialog1.FileName;
 
   32             if (!String.IsNullOrEmpty(txtFile.Text))
 
   34                 SECI_GUI.Pause_Timers();
 
   38                     Seci.SeciInterface.Components_Add(openFileDialog1.FileName);          
 
   42                     Seci.SeciInterface.Error_LogError(
"AddComponent", err);
 
   43                     MessageBox.Show(
"Failed to add component!", 
"Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
 
   47                 SECI_GUI.Resume_Timers();
 
   48                 DialogResult = DialogResult.OK;
 
   53                 MessageBox.Show(
"Please select a component to add.", 
"Component Not Selected!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
 
void btnBrowse_Click(object sender, EventArgs e)
void btnAdd_Click(object sender, EventArgs e)