Esempio n. 1
0
        private void View_SignOut(object sender, EventArgs e)
        {
            bool shouldSignOut = MainView.ConfirmSigningOut();

            if (shouldSignOut)
            {
                ControllerClosed.Invoke(this, new ControllerClosedEventArgs(ControllerClosedEventArgs.CloseReason.Abort));
            }
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
 private void MainView_Closing(object sender, CancelEventArgs e)
 {
     ControllerClosed.Invoke(this, new ControllerClosedEventArgs(ControllerClosedEventArgs.CloseReason.Success));
 }
Esempio n. 4
0
 private void AuthorizationView_Closing(object sender, EventArgs e)
 {
     ControllerClosed.Invoke(this, new ControllerClosedEventArgs(ControllerClosedEventArgs.CloseReason.Abort));
 }
Esempio n. 5
0
 public void View_SuccessfulLogin(object sender, LoginEventArgs e)
 {
     ControllerClosed.Invoke(this, new ControllerClosedEventArgs(ControllerClosedEventArgs.CloseReason.Success, model.AuthorizedUser));
 }