Ejemplo n.º 1
0
 private void Login()
 {
     if (LoginTB.Text.Length >= 5)
     {
         string email    = LoginTB.Text;
         string password = PasswordTB.Password;
         //httpPost validation
         if (SessionHelper.SetActiveUserSession(new ApplicationUser {
             UserName = email, Password = password
         }))
         {
             ConnectToRoom connectToRoomForm = new ConnectToRoom();
             connectToRoomForm.Show();
             this.Close();
         }
         else
         {
             MessageBox.Show("Invalid login or password", "Sync Player");
         }
     }
     else
     {
         LoginTB.Focus();
     }
 }
Ejemplo n.º 2
0
        private void LoginButton_Click(object sender, RoutedEventArgs e)
        {
            int ret = SendAuthenticationGet(LoginTB.Text, PasswordTB.Password);

            if (ret == 1)
            {
                RQSApp win = new RQSApp(LoginTB.Text);
                Visibility = Visibility.Hidden;
                win.ShowDialog();
                Visibility = Visibility.Visible;
                LoginTB.Clear();
                PasswordTB.Clear();
                LoginTB.Focus();
            }
            else if (ret == 0)
            {
                MessageBox.Show("Vérifiez d'avoir les bons identifiants ou inscrivez-vous !", "Mot de passe incorrect", MessageBoxButton.OK, MessageBoxImage.Exclamation);
            }
            else
            {
                MessageBox.Show("Une problème est survenu !", "ERROR", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Ejemplo n.º 3
0
        public Login()
        {
            InitializeComponent();

            LoginTB.Focus();
        }