public void OnCameraDisconnected(object sender, DisconnectCameraEventArgs eventHandler)
 {
     if (CameraDisconnected != null)
     {
         CameraDisconnected(sender, eventHandler);
     }
 }
Esempio n. 2
0
 void cameraDevice_CameraDisconnected(object sender, DisconnectCameraEventArgs e)
 {
     if (e.StillImageDevice != null)
     {
         DisconnectCamera(e.StillImageDevice);
     }
     OnCameraDisconnected((ICameraDevice)sender);
 }
Esempio n. 3
0
        /// <summary>
        /// Handles the CameraDisconnected event of the CameraDevice control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="DisconnectCameraEventArgs"/> instance containing the event data.</param>
        void CameraDevice_CameraDisconnected(object sender, DisconnectCameraEventArgs e)
        {
            Dispatcher.Invoke(_liveViewTimer.Stop);

            if (Disconnected != null)
            {
                Disconnected(this, e);
            }
        }
Esempio n. 4
0
        void CameraDevice_CameraDisconnected(object sender, DisconnectCameraEventArgs eventArgs)
        {
            MethodInvoker method = delegate
            {
                _liveViewTimer.Stop();
                Thread.Sleep(100);
                Close();
            };

            if (InvokeRequired)
            {
                BeginInvoke(method);
            }
            else
            {
                method.Invoke();
            }
        }
Esempio n. 5
0
        /// <summary>
        /// Handles the CameraDisconnected event of the CameraDevice control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="DisconnectCameraEventArgs"/> instance containing the event data.</param>
        void CameraDevice_CameraDisconnected(object sender, DisconnectCameraEventArgs e)
        {
            MethodInvoker method = _liveViewTimer.Stop;

            if (InvokeRequired)
            {
                BeginInvoke(method);
            }
            else
            {
                method.Invoke();
            }

            if (Disconnected != null)
            {
                Disconnected(this, e);
            }
        }
Esempio n. 6
0
 private void selectedPortableDevice_CameraDisconnected(object sender, DisconnectCameraEventArgs eventArgs)
 {
     ServiceProvider.WindowsManager.ExecuteCommand(WindowsCmdConsts.LiveViewWnd_Hide, SelectedPortableDevice);
 }