コード例 #1
0
        private void openingFormButton_Click(object sender, EventArgs e)
        {
            OpeningForm openingForm = new OpeningForm();

            openingForm.FormClosed += delegate(object source, FormClosedEventArgs args)
            {
                this.Visible = true;
            };
            openingForm.Show();
        }
コード例 #2
0
 private void btnSignIn_Click(object sender, EventArgs e)
 {
     if (cmbPosition.Text == "Manager")
     {
         if (txtUserName == null || txtPassword == null)
         {
             MessageBox.Show("Please Fill the Field");
         }
         else
         {
             string userName = txtUserName.Text;
             string password = txtPassword.Text;
             if (userName == "admin" && password == "admin")
             {
                 OpeningForm op = new OpeningForm();
                 op.Show();
             }
             else
             {
                 MessageBox.Show("Please try to valid authentication");
             }
         }
     }
 }