Пример #1
0
 private void SimulateButton_Click(object sender, EventArgs e)
 {
     if (SimulateButton.Text == "开始模拟")
     {
         SimulateTimer.Interval = TimerInterval;
         SimulateTimer.Start();
         SimulateButton.Text = "结束模拟";
     }
     else
     {
         SimulateTimer.Stop();
         SimulateButton.Text = "开始模拟";
     }
 }
Пример #2
0
 private void CarTest_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         RecvThread.Abort();
         if (canOpen)
         {
             CanZLG.VCI_CloseDevice(m_devtype, 0);
         }
         timer1.Stop();
         SimulateTimer.Stop();
         sw_Record.Close();
     }
     catch (Exception)
     {
     }
 }