private void LogoutExecute()
        {
            LoginView logout = new LoginView();

            view.Close();
            logout.Show();
        }
Пример #2
0
 private void LogoutExecute()
 {
     try
     {
         LoginView loginView = new LoginView();
         loginView.Show();
         view.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Пример #3
0
 public void LogOutExecute()
 {
     try
     {
         MainWindow main = new MainWindow();
         main.Show();
         ownerView.Close();
         MessageBox.Show("You have successfully log out");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Пример #4
0
        public void LogOutExecute()
        {
            MessageBoxResult result = MessageBox.Show("Are you sure you want to log out?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question);

            if (result == MessageBoxResult.Yes)
            {
                ownerView.Close();
            }
        }
 /// <summary>
 /// Cancel execute
 /// </summary>
 private void CancelExecute()
 {
     try
     {
         ownerview.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Пример #6
0
        public void Logout()
        {
            try
            {
                MessageBoxResult result = MessageBox.Show("Are you sure you want to logout?", "Confirmation", MessageBoxButton.OKCancel);
                switch (result)
                {
                case MessageBoxResult.OK:
                    LoginView loginView = new LoginView();
                    Thread.Sleep(1000);
                    ownerView.Close();
                    loginView.Show();
                    return;

                case MessageBoxResult.Cancel:
                    break;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }