/// <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()); } }
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()); } }
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()); } }
public void OnCloseAdmin(object sender, EventArgs e) { _adminview.Close(); ButtonPressedEvent.GetInstance().Handler -= OnCloseAdmin; }
public void OnCloseCancel(object sender, EventArgs e) { _mwv.Close(); ButtonPressedEvent.GetInstance().OnButtonPressedHandler(EventArgs.Empty); }
private void LogoutExecute() { MainWindow logout = new MainWindow(); view.Close(); logout.Show(); }