示例#1
0
        public LoginForm(Manager manager)
        {
            this.manager = manager;
            InitializeComponent();
            manager.GetUsers(userSet);
            if (userSet.Users.Count == 0)
            {
                NewUserForm newUserForm = new NewUserForm(manager);
                newUserForm.ShowDialog();
                if (newUserForm.DialogResult == DialogResult.OK)
                {
                    userCombo.SelectionStart = 1;
                    manager.GetUsers(userSet);
                    UpdateNameLabel();
                }
            }
            else
            {
                userCombo.SelectionStart = 1;
                UpdateNameLabel();
            }
#if DEBUG
            passwordTextBox.Text = "27005";
#else
#endif
        }
示例#2
0
        private void addButton_Click(object sender, EventArgs e)
        {
            NewUserForm newUserForm = new NewUserForm(manager);

            newUserForm.ShowDialog();
        }