Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace BugTraker
- {
- public partial class Login : Form
- {
- UserController userCtrl = UserController.Instance;
- public Login()
- {
- InitializeComponent();
- }
- private void btnSubmit_Click(object sender, EventArgs e)
- {
- var username = txtUsername.Text;
- var password = txtPassword.Text;
- if(userCtrl.Login(username, password))
- {
- lblLoginFailed.Visible = false;
- this.Hide();
- var listUsers = new ListUsers();
- listUsers.Closed += (s, args) => this.Close();
- listUsers.Show();
- }
- else
- {
- lblLoginFailed.Visible = true;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement