예제 #1
0
 private void OpenVideoSource(IVideoSource source)
 {
     this.Cursor = Cursors.Wait;
     CloseVideoSource();
     CameraZm.VideoSource = new AsyncVideoSource(source);
     CameraZm.Start();
     this.Cursor = Cursors.Arrow;
 }
예제 #2
0
 private void CloseVideoSource()
 {
     this.Cursor = Cursors.Wait;
     try
     {
         CameraZm.SignalToStop();
         for (int i = 0; (i < 50) && (CameraZm.IsRunning); i++)
         {
             Thread.Sleep(100);
         }
         if (CameraZm.IsRunning)
         {
             CameraZm.Stop();
         }
     }
     catch {}
     this.Cursor = Cursors.Arrow;
 }