예제 #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 = 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();
        }