private void btnLogin_Click(object sender, EventArgs e) { lblLoginError.Text = ""; if (userLogin(txtUsername.Text, txtPassword.Text)) { this.Hide(); AppointmentMain appointmentMain = new AppointmentMain(); Logging.Login(txtUsername.Text); appointmentMain.Show(); } else { lblLoginError.Text = Properties.translations.res_login_error_message; txtUsername.Text = ""; txtPassword.Text = ""; } }