protected void OnErrorOccurred(ErrorOccurredEventArgs args) { if (ErrorOccurred != null) { ErrorOccurred(this, args); } }
private void Device_ErrorOccurred(object sender, ErrorOccurredEventArgs e) { //Insert error messages to the top of the list this.Invoke(new Action(() => { lst_log.Items.Insert(0, $"{DateTime.Now}==>{e.ErrorCode}: {e.Message}"); })); }
/// <summary> /// Invoked when an error occurs /// </summary> /// <param name="sender">object</param> /// <param name="e">ErrorOccurredEventArgs</param> private void _Stt_ErrorOccurred(object sender, ErrorOccurredEventArgs e) { Console.WriteLine(" **** _Stt_ErrorOccurred : (" + e.ErrorMessage + "), " + e.ErrorValue); if (taskCompletionSource != null) { taskCompletionSource.SetResult("Stt Error:" + e.ErrorValue); } }
private void AudioEngine_ErrorOccurred(object sender, ErrorOccurredEventArgs e) { Application.Current.Dispatcher.BeginInvoke( new Action( () => NotificationManager.ShowInformation(Application.Current.Resources["PlaybackError"].ToString(), e.ErrorMessage, MessageNotificationIcon.Error))); }
private void Instance_ErrorOccurred(object sender, ErrorOccurredEventArgs e) { //Log error logger.Log($"{DateTime.Now}==>{e.ErrorCode}:{e.Message}"); this.Invoke(new Action(() => { //Change log icon to alert user btn_error.Image = Properties.Resources.error; })); }
/// <summary>Sets the UI when an error has occurred.</summary> /// <param name="sender">The object that called the event.</param> /// <param name="e">The <c>SevenUpdate.ErrorOccurredEventArgs</c> instance containing the event data.</param> void ErrorOccurred(object sender, ErrorOccurredEventArgs e) { if (!this.Dispatcher.CheckAccess()) { this.Dispatcher.BeginInvoke(this.ErrorOccurred, e); } else { this.ErrorOccurred(e); } }
/// <summary> /// Обработчик события ошибок объекта физического подключения к сети /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void EventHandler_Connection_ErrorAccured( object sender, ErrorOccurredEventArgs args) { String msg; msg = String.Format( "Ошибка при работе соединения: {0}; Описание: {1}", args.Error, args.Description); OnNetworkErrorOccurred(new NetworkErrorEventArgs( ErrorCategory.DataLinkLayerError, msg, null)); return; }
private void Service_ErrorOccurred(object sender, ErrorOccurredEventArgs e) { isRetrying = false; OnPropertyChanged(nameof(IsErrorSet)); while (autoRetryWorker.IsBusy) { Thread.Sleep(50); // spin-wait } if (RetryCount >= maxRetryCount) { IsRetryPending = false; } else { IsRetryPending = true; autoRetryWorker.RunWorkerAsync(); } }
/// <summary>Sets the UI when an error occurs.</summary> /// <param name="e">The <c>SevenUpdate.ErrorOccurredEventArgs</c> instance containing the event data.</param> void ErrorOccurred(ErrorOccurredEventArgs e) { Core.Instance.UpdateAction = UpdateAction.ErrorOccurred; switch (e.ErrorType) { case ErrorType.FatalNetworkError: this.tbStatus.Text = Properties.Resources.CheckConnection; break; case ErrorType.InstallationError: case ErrorType.SearchError: case ErrorType.DownloadError: case ErrorType.GeneralError: case ErrorType.FatalError: this.tbStatus.Text = e.Exception; break; } }
/// <summary>Runs when there is an error occurs</summary> /// <param name="sender">The object that called the event.</param> /// <param name="e">The <c>ErrorOccurredEventArgs</c> instance containing the event data.</param> static void ErrorOccurred(object sender, ErrorOccurredEventArgs e) { if (e.ErrorType == ErrorType.FatalNetworkError) { ShutdownApp(); } if (!isClientConnected) { ShutdownApp(); return; } client.OnErrorOccurred(sender, e); if (e.ErrorType == ErrorType.FatalError || e.ErrorType == ErrorType.DownloadError) { IsInstalling = false; } }
/// <summary>Occurs when an error occurs.</summary> /// <param name="sender">The sender of the event.</param> /// <param name="e">The event data.</param> public void OnErrorOccurred(object sender, ErrorOccurredEventArgs e) { this.Channel.OnErrorOccurred(sender, e); }
private static void VncServer_ErrorOccurred(object sender, ErrorOccurredEventArgs e) { //ErrorBox.Show("VncServer_ErrorOccurred", e.Exception); }