Exemplo n.º 1
0
        private void CalibForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            classCalibrationInfo.DoCalibration = false;
            if (classCalibrationInfo.CalibrationTaskHandlerThread != null)
            {
                classCalibrationInfo.CalibrationTaskHandlerThread.Abort();
                classCalibrationInfo.CalibrationTaskHandlerThread = null;
            }

            classCalibrationInfo.DetectFlag = false;
            if (classCalibrationInfo.DetectDevicesTaskHandlerThread != null)
            {
                classCalibrationInfo.DetectDevicesTaskHandlerThread.Abort();
                classCalibrationInfo.DetectDevicesTaskHandlerThread = null;
            }
            classCalibrationInfo.EndDetectEvent = true;


            ClassDeltaProtocol.CloseComPort();
            classDpCommunication.CloseComPort();
            classMultiplexing.CloseComPort();
            tempControllerInstanse.CloseComPort();


            //if (ConfigFormInstanse != null)
            //{
            //    ConfigFormInstanse.Close();
            //    ConfigFormInstanse = null;
            //}
            //Application.Exit();
        }
Exemplo n.º 2
0
        private void CalibForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            classCalibrationInfo.DoCalibration = false;
            classCalibrationInfo.DetectFlag    = false;

            //ClassDeltaProtocol.CloseComPort();
            classDpCommunication.CloseComPort();
            classMultiplexing.CloseComPort();
            //tempControllerInstanse.CloseComPort();
        }