Example #1
0
File: LogIn.cs Project: lewkoo/HCI
 public LogIn(Class.UserList Users)
 {
     // TODO: Complete member initialization
     this.Users = Users;
     InitializeComponent();
     userName.Enabled = false;
     password.Enabled = false;
     reqOne.Enabled = false;
     reqTwo.Enabled = false;
 }
Example #2
0
        private void logButton_Click(object sender, EventArgs e)
        {
            if (currentUser != null)
            {
                //log out action
                currentUser = null;
                logButton.Text = "Log in";
                userBox.Text = "No user logged in";

            }
            else
            {

                logIn = new LogIn(Users);
                //logIn.Show();
                var dialogResult = logIn.ShowDialog();
                logButton.Text = "Log out";
                if (dialogResult != System.Windows.Forms.DialogResult.Cancel)
                {
                    currentUser = logIn.SelectedUser;
                    userBox.Text = logIn.SelectedUser.getUserName();

                    if (logIn.UserRegistered == true) //if we have a new user/users registered
                        Users = logIn.GetModifiedUserList;
                }
            }
        }
Example #3
0
 private void GetUsers()
 {
     Users = (UserList)DeserializeXML("userlist", typeof(UserList), usersSource);
 }