示例#1
0
 public LoginPage(IWebDriver browser)
 {
     _driver               = browser;
     LoginSection          = new LoginSection(_driver);
     MainNavigationSection = new MainNavigationSection(_driver);
     ConnectWithSection    = new ConnectWithSection(_driver);
 }
示例#2
0
        private void buttonLogin_Click(object sender, EventArgs e)
        {
            string login = textLogin.Text;
            string pass  = textPass.Text;

            if (pass == "" || login == "")
            {
                MessageBox.Show("Pozostawiono puste pola");
            }
            else
            {
                Personel attempt = LoginSection.Login(login, pass);

                if (attempt != null)
                {
                    this.active = attempt;
                    this.Close();
                }
                else
                {
                    MessageBox.Show("Błędne dane logowania.");
                }
            }
        }