private void LogoutExecute() { LoginView logout = new LoginView(); view.Close(); logout.Show(); }
public void Logout() { try { MessageBoxResult result = MessageBox.Show("Are you sure you want to logout?", "Confirmation", MessageBoxButton.OKCancel); switch (result) { case MessageBoxResult.OK: Login loginView = new Login(); Thread.Sleep(1000); wView.Close(); loginView.Show(); return; case MessageBoxResult.Cancel: break; } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }