Example #1
0
        public PropertySettingsContainer GetPageDefinitionsPropertySettingsContainer(PageDefinition pageDefinition)
        {
            PropertySettingsContainer container;

            PropertySettingsRepository.TryGetContainer(pageDefinition.SettingsID, out container);
            return(container);
        }
Example #2
0
        private Dictionary <string, string> GetDropDownListOption(PropertyDropDownList property)
        {
            Dictionary <string, string> retval = new Dictionary <string, string>();

            if (property == null)
            {
                return(retval);
            }
            var propRepository = new PropertySettingsRepository();
            PropertySettingsContainer container;

            if (propRepository.TryGetContainer(property.SettingsID, out container))
            {
                var multiSelectSettings = container.Settings.Values.FirstOrDefault(value => value.PropertySettings.GetType() == typeof(MultipleOptionsListSettings));

                if (multiSelectSettings != null)
                {
                    var settings = ((MultipleOptionsListSettings)multiSelectSettings.PropertySettings);
                    retval = settings.ListOptions;
                }
            }

            return(retval);
        }