/// <summary>
 /// Method for opening new view for adding new manager
 /// </summary>
 private void AddManagerExecute()
 {
     try
     {
         AdminView newView = new AdminView();
         newView.ShowDialog();
         adminMenu.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
示例#2
0
        protected override void ExitExecute()
        {
            MainWindow loginWindow = new MainWindow();

            adminView.Close();
            loginWindow.Show();
        }
 private void CancelExecute()
 {
     try
     {
         MessageBoxResult result = MessageBox.Show("Are you sure you want to log out?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question);
         if (result == MessageBoxResult.Yes)
         {
             LoginScreen login = new LoginScreen();
             adminView.Close();
             login.Show();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
 public void LogOutExecute()
 {
     try
     {
         adminView.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
示例#5
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);
                    adminView.Close();
                    loginView.Show();
                    return;

                case MessageBoxResult.Cancel:
                    break;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
示例#6
0
 public void OnCloseAdmin(object sender, EventArgs e)
 {
     _adminview.Close();
     ButtonPressedEvent.GetInstance().Handler -= OnCloseAdmin;
 }
示例#7
0
 public void OnCloseCancel(object sender, EventArgs e)
 {
     _mwv.Close();
     ButtonPressedEvent.GetInstance().OnButtonPressedHandler(EventArgs.Empty);
 }
示例#8
0
 private void LogoutExecute()
 {
     MainWindow logout = new MainWindow();
     view.Close();
     logout.Show();
 }