Пример #1
0
        private void FireCreateAccount(object o, EventArgs e)
        {
            CreateAccountForm createAccountForm = new CreateAccountForm();

            createAccountForm.Size            = new Size(545, 425);
            createAccountForm.FormBorderStyle = FormBorderStyle.Sizable;
            createAccountForm.StartPosition   = FormStartPosition.CenterScreen;

            DialogResult result = createAccountForm.ShowDialog();

            if (result == System.Windows.Forms.DialogResult.OK)
            {
                CreateAccount(createAccountForm.AccountData);
            }
        }
Пример #2
0
        private void FireCloneAccount(object o, EventArgs e)
        {
            if (selectedAccount != null)
            {
                Account account = controller.Cache.GetAccount(selectedAccount);

                if (account != null)
                {
                    CreateAccountForm createAccountForm = new CreateAccountForm(account);
                    createAccountForm.Size            = new Size(545, 425);
                    createAccountForm.FormBorderStyle = FormBorderStyle.Sizable;
                    createAccountForm.StartPosition   = FormStartPosition.CenterScreen;

                    DialogResult result = createAccountForm.ShowDialog();

                    if (result == System.Windows.Forms.DialogResult.OK)
                    {
                        CreateAccount(createAccountForm.AccountData);
                    }
                }
            }
        }