void videoSource_Error(object sender, AForge.Video.VideoSourceErrorEventArgs eventArgs) { #if DEBUG MessageBox.Show( eventArgs.Description, eventArgs.GetType().ToString(), MessageBoxButton.OK, MessageBoxImage.Error ); #endif }
// On video source error private void video_VideoSourceError( object sender, VideoSourceErrorEventArgs e ) { // reset motion detector if ( motionDetecotor != null ) { motionDetecotor.Reset( ); } // save video source error's description lastVideoSourceError = e.Description; // notify clients about the error if ( VideoSourceError != null ) { VideoSourceError( this, new EventArgs( ) ); } }
private void videoSource_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs) { if (VideoSourceError != null) { if (SynchronizingObject != null && SynchronizingObject.InvokeRequired) { SynchronizingObject.BeginInvoke( VideoSourceError, new object[] { this, eventArgs }); } else { VideoSourceError(this, eventArgs); } } }
// Error occured in video source private void videoSource_VideoSourceError( object sender, VideoSourceErrorEventArgs eventArgs ) { lastMessage = eventArgs.Description; Invalidate( ); }
private void VideoError(object sender, VideoSourceErrorEventArgs eventargs) { _eventAggregator.PublishOnBackgroundThread("VideoDeviceError"); }
private void VideoSource_VideoSourceError(object sender, AForge.Video.VideoSourceErrorEventArgs eventArgs) { }
void videoSource_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs) { log.Warn("videoSource_VideoSourceError: Event occurred"); }
private void VideoStream_VideoSourceError(object sender, AForge.Video.VideoSourceErrorEventArgs eventArgs) { Debug.WriteLine(eventArgs.Description); }
private void screenStream_VideoSourceError(object sender, VideoSourceErrorEventArgs e) { if (!IsRecording) return; if (videoPlayer.InvokeRequired) { videoPlayer.BeginInvoke((Action)((() => screenStream_VideoSourceError(sender, e)))); return; } IVideoSource source = sender as IVideoSource; source.SignalToStop(); string msg = String.Format( // TODO: Move the message box code to the view CultureInfo.CurrentUICulture, Resources.Error_Video_Source, source.Source); MessageBox.Show(msg, source.Source, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, videoPlayer.RightToLeft == RightToLeft.Yes ? MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); }
private void VideoSource_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs) { connectionAttempts++; fpsLabel.Text = "Connection attempt " + connectionAttempts.ToString() + " failed. Trying again."; // failedConnection.RunWorkerAsync(); }
private void FinalVideoSource_ErrorEvent(object sender, VideoSourceErrorEventArgs eventArgs) { // Try to capture some errors and print them... MessageBox.Show("Error: " + eventArgs.Description); }
private void source_VideoSourceError(object sender, VideoSourceErrorEventArgs e) { if (this.EditMode) { return; } OnCameraViewLog(new CameraViewLogEventArgs(ZForge.Controls.Logs.LogLevel.LOG_ERROR, e.Description, this)); }
private void HandleSourceError(object sender, VideoSourceErrorEventArgs e) { HandleFinishedPlaying(sender, ReasonToFinishPlaying.VideoSourceError); }
private void SourceVideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs) { VideoSourceErrorMessage = eventArgs.Description; if (!VideoSourceErrorState) { VideoSourceErrorState = true; MainForm.LogExceptionToFile(new Exception("VideoSourceError: " + eventArgs.Description), "Camera " + Camobject.id); //Monitor.Enter(this); _camera.LastFrameNull = true; //Monitor.Exit(this); } if (!ShuttingDown) Invalidate(); }
private void screenStream_VideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs) { throw new VideoException(eventArgs.Description); }
private void SourceVideoSourceError(object sender, VideoSourceErrorEventArgs eventArgs) { VideoSourceErrorMessage = eventArgs.Description; if (!VideoSourceErrorState) { VideoSourceErrorState = true; Log.Error("Camera " + Camobject.id, new Exception("VideoSourceError: " + eventArgs.Description)); _reconnectTime = DateTime.Now; if (_errorTime == DateTime.MinValue) _errorTime = DateTime.Now; _camera.LastFrameNull = true; if (VolumeControl != null && VolumeControl.AudioSource != null) { VolumeControl.AudioSource.Stop(); VolumeControl.AudioSourceErrorState = true; } } if (!ShuttingDown) Invalidate(); }
public void InvokeVideoSourceError(VideoSourceErrorEventArgs eventargs) { VideoSourceErrorEventHandler handler = VideoSourceError; if (handler != null) handler(this, eventargs); }