Пример #1
0
        public static void SetPeopleNames(string schemaId)
        {
            var settings = PeopleNamesSettings.Load();

            settings.ItemID = schemaId;
            settings.Save();
        }
Пример #2
0
        public static PeopleNamesItem GetPeopleNames(string schemaId)
        {
            if (PeopleNamesItem.CustomID.Equals(schemaId, StringComparison.InvariantCultureIgnoreCase))
            {
                var settings = PeopleNamesSettings.Load();
                return(settings.Item ??
                       new PeopleNamesItem
                {
                    Id = PeopleNamesItem.CustomID,
                    GroupCaption = string.Empty,
                    GroupHeadCaption = string.Empty,
                    GroupsCaption = string.Empty,
                    RegDateCaption = string.Empty,
                    UserCaption = string.Empty,
                    UserPostCaption = string.Empty,
                    UsersCaption = string.Empty,
                    GuestCaption = string.Empty,
                    GuestsCaption = string.Empty,
                    SchemaName = Resources.Resource.CustomNamingPeopleSchema
                });
            }

            Load();

            return(items.Find(i => i.Id.Equals(schemaId, StringComparison.InvariantCultureIgnoreCase)));
        }
Пример #3
0
        public static void SetPeopleNames(PeopleNamesItem custom)
        {
            var settings = PeopleNamesSettings.Load();

            custom.Id       = PeopleNamesItem.CustomID;
            settings.ItemID = PeopleNamesItem.CustomID;
            settings.Item   = custom;
            settings.Save();
        }