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(); }
private void Accept_Click(object sender, RoutedEventArgs e) { if (passwordBox.Password == "1") { MenuWindow window = new MenuWindow(); window.Show(); AutorizationWindow.Close(); } else { MessageBox.Show("Неверный пароль"); } }
public Autorization(AutorizationWindow window) { InitializeComponent(); DataContext = new AutorizationViewModel(window); }
private void Deny_Click(object sender, RoutedEventArgs e) { // CreateDB db = new CreateDB(); // db.Create(); AutorizationWindow.Close(); }