Beispiel #1
0
        //****************************************//
        //          Hardware Initialize           //
        //****************************************//

        /// <summary>
        /// Hardware initialize, init Agilent device and open comm for MPQ
        /// </summary>
        private void HardwareInitialize()
        {
            try
            {
                //Read Hardware Settings
                HardwareConfig.Read();

                //Agilent
                agilentDevice.InitializeU2651A(HardwareConfig.Option.U2651AtxtAddr);
                agilentDevice.InitializeU2722A(HardwareConfig.Option.U2722AtxtAddr);
                agilentDevice.InitializeU2751A_WELLA(HardwareConfig.Option.U2751AtxtAddr);
                //agilentDevice.InitializeU2751A_WELLB(HardwareConfig.Option.U2751AWellBtxtAddr);

                //MPQ
                mpqDevice.PortInit(HardwareConfig.Port.MPQPort);

                toolStripStatusLabelHardware.BackColor = Color.Green;
                testHardwareReady = true;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error:", MessageBoxButtons.OK, MessageBoxIcon.Error);
                toolStripStatusLabelHardware.BackColor = Color.Red;
                testHardwareReady = false;
                Log.error(ex.Message);
            }
        }
Beispiel #2
0
 // OK
 private void ButtonOK_Click(object sender, EventArgs e)
 {
     try
     {
         HardwareConfig.Port.MPQPort = ComboBoxMPQPort.Text;
         //        HardwareConfig.Port.ScannerPort = ComboBoxScannerPort.Text;
         HardwareConfig.Option.U2651AtxtAddr = TextBoxU2651AAddr.Text;
         HardwareConfig.Option.U2722AtxtAddr = TextBoxU2722AAddr.Text;
         HardwareConfig.Option.U2751AtxtAddr = TextBoxU2751AAddr.Text;
         //         HardwareConfig.Option.U2751AWellBtxtAddr = TextBoxU2751AWellBAddr.Text;
         HardwareConfig.Write();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Failed to write Hardware Settings.ini, " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return;
     }
     Close();
 }