DestroyMotor() приватный Метод

private DestroyMotor ( IntPtr motor ) : bool
motor System.IntPtr
Результат bool
Пример #1
0
 void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (errquit == false)
     {
         if (campaused == true)
         {
             captureThread.Resume();
         }
         if (accpaused == false)
         {
             accelerometerTimer.Stop();
         }
         CLNUIDevice.SetMotorLED(motor, 0);
         if (motor != IntPtr.Zero)
         {
             CLNUIDevice.DestroyMotor(motor);
         }
         running = false;
         captureThread.Join();
         if (camera != IntPtr.Zero)
         {
             CLNUIDevice.StopCamera(camera);
             CLNUIDevice.DestroyCamera(camera);
         }
     }
 }
Пример #2
0
 void OnClosing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     accelerometerTimer.Stop();
     CLNUIDevice.SetMotorLED(motor, 0);
     if (motor != IntPtr.Zero)
     {
         CLNUIDevice.DestroyMotor(motor);
     }
     if (captureThread != null)
     {
         running = false;
         captureThread.Join(100);
     }
     if (camera != IntPtr.Zero)
     {
         CLNUIDevice.DestroyCamera(camera);
     }
 }