Beispiel #1
0
        // Small Icon on the Left Top corner to go back to the AfterLogin form
        private void MainPageButton_Click(object sender, EventArgs e)   // -- Dinis & Jorge
        {
            AfterLogin afterlogin = new AfterLogin();

            afterlogin.Show();
            afterlogin.Location = this.Location;
            this.Hide();
        }
Beispiel #2
0
        /* Username & Password check; Clear to remove bugs and MessageBox to
         * let the user know something wrong happened. - Dinis & Jorge */

        private void loginButton_Click(object sender, EventArgs e)
        {
            if (usernameBox.Text == "admin" && passwordBox.Text == "admin")
            {
                AfterLogin afterLogin = new AfterLogin();
                afterLogin.Show();
                afterLogin.Location = this.Location;
                this.Hide();
            }
            else
            {
                usernameBox.Clear();
                passwordBox.Clear();
                MessageBox.Show("The Username or Password is incorrect, Please try again.");
            }
        }