Exemple #1
0
        private void btnLogin_Click(object sender, RoutedEventArgs e)
        {
            User user = new User(tbEmail.Text.Trim(), tbPassword.Password.Trim(), Helpers.ConverCheckedToInt(cbRememberPass));

            if (UserDatabase.CheckAccount(user.Email, user.Password))
            {
                UserDatabase.Update(user, user.Email);
                MainControl m = new MainControl(user, AccessToken);
                Window.GetWindow(this).Hide();
                m.Show();
            }
            else
            {
                Helpers.MakeErrorMessage(Window.GetWindow(this), "Error join app", "Error");
            }
        }