示例#1
0
        private void HideStuff()
        {
            btnLaunch.Show();

            AccountBox.Hide();
            PasswordBox.Hide();
            btnConnect.Hide();
            LabelPassword.Hide();
            LabelAccount.Text = "Logged in as " + account;
        }
示例#2
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();
            });
        }
示例#3
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);
     }
 }
示例#4
0
文件: FormMain.cs 项目: A4Zen/DXGI
 void ServerManager_OnNewPasswordGenerated(object sender, PasswordGeneratedEventArgs e)
 {
     LabelPassword.Set(() => LabelPassword.Text, e.NewPassword);
 }