Esempio n. 1
0
 public override void Close()
 {
     if (Data_thread_running)
     {
         Data_thread.Abort();  // stop USB thread
     }
     if (hdev != IntPtr.Zero)  // check we have an active USB port
     {
         stop_USB();
     }
 }
Esempio n. 2
0
 public override void Stop()
 {
     if (Data_thread_running)
     {
         Data_thread.Abort();  // stop USB thread
         Data_thread_running = false;
     }
     MainForm.timer1.Enabled = false;
     stop_USB();                                        // kill the USB port
     MainForm.SyncLED.BackColor = SystemColors.Control; // no sync so set LED to background
 }
        public override void Close()
        {
            if (Data_thread_running)
            {
                Data_thread.Abort();  // stop data thread

                Metis_start_stop(MainForm.Metis_IP_address, 0x00);
                socket.Close();
                socket = null;

                Data_thread_running = false;
            }
        }
        public override void Stop()
        {
            if (Data_thread_running)
            {
                Data_thread.Abort();  // stop data thread

                // stop data from Metis
                Metis_start_stop(MainForm.Metis_IP_address, 0x00); // stop data from Metis
                socket.Close();
                socket = null;

                Data_thread_running = false;
            }

            if (MainForm.timer1.Enabled)
            {
                MainForm.timer1.Stop();                        // stop timer1
            }
            MainForm.SyncLED.BackColor = SystemColors.Control; // no sync so set LED to background
        }