GetByName() public static method

public static GetByName ( Field fields, string name ) : Field
fields Field
name string
return Field
Ejemplo n.º 1
0
        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);
            }
        }