/// <summary>
 /// Button add event click.
 /// </summary>
 /// <param name="sender">The sender object.</param>
 /// <param name="e">The event arguments.</param>
 private void btnAddAccount_Click(object sender, EventArgs e)
 {
     AddAccountWizardForm frmAdd = new AddAccountWizardForm();
     if (frmAdd.ShowDialog() == DialogResult.OK)
     {
         AccountSettings.AccountInfo accountInfo = frmAdd.NewAccountInfo;
         Facade.GetInstance().AddAccountInfo(accountInfo);
         Facade.GetInstance().SaveAccountSettings();
         this.lstAccounts.Items.Add(accountInfo);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Button add event click.
        /// </summary>
        /// <param name="sender">The sender object.</param>
        /// <param name="e">The event arguments.</param>
        private void btnAddAccount_Click(object sender, EventArgs e)
        {
            AddAccountWizardForm frmAdd = new AddAccountWizardForm();

            if (frmAdd.ShowDialog() == DialogResult.OK)
            {
                AccountSettings.AccountInfo accountInfo = frmAdd.NewAccountInfo;
                Facade.GetInstance().AddAccountInfo(accountInfo);
                Facade.GetInstance().SaveAccountSettings();
                this.lstAccounts.Items.Add(accountInfo);
            }
        }
Beispiel #3
0
        /// <summary>
        /// Button properties click.
        /// </summary>
        /// <param name="sender">The sender object.</param>
        /// <param name="e">The event arguments.</param>
        private void btnProperties_Click(object sender, EventArgs e)
        {
            if (lstAccounts.SelectedIndex >= 0)
            {
                AccountSettings.AccountInfo accountInfo =
                    (AccountSettings.AccountInfo)(this.lstAccounts.SelectedItem);

                AddAccountWizardForm frmAdd = new AddAccountWizardForm();
                frmAdd.NewAccountInfo = accountInfo;
                DialogResult dr = frmAdd.ShowDialog();
                if (dr == DialogResult.OK)
                {
                    Facade.GetInstance().SaveAccountSettings();
                    this.LoadAccoutnSetings();
                }
            }
        }
 /// <summary>
 /// Button properties click.
 /// </summary>
 /// <param name="sender">The sender object.</param>
 /// <param name="e">The event arguments.</param>
 private void btnProperties_Click(object sender, EventArgs e)
 {
     if (lstAccounts.SelectedIndex >= 0)
     {
         AccountSettings.AccountInfo accountInfo = 
             (AccountSettings.AccountInfo)(this.lstAccounts.SelectedItem);
         
         AddAccountWizardForm frmAdd = new AddAccountWizardForm();
         frmAdd.NewAccountInfo = accountInfo;
         DialogResult dr = frmAdd.ShowDialog();
         if (dr == DialogResult.OK)
         {
             Facade.GetInstance().SaveAccountSettings();
             this.LoadAccoutnSetings();
         }
     }
 }