private void btnlogin_Click(object sender, EventArgs e) { string dbcredstr = File.ReadAllText(Queries.user_setup_conf_file); UserCredential cred = JsonConvert.DeserializeObject <UserCredential>(dbcredstr); if (txtuser.Text == cred.username && txtpass.Text == cred.password) { MessageBox.Show("success"); Utils.hideAndShow(this, new Admin()); } else { MessageBox.Show("wrong credentials try again"); attempts++; } if (attempts == 3) { MessageBox.Show("you attempted 3 wrong logins, app is exiting"); btnexit.PerformClick(); } }
private void btnsettings_Click(object sender, EventArgs e) { Utils.hideAndShow(this, new FrequentPattern()); }
private void btnstatistical_Click(object sender, EventArgs e) { Utils.hideAndShow(this, new BackupClient()); }
private void btnreports_Click(object sender, EventArgs e) { Utils.hideAndShow(this, new Graph()); }
private void btndiagnosis_Click(object sender, EventArgs e) { Utils.hideAndShow(this, new PatientDiagnosis()); }
private void btnPersonal_Information_Click(object sender, EventArgs e) { Utils.hideAndShow(this, new PatientInformation()); }