示例#1
0
        private void button2_Click(object sender, EventArgs e)
        {
            User_F Dialog = new User_F();

            if (Dialog.ShowDialog() == DialogResult.OK)
            {
                User Temp = new User(Dialog.Name_TB.Text.Trim(), Hash.GetSHA256(Dialog.Pass_TB.Text.Trim()));

                Operations.AddUser(Temp);

                Show(SystemArgs.Users);
            }
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            User Temp = (User)SystemArgs.View[Positions_DGV.CurrentCell.RowIndex];

            User_F Dialog = new User_F();

            Dialog.BackgroundImage = Properties.Resources.DataUserCh;

            Dialog.Name_TB.Text = Temp.Name;

            if (Dialog.ShowDialog() == DialogResult.OK)
            {
                User NewUser = new User(Dialog.Name_TB.Text.Trim(), Hash.GetSHA256(Dialog.Pass_TB.Text.Trim()));

                Operations.ChangeUsers(NewUser, Temp);

                Show(SystemArgs.Users);
            }
        }