Ejemplo n.º 1
0
 public void Stop()
 {
     if (CurrentDevice != null)
     {
         CurrentDevice.SignalToStop();
         CurrentDevice.WaitForStop();
         CurrentDevice.NewFrame -= new NewFrameEventHandler(CameraNewFrameEventHandler);
         IsStarted = false;
     }
 }
Ejemplo n.º 2
0
        private void OnIsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            var isVisible = (bool)e.NewValue;

            if (isVisible)
            {
                CurrentDevice?.Start();
            }
            else
            {
                CurrentDevice?.SignalToStop();
            }
        }