Пример #1
0
 private void button_Connect_Click(object sender, EventArgs e)
 {
     if (textBox_Login.Text == "admin" && textBox_Password.Text == "admin")
     {
         AdminConnection ofrm = new AdminConnection();
         ofrm.ShowDialog();
     }
     else if (textBox_Login.Text == "user" && textBox_Password.Text == "user")
     {
         UserConnection ofrm = new UserConnection();
         ofrm.ShowDialog();
     }
     textBox_Login.Clear();
     textBox_Password.Clear();
 }
Пример #2
0
        private void button_TestAdmin_Click(object sender, EventArgs e)
        {
            AdminConnection ofrm = new AdminConnection();

            ofrm.ShowDialog();
        }