示例#1
0
        private void SAVE_btn_Click(object sender, EventArgs e)
        {
            bool success = true;

            if (Com_setting_box.Items.Count > 0)
            {
                Program_Configuration.UpdateSystem_Config("DefaultComport", Com_setting_box.Text);
            }
            else
            {
                MessageBox.Show("Select COM port first");
                success = false;
            }
            if (Baudrate_box.Items.Count > 0)
            {
                Program_Configuration.UpdateSystem_Config("DefaultCOMBaudrate", Baudrate_box.Text);
            }
            else
            {
                MessageBox.Show("Select Baudrate first");
                success = false;
            }
            if (success)
            {
                MessageBox.Show("Com Setting is updated Successfully!");
            }
            this.Close();
        }
示例#2
0
        private void Add_cam_Click(object sender, EventArgs e)
        {
            system_config = Program_Configuration.GetSystem_Config();
            if (system_config.add_cam == "false")
            {
                Program_Configuration.UpdateSystem_Config("add_cam", "true");

                Camera7.Visible   = true;
                Cambox7.Visible   = true;
                Cam7.Visible      = true;
                comboBox7.Visible = true;
                Add_cam.Text      = "Disable Explore Camera";
                Cambox7.Items.Clear();
                foreach (FilterInfo filterInfo in filterInfoCollection)
                {
                    Cambox7.Items.Add(filterInfo.Name);
                }
                videoCaptureDevice7 = new VideoCaptureDevice(filterInfoCollection[system_config.Camera7].MonikerString);
            }
            if (system_config.add_cam == "true")
            {
                Program_Configuration.UpdateSystem_Config("add_cam", "false");
                Cambox7.Items.Clear();
                comboBox7.Items.Clear();
                Camera7.Visible   = false;
                Cambox7.Visible   = false;
                Cam7.Visible      = false;
                comboBox7.Visible = false;
                Add_cam.Text      = "Add Camera";
            }
        }
示例#3
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (comboBox1.SelectedIndex > 0 || comboBox2.SelectedIndex > 0 || System_Config.SQL_server != "" || System_Config.Database != "")
     {
         System_Config = Program_Configuration.GetSystem_Config();
         Program_Configuration.UpdateSystem_Config("SQL_server", comboBox1.Text);
         Program_Configuration.UpdateSystem_Config("Database", comboBox2.Text);
     }
 }
示例#4
0
 private void Cambox7_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (load6)
     {
         while (load6)
         {
             comboBox7.Items.Clear();
             system_config.Camera7 = Cambox7.SelectedIndex;
             Program_Configuration.UpdateSystem_Config("Camera7", Cambox7.SelectedIndex.ToString());
             system_config       = Program_Configuration.GetSystem_Config();
             videoCaptureDevice7 = new VideoCaptureDevice(filterInfoCollection[system_config.Camera7].MonikerString);
             if (videoCaptureDevice7.VideoCapabilities.Length > 0)
             {
                 foreach (VideoCapabilities videoCapabilities in videoCaptureDevice7.VideoCapabilities)
                 {
                     comboBox7.Items.Add(videoCapabilities.FrameSize.Width.ToString() + "x" + videoCapabilities.FrameSize.Height.ToString());
                 }
             }
             Program_Configuration.UpdateSystem_Config("pixel_cam7", comboBox7.SelectedIndex.ToString());
             load6 = false;
             break;
         }
     }
 }
示例#5
0
 private void Saving_btn_Click(object sender, EventArgs e)
 {
     Program_Configuration.UpdateSystem_Config("Map_Path_File", TextBox_PathFile.Text);
     this.Close();
 }
示例#6
0
        private void Saving_btn_Click(object sender, EventArgs e)
        {
            bool Save_success = true;

            if (Cambox1.Items.Count > 0)
            {
                Program_Configuration.UpdateSystem_Config("Camera1", Cambox1.SelectedIndex.ToString());
                Program_Configuration.UpdateSystem_Config("pixel_cam1", comboBox1.SelectedIndex.ToString());
            }
            else
            {
                MessageBox.Show("Camera1 is not available");
                Save_success = false;
            }
            if (Cambox2.Items.Count > 0)
            {
                Program_Configuration.UpdateSystem_Config("Camera2", Cambox2.SelectedIndex.ToString());
                Program_Configuration.UpdateSystem_Config("pixel_cam2", comboBox2.SelectedIndex.ToString());
            }
            else
            {
                MessageBox.Show("Camera2 is not available");
                Save_success = false;
            }
            if (Cambox3.Items.Count > 0)
            {
                Program_Configuration.UpdateSystem_Config("Camera3", Cambox3.SelectedIndex.ToString());
                Program_Configuration.UpdateSystem_Config("pixel_cam3", comboBox3.SelectedIndex.ToString());
            }
            else
            {
                MessageBox.Show("Camera3 is not available");
                Save_success = false;
            }
            if (Cambox4.Items.Count > 0)
            {
                Program_Configuration.UpdateSystem_Config("Camera4", Cambox4.SelectedIndex.ToString());
                Program_Configuration.UpdateSystem_Config("pixel_cam4", comboBox4.SelectedIndex.ToString());
            }
            else
            {
                MessageBox.Show("Camera4 is not available");
                Save_success = false;
            }
            if (Cambox5.Items.Count > 0)
            {
                Program_Configuration.UpdateSystem_Config("Camera5", Cambox5.SelectedIndex.ToString());
                Program_Configuration.UpdateSystem_Config("pixel_cam5", comboBox5.SelectedIndex.ToString());
            }
            else
            {
                MessageBox.Show("Camera5 is not available");
                Save_success = false;
            }
            if (Cambox6.Items.Count > 0)
            {
                Program_Configuration.UpdateSystem_Config("Camera6", Cambox6.SelectedIndex.ToString());
                Program_Configuration.UpdateSystem_Config("pixel_cam6", comboBox6.SelectedIndex.ToString());
            }
            else
            {
                MessageBox.Show("Camera6 is not available");
                Save_success = false;
            }
            if (Cambox7.Items.Count > 0 && system_config.add_cam == "true")
            {
                Program_Configuration.UpdateSystem_Config("Camera7", Cambox6.SelectedIndex.ToString());
                Program_Configuration.UpdateSystem_Config("pixel_cam7", comboBox6.SelectedIndex.ToString());
            }
            else if (Cambox7.Items.Count < 0 && system_config.add_cam == "true")
            {
                MessageBox.Show("Camera7 is not available");
                Save_success = false;
            }
            system_config = Program_Configuration.GetSystem_Config();
            if (Save_success)
            {
                MessageBox.Show("Camera setting are updated successfully");
            }
            this.Close();
        }