private void SignupManagerExecute() { try { MessageBoxResult result = MessageBox.Show("Are you sure that you want to signup as Manager?", "My App", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No); switch (result) { case MessageBoxResult.Yes: PasswordFromFile addManager = new PasswordFromFile(); signup.Close(); addManager.ShowDialog(); break; } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void CloseSignupWindow(object sender, EventArgs e) { Signup.Close(); ButtonPressedEvent.GetEvent().Handler -= CloseSignupWindow; }