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; } } }
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)) { ai.Owner = this; if (ai.ShowDialog() == DialogResult.OK) { LocalList.Remove(toEdit); LocalList.Add(ai.AccountInfo); ListAccounts(); NeedsReset = true; } ai.Dispose(); // Show(); } } }