private void Form1_Load(object sender, EventArgs e) { //registry RegistryKey key = Registry.CurrentUser.CreateSubKey("SOFTWARE\\Rayedox_AMS"); //storing the values int continueapplication = 0; if (key.GetValue("connectionstring") != null) { continueapplication = 1; } if (continueapplication == 0) { frmManageConnection frm = new frmManageConnection(); frm.ShowDialog(); toolStripStatusLabel2.Text = key.GetValue("connectionstring").ToString(); toolStripStatusLabel4.Text = key.GetValue("authenticationmode").ToString(); RayedoxVariables.connectionstring = key.GetValue("stringss").ToString(); } else { toolStripStatusLabel2.Text = key.GetValue("connectionstring").ToString(); toolStripStatusLabel4.Text = key.GetValue("authenticationmode").ToString(); RayedoxVariables.connectionstring = key.GetValue("stringss").ToString(); } backgroundWorker1.RunWorkerAsync(); mainpage myForm = new mainpage(); myForm.TopLevel = false; myForm.AutoScroll = true; panel2.Controls.Add(myForm); myForm.Show(); myForm.BringToFront(); }
private void buttonlogin_Click(object sender, EventArgs e) { LoginBusiness loginBusiness = new LoginBusiness(); var kullanıcıadı = textBoxusername.Text; var sifre = textBoxpassword.Text; bool correct = loginBusiness.loginControl(kullanıcıadı, sifre); if (correct) { mainpage mainpage = new mainpage(); mainpage.Show(); } else { label3.Show(); textBoxpassword.Clear(); textBoxusername.Clear(); } }