Example #1
0
        public void AddDictionaryKeyControl(BaseChartControl obj, Property property)
        {
            obj.Key   = property.Name;
            obj.Value = property.Value;
            //     obj.InitValue = property.DefaultValue;

            obj.Label = (!string.IsNullOrEmpty(property.DisplayName)) ? property.DisplayName : property.Name;

            obj.Desc = property.Desc;

            DictionaryKeyControl.Add(property.Name, obj);
        }
Example #2
0
        public void AddDictionaryKeyControl(Property property)
        {
            if (!DictionaryKeyControl.ContainsKey(property.Name))
            {
                BaseChartControl obj  = null;
                string[]         strs = property.Type.ToLower().Split(':');
                switch (strs[0])
                {
                case PropertyType.TEXT:
                    obj = new TextControl();
                    break;

                case PropertyType.NUMBER:
                    string param = (strs.Length == 1) ? "" : strs[1];
                    obj = new NumberControl(param);
                    break;

                case PropertyType.COLOR:
                    obj = new ColorControl();
                    break;

                case PropertyType.FONT:
                    obj = new FontControl();
                    break;

                case PropertyType.ENUM:
                    obj = new EnumControl(NodeName + ":" + strs[1]);
                    break;

                default:
                    obj = new TextControl();
                    break;
                }
                obj.GroupId = property.GroupId;
                AddDictionaryKeyControl(obj, property);
                Property p = new Property();
            }
        }