private void addAccounts() { foreach (Account account in this.main.accountsPanel.Children) { AccountSelect acct = new AccountSelect(account.username.Text, this); this.selectPanel.Children.Add(acct); } }
public void removeAccount(AccountSelect acct) { List<Account> list = new List<Account>(); foreach (Account account in this.accounts) { if (acct.user == account.username.Text) { list.Add(account); } } foreach (Account account in list) { this.accounts.Remove(account); } this.main.updateGroups(); }
public void removeAccount(AccountSelect acct) { List <Account> list = new List <Account>(); foreach (Account account in this.accounts) { if (acct.user == account.username.Text) { list.Add(account); } } foreach (Account account in list) { this.accounts.Remove(account); } this.main.updateGroups(); }