コード例 #1
0
 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();
         
     }
 }
コード例 #2
0
        public LoginWindow()
        {
            InitializeComponent();
            sqlite.Connect();

            //временно, чтобы не мучаться с авторизацией
            MainWindow mainWindow = new MainWindow(sqlite.GetUserId(textBoxLogin.Text, passwordBoxPassword.Password));
            mainWindow.ShowDialog();
            Close();
        }