private void LinkAuth_OnClick(object sender, RoutedEventArgs e) { if (_currUser != null) { WelcomeTb.Text = ""; (sender as Button).Content = "Войти"; // if (MessageBox.Show("\t\tСохранить изменения?", "\tСохранение", MessageBoxButton.YesNo)==MessageBoxResult.Yes) // GetBudget.Save_Data(); _currUser = null; MainFrame.Content = new MainPage(this); } else { AuthorizationWindow p = new AuthorizationWindow { Owner = this }; p.ShowDialog(); if (_currUser != null) { WelcomeTb.Text = _currUser.Name + " " + _currUser.Surname + ", Добро пожаловать"; (sender as Button).Content = "Выйти"; MainFrame.Content = new MainPage(this); } } }
public LoginPage(AuthorizationWindow window) { InitializeComponent(); _authorizationWindow = window; }
public RegistrationPage(AuthorizationWindow authorizationWindow) { InitializeComponent(); _authorizationWindow = authorizationWindow; }