示例#1
0
        private void LoginButton_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(usernameT.Text))
            {
                MessageBox.Show("Please enter username");
                return;
            }

            if (string.IsNullOrEmpty(passwordT.Text))
            {
                MessageBox.Show("Please enter password");
                return;
            }

            if ((usernameT.Text == "monitor") && (passwordT.Text == "123456"))
            {
                this.Hide();
                ManagerMainScreen mainScreen = new ManagerMainScreen();
                mainScreen.ShowDialog();
                this.Close();
            }
            else
            {
                MessageBox.Show("Invalid username or password");
                usernameT.Text = "";
                passwordT.Text = "";
            }
            //ManagerMainScreen mainScreen = new ManagerMainScreen();
            //mainScreen.Show();
            //this.Close();
        }
示例#2
0
        private void backBtn_Click(object sender, EventArgs e)
        {
            this.Hide();
            ManagerMainScreen mainScreen = new ManagerMainScreen();

            mainScreen.ShowDialog();
            this.Close();
        }
示例#3
0
        private void button3_Click(object sender, EventArgs e)
        {
            ManagerMainScreen mngScreen = new ManagerMainScreen();

            this.Hide();
            mngScreen.ShowDialog();
            this.Close();
        }