private void ToRegisterPanel_button_Click(object sender, EventArgs e) { Username_textbox.Clear(); Pasword_textbox.Clear(); LogIn_panel.Hide(); Register_panel.Show(); }
public MainWindow() { InitializeComponent(); status.Text = ""; Username_textbox.Focus(); database = new DatabaseConnection(); database.connect(); }
private void Login_Button_Click(object sender, RoutedEventArgs e) { if (database.verifyUser(Username_textbox.Text.Trim(), Password_textbox.Password.ToString().Trim())) { homePage = new HomePage(); homePage.StartPage(Username_textbox.Text, database); this.Close(); } else { Username_textbox.Clear(); Password_textbox.Clear(); status.Text = "Wrong username or password."; } }
//implement methods public override void InputFormFields() { if (Data.FirstName != null) { FirstName_textbox.Wait(5).Clear(); FirstName_textbox.SendKeys(Data.FirstName); } if (Data.LastName != null) { LastName_textbox.Wait(5).Clear(); LastName_textbox.SendKeys(Data.LastName); } if (Data.Username != null) { Username_textbox.Wait(5).Clear(); Username_textbox.SendKeys(Data.Username); } if (Data.Institution != null) { Institution_dropdown.Wait(5).SelectByText(Data.Institution); DriverCommands.WaitAndMeasurePageLoadTime(); InitElements(); } if (Data.IncludeChildInistutitons != null) { if (Data.IncludeChildInistutitons.Equals("1")) { CheckBoxClick(IncludeChildInstitutions_chkbox, true); } } if (Data.Role != null) { Role_dropdown.Wait(5).SelectByText(Data.Role); DriverCommands.WaitAndMeasurePageLoadTime(); InitElements(); } }