Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            // set username to windows name
            Globals.userName = Environment.UserName;

            // open job list viewer
            this.Hide();
            Form jobList = new JobListViewer();

            jobList.FormClosed += (s, args) => this.Close();
            jobList.Show();
        }
Exemple #2
0
 private void logInButton_Click(object sender, EventArgs e)
 {
     if (VerifyLogin())
     {
         // open job list viewer
         this.Hide();
         Form jobList = new JobListViewer();
         jobList.FormClosed += (s, args) => this.Close();
         jobList.Show();
     }
     else
     {
         MessageBox.Show("Username or Password is incorrect");
     }
 }
Exemple #3
0
        private void passwordTextBox_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                if (VerifyLogin())
                {
                    // set user name in globals
                    Globals.userName = userNameTextBox.Text.Trim();

                    // open job list viewer
                    this.Hide();
                    Form jobList = new JobListViewer();
                    jobList.FormClosed += (s, args) => this.Close();
                    jobList.Show();
                }
                else
                {
                    MessageBox.Show("Username or Password is incorrect");
                }
            }
        }
Exemple #4
0
        private void jobListVieweButton_Click(object sender, EventArgs e)
        {
            Form jobListViewer = new JobListViewer();

            jobListViewer.Show();
        }