private void buttonSignIn_Click(object sender, RoutedEventArgs e) { if (sqlite.CheckUser(textBoxLogin.Text, passwordBoxPassword.Password)) { MainWindow mainWindow = new MainWindow(sqlite.GetUserId(textBoxLogin.Text, passwordBoxPassword.Password)); Close(); mainWindow.ShowDialog(); } }
public LoginWindow() { InitializeComponent(); sqlite.Connect(); //временно, чтобы не мучаться с авторизацией MainWindow mainWindow = new MainWindow(sqlite.GetUserId(textBoxLogin.Text, passwordBoxPassword.Password)); mainWindow.ShowDialog(); Close(); }