コード例 #1
0
        void toolStripButtonNewAccount_Click(object sender, EventArgs e)
        {
            var form = new NewAccountForm();
            var res  = form.ShowDialog(MainForm);

            if (res == System.Windows.Forms.DialogResult.OK)
            {
                if (OnCreateNewAccount != null)
                {
                    OnCreateNewAccount.Invoke(this, new NameDetailsEventArgs()
                    {
                        Name = form.textName.Text
                    });
                }
            }
        }
コード例 #2
0
        private void newAccountToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewAccountForm form = new NewAccountForm();

            if (form.ShowDialog() == DialogResult.OK)
            {
                SavingsAccountControl tmp = new SavingsAccountControl();

                tmp.data = form.newAccount;
                tmp.Dock = DockStyle.Left;
                tmp.refreshViews();
                accountsPanel.Controls.Add(tmp);

                saveAll();
            }
        }
コード例 #3
0
 /// <summary>
 /// Creates a NewAccountForm, letting the user register a new account.
 /// </summary>
 public void CreateNewAccountForm()
 {
     newAccountForm.ShowDialog();
 }