Esempio n. 1
0
        public App()
        {
            var autorizationWindow = new AutorizationWindow();

            autorizationWindow.DataContext = new AutorizationViewModel(autorizationWindow);

            autorizationWindow.Show();
        }
        public RegistrationViewModel(AutorizationWindow window)
        {
            NewUser = new User()
            {
                Role = "Пользователь"
            };

            this.window = window;
        }
        private void Cancel()
        {
            var autorizationWindow    = new AutorizationWindow();
            var autorizationViewModel = new AutorizationViewModel(autorizationWindow);

            autorizationWindow.DataContext = autorizationViewModel;

            autorizationWindow.Show();

            registrationWindow.Close();
        }
Esempio n. 4
0
 private void Accept_Click(object sender, RoutedEventArgs e)
 {
     if (passwordBox.Password == "1")
     {
         MenuWindow window = new MenuWindow();
         window.Show();
         AutorizationWindow.Close();
     }
     else
     {
         MessageBox.Show("Неверный пароль");
     }
 }
Esempio n. 5
0
 public Autorization(AutorizationWindow window)
 {
     InitializeComponent();
     DataContext = new AutorizationViewModel(window);
 }
Esempio n. 6
0
 private void Deny_Click(object sender, RoutedEventArgs e)
 {
     // CreateDB db = new CreateDB();
     // db.Create();
     AutorizationWindow.Close();
 }