Beispiel #1
0
 private void buttonNewUser_Click(object sender, EventArgs e)
 {
     NewAccountDlg newAccount = new NewAccountDlg();
     while (newAccount.ShowDialog() == DialogResult.OK)
     {
         Account a = new Account(newAccount.textBoxUser.Text, newAccount.textBoxPassword.Text);
         a.Create();
         this.textBoxUser.Text = newAccount.textBoxUser.Text;
         this.textBoxPassword.Text = newAccount.textBoxPassword.Text;
         this.DialogResult = DialogResult.OK;
         this.Close();
         return;
     }
 }
Beispiel #2
0
        private void buttonNewUser_Click(object sender, EventArgs e)
        {
            NewAccountDlg newAccount = new NewAccountDlg();

            while (newAccount.ShowDialog() == DialogResult.OK)
            {
                Account a = new Account(newAccount.textBoxUser.Text, newAccount.textBoxPassword.Text);
                a.Create();
                this.textBoxUser.Text     = newAccount.textBoxUser.Text;
                this.textBoxPassword.Text = newAccount.textBoxPassword.Text;
                this.DialogResult         = DialogResult.OK;
                this.Close();
                return;
            }
        }