private void loginButton_Click(object sender, EventArgs e)
        {
            if (userNameBox.Text == Form1.username && passwordBox.Text == Form1.password)
            {
                Form f = this.FindForm();
                f.Controls.Remove(this);

                welcomePage wp = new welcomePage();
                f.Controls.Add(wp);
            }

            else
            {
                userNameBox.Clear();
                passwordBox.Clear();

                failedLabel.Visible = true;
            }
        }
Exemple #2
0
        private void loginButton_Click(object sender, EventArgs e)
        {
            if (userNameBox.Text == Form1.username && passwordBox.Text == Form1.password)
            {
                Form f = this.FindForm();
                f.Controls.Remove(this);

                welcomePage wp = new welcomePage();
                f.Controls.Add(wp);
            }

            else
            {
                userNameBox.Clear();
                passwordBox.Clear();

                failedLabel.Visible = true;
            }
        }