private void HideStuff() { btnLaunch.Show(); AccountBox.Hide(); PasswordBox.Hide(); btnConnect.Hide(); LabelPassword.Hide(); LabelAccount.Text = "Logged in as " + account; }
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(); }); }
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); } }
void ServerManager_OnNewPasswordGenerated(object sender, PasswordGeneratedEventArgs e) { LabelPassword.Set(() => LabelPassword.Text, e.NewPassword); }