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