Esempio n. 1
0
 private void HandleAccountAdd(object sender, EventArgs e)
 {
     var form = new AccountKeyForm();
     if (form.ShowDialog(this) == DialogResult.OK)
     {
         if (Configuration.Instance.Accounts.ContainsKey(form.AccountName))
             Configuration.Instance.Accounts[form.AccountName] = form.AccountKey;
         else
             Configuration.Instance.Accounts.Add(form.AccountName, form.AccountKey);
     }
     UpdateAccountSelection();
 }
Esempio n. 2
0
 private void HandleAccountEdit(object sender, EventArgs e)
 {
     var form = new AccountKeyForm();
     form.AccountName = GetSelectedAccountName();
     form.AccountKey = GetSelectedAccountKey();
     if (form.ShowDialog(this) == DialogResult.OK)
     {
         if (Configuration.Instance.Accounts.ContainsKey(form.AccountName))
             Configuration.Instance.Accounts[form.AccountName] = form.AccountKey;
         else
             Configuration.Instance.Accounts.Add(form.AccountName, form.AccountKey);
     }
     UpdateAccountSelection();
 }