예제 #1
0
        private void cmdAdd_Click(object sender, EventArgs e)
        {
            AddUser fAddUser = new AddUser();             //Initialized AddUser form

            if (fAddUser.ShowDialog() == DialogResult.OK) // show AddUser form and if success
            {
                //get newly add user form AddUser form and add to list
                users.Add(fAddUser.GetNewUser());
                UserToListViewItem(lstUsers, fAddUser.GetNewUser());
            }
        }
예제 #2
0
        //Admin Key Authenticator...
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "*****@*****.**") //Admin Pass...
            {
                AddUser user = new AddUser();
                //user.MdiParent = this;
                this.Hide();
                user.Show();
            }

            else if (textBox1.Text == "")
            {
                //MessageBox.Show("Enter Admin Password!");
                label2.Text = "Enter Admin Password!";
            }
            else
            {
                label2.Text = "Invalid Password";
            }
        }