Example #1
0
 private bool AddAccount()
 {
     using (AccountInfoForm ai = new AccountInfoForm())
     {
         ai.Hide();
         if (ai.ShowDialog() == DialogResult.OK)
         {
             LocalList.Add(ai.AccountInfo);
             NeedsReset = true;
             ListAccounts();
             ai.Close();
             return true;
         }
         else
         {
             ai.Close();
             return false;
         }
     }
 }
Example #2
0
 private void lnkEdit_Click(object sender, EventArgs e)
 {
     if (cmbAccounts.SelectedItem != null)
     {
         Yedda.Twitter.Account toEdit = (Yedda.Twitter.Account)cmbAccounts.SelectedItem;
         using (AccountInfoForm ai = new AccountInfoForm(toEdit))
         {
             if (ai.ShowDialog() == DialogResult.OK)
             {
                 LocalList.Remove(toEdit);
                 LocalList.Add(ai.AccountInfo);
                 ListAccounts();
                 NeedsReset = true;
             }
             ai.Close();
         }
     }
 }