/// <summary> /// <see cref="Karamem0.Kanpuchi.Infrastructures.Service.AsyncError"/> イベントで追加の処理を実行します。 /// </summary> /// <param name="sender">イベントを発生させた <see cref="System.Object"/>。</param> /// <param name="e"> /// イベントのデータを格納する <see cref="Karamem0.Kanpuchi.Infrastructures.AsyncErrorEventArgs"/>。 /// </param> private void OnAsyncError(object sender, AsyncErrorEventArgs e) { BusyStateManager.Current.End(); this.NotificationRequest.Raise(new Notification() { Title = StringResource.LoadErrorTitle, Content = StringResource.LoadErrorMessage, }); }
private void ClientAsyncError(AsyncErrorEventArgs e) { var modelException = e.Error as ModelException; if (modelException != null) { switch (modelException.Code) { case ErrorCode.ApiNotSupported: ClientModel.Reset(); SelectedRoom.AddSystemMessage(Localizer.Instance.Localize(APINotSupportedKey, modelException.Message)); return; } } }
private void ClientAsyncError(object sender, AsyncErrorEventArgs e) { Dispatcher.BeginInvoke(new Action <AsyncErrorEventArgs>(args => { ModelException modelException = args.Error as ModelException; if (modelException != null) { switch (modelException.Code) { case ErrorCode.APINotSupported: ClientModel.Reset(); SelectedRoom.AddSystemMessage(Localizer.Instance.Localize(APINotSupportedKey, modelException.Message)); return; } } }), e); }
private void OnUpdateStatusError(AsyncErrorEventArgs e) { _commandIsRunning = false; CurrentStatus = GitStatusMonitorState.Stopped; }
private void OnRequestQueueError(object sender, AsyncErrorEventArgs e) { _logger.Write(e.Error); }
private void OnUpdateStatusError(AsyncErrorEventArgs e) { _commandIsRunning = false; CurrentStatus = WorkingStatus.Stopped; }
private void _revisionGraphCommand_Error(object sender, AsyncErrorEventArgs e) { // This has to happen on the UI thread this.InvokeSync(o => { Error.Visible = true; //Error.BringToFront(); NoGit.Visible = false; NoCommits.Visible = false; Revisions.Visible = false; Loading.Visible = false; }, this); DisposeRevisionGraphCommand(); this.InvokeAsync(() => { throw e.Exception; } ); e.Handled = true; }
/// <summary> /// <see cref="Karamem0.Kanpuchi.Infrastructures.Service.AsyncError"/> イベントで追加の処理を実行します。 /// </summary> /// <param name="sender">イベントを発生させた <see cref="System.Object"/>。</param> /// <param name="e"> /// イベントのデータを格納する <see cref="Karamem0.Kanpuchi.Infrastructures.AsyncErrorEventArgs"/>。 /// </param> private void OnAsyncError(object sender, AsyncErrorEventArgs e) { BusyStateManager.Current.End(); this.RaiseInitializeCompleted(); }
void _revisionGraphCommand_Error(object sender, AsyncErrorEventArgs e) { this.RevisionGrid.RevisionsGraph.Dispose(); this.RevisionGrid.Dispose(); var obj = sender as AsyncLoader; obj.Cancel(); }