Ejemplo n.º 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();
        }
Ejemplo n.º 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");
     }
 }
Ejemplo n.º 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");
                }
            }
        }
Ejemplo n.º 4
0
        private void jobListVieweButton_Click(object sender, EventArgs e)
        {
            Form jobListViewer = new JobListViewer();

            jobListViewer.Show();
        }