Exemplo n.º 1
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            String user = username.Text;
            String pass = password.Text;

            BusinessPlayer business = new BusinessPlayer();

            business.SetUserPass(user, pass);

            try
            {
                business.Connection();
                UserName = user;
                Password = pass;
                Main main = new Main();
                this.Hide();
                main.ShowDialog();
                if (main.DialogResult == DialogResult.OK)
                {
                    this.Show();
                }
                else
                {
                    this.Close();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Tài khoản, mật khẩu không đúng hoặc máy chủ không phản hổi!", "Kết nối lỗi");
                Console.WriteLine("Loi cmnr: " + ex.ToString());
            }
        }
Exemplo n.º 2
0
 public void ConnectionTest([PexAssumeUnderTest] BusinessPlayer target)
 {
     target.Connection();
     // TODO: add assertions to method BusinessPlayerTest.ConnectionTest(BusinessPlayer)
 }