Esempio n. 1
0
 private void ToRegisterPanel_button_Click(object sender, EventArgs e)
 {
     Username_textbox.Clear();
     Pasword_textbox.Clear();
     LogIn_panel.Hide();
     Register_panel.Show();
 }
Esempio n. 2
0
 public MainWindow()
 {
     InitializeComponent();
     status.Text = "";
     Username_textbox.Focus();
     database = new DatabaseConnection();
     database.connect();
 }
Esempio n. 3
0
 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.";
     }
 }
Esempio n. 4
0
 //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();
     }
 }