Example #1
0
        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);
                }
            }
        }
Example #2
0
 public LoginPage(AuthorizationWindow window)
 {
     InitializeComponent();
     _authorizationWindow = window;
 }
Example #3
0
 public RegistrationPage(AuthorizationWindow authorizationWindow)
 {
     InitializeComponent();
     _authorizationWindow = authorizationWindow;
 }