예제 #1
0
        public static ControlInfo CreateDefaultSaveConfigUI(PropertyCollection props)
        {
            PanelControlInfo configUI = new PanelControlInfo();

            foreach (Property property in props)
            {
                PropertyControlInfo propertyControlInfo = PropertyControlInfo.CreateFor(property);

                foreach (Property controlProperty in propertyControlInfo.ControlProperties)
                {
                    if (0 == string.Compare(controlProperty.Name, ControlInfoPropertyNames.DisplayName.ToString(), StringComparison.InvariantCulture))
                    {
                        controlProperty.Value = property.Name;
                    }
                    else if (0 == string.Compare(controlProperty.Name, ControlInfoPropertyNames.ShowResetButton.ToString(), StringComparison.InvariantCulture))
                    {
                        controlProperty.Value = false;
                    }
                }

                configUI.AddChildControl(propertyControlInfo);
            }

            return(configUI);
        }
예제 #2
0
        public static ControlInfo CreateDefaultConfigUI(IEnumerable <Property> props)
        {
            PanelControlInfo configUI = new PanelControlInfo();

            foreach (Property property in props)
            {
                PropertyControlInfo propertyControlInfo = PropertyControlInfo.CreateFor(property);
                propertyControlInfo.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = property.Name;
                configUI.AddChildControl(propertyControlInfo);
            }

            return(configUI);
        }