private void View_SignOut(object sender, EventArgs e) { bool shouldSignOut = MainView.ConfirmSigningOut(); if (shouldSignOut) { ControllerClosed.Invoke(this, new ControllerClosedEventArgs(ControllerClosedEventArgs.CloseReason.Abort)); } }
private void View_Closing(object sender, CancelEventArgs e) { ControllerClosedEventArgs.CloseReason closeReason; switch (DbEditView.ConfirmChanges()) { case true: closeReason = ControllerClosedEventArgs.CloseReason.Success; model.Save(); break; case false: closeReason = ControllerClosedEventArgs.CloseReason.Abort; break; case null: e.Cancel = true; return; } ControllerClosed.Invoke(this, new ControllerClosedEventArgs(closeReason)); }
private void MainView_Closing(object sender, CancelEventArgs e) { ControllerClosed.Invoke(this, new ControllerClosedEventArgs(ControllerClosedEventArgs.CloseReason.Success)); }
private void AuthorizationView_Closing(object sender, EventArgs e) { ControllerClosed.Invoke(this, new ControllerClosedEventArgs(ControllerClosedEventArgs.CloseReason.Abort)); }
public void View_SuccessfulLogin(object sender, LoginEventArgs e) { ControllerClosed.Invoke(this, new ControllerClosedEventArgs(ControllerClosedEventArgs.CloseReason.Success, model.AuthorizedUser)); }