private void btnOk_Click(object sender, EventArgs e)
 {
     if (!ValidatePassword())
     {
         txtUserName.Clear();
         txtPassword.Clear();
         return;
     }
     else
     {
         this.DialogResult = DialogResult.OK;
         this.Hide();
         formControlpanel f = new formControlpanel();
         f.setParameters(txtUserName.Text);
         f.Show();
     }
 }
Beispiel #2
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            if (!ValidatePassword())
            {
                txtUserName.Clear();
                txtPassword.Clear();
                return;
            }
            else
            {
                this.DialogResult = DialogResult.OK;
                this.Hide();
                Properties.Settings.Default["user_name"] = txtUserName.Text;
                Properties.Settings.Default["user_pass"] = txtPassword.Text;
                Properties.Settings.Default.Save(); // Saves settings in application configuration file

                formControlpanel f = new formControlpanel();
                f.setParameters(txtUserName.Text);
                f.Show();
            }
        }