Esempio n. 1
0
        private void ShowRegistration()
        {
            Dispatcher.Invoke(() =>
            {
                ButtonLogIn.Content = "Back";
                LabelPassword.SetValue(Grid.RowProperty, 1);        // 7=>1
                PasswordBox.SetValue(Grid.RowProperty, 2);          // 1=>2
                PasswordBoxRetype.SetValue(Grid.RowProperty, 3);    // 6=>3
                ButtonLogIn.SetValue(Grid.RowProperty, 7);          // 2=>7
                ButtonRegister.SetValue(Grid.RowProperty, 7);       // 2=>7

                //Application.Current.MainWindow.Height = 275;

                LabelEmail.Visibility        = Visibility.Visible;
                PasswordBoxRetype.Visibility = Visibility.Visible;
                ButtonRegister.Visibility    = Visibility.Visible;

                PasswordBoxRetype.Focus();
            });
        }
Esempio n. 2
0
 private void ButtonLogIn_Click(object sender, RoutedEventArgs e)
 {
     if (showRegistrationFields == true)
     {
         showRegistrationFields = false;
         ButtonLogIn.Content    = "Login";
         LabelPassword.SetValue(Grid.RowProperty, 7);        // 7=>1
         PasswordBox.SetValue(Grid.RowProperty, 1);          // 1=>2
         PasswordBoxRetype.SetValue(Grid.RowProperty, 6);    // 6=>3
         ButtonLogIn.SetValue(Grid.RowProperty, 2);          // 2=>7
         ButtonRegister.SetValue(Grid.RowProperty, 2);       // 2=>7
     }
     else
     {
         loadingLabelOn = true;
         Task.Run(() =>
         {
             LoadingLabelAnimated();
         });
         userName = TextBoxUserName.Text;
         password = PasswordBox.Password;
         HttpRequest(userName, password);
     }
 }