public static void LoadSettings() { SettingsAccounts accts = Properties.Settings.Default.Accounts; if (accts == null || accts.accounts == null) { return; } accounts.Clear(); if (have_inited == false) { have_inited = true; accounts.CollectionChanged += accounts_CollectionChanged; Field field = Field.GetByName(fields, "guid"); field.Validator = new Field.validate_field_del(ValidateGuid); } foreach (SettingsAccount account in accts.accounts) { Account acct = account.GetAccount(); AddAccount(acct); } }