Exemple #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.U2751AWellAtxtAddr);
                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;
            }
        }
Exemple #2
0
        // OK
        private void ButtonOK_Click(object sender, EventArgs e)
        {
            HardwareConfig.Port.MPQPort              = ComboBoxMPQPort.Text;
            HardwareConfig.Port.MPQDelay             = Convert.ToInt32(ComboBoxMPQDelay.Text);
            HardwareConfig.Option.U2651AtxtAddr      = TextBoxU2651AAddr.Text;
            HardwareConfig.Option.U2722AtxtAddr      = TextBoxU2722AAddr.Text;
            HardwareConfig.Option.U2751AWellAtxtAddr = TextBoxU2751AWellAAddr.Text;
            HardwareConfig.Option.U2751AWellBtxtAddr = TextBoxU2751AWellBAddr.Text;
            HardwareConfig.Write();

            Close();
        }
Exemple #3
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.U2751AWellAtxtAddr = TextBoxU2751AWellAAddr.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();
 }