Exemplo n.º 1
0
        public BlockUIFactory(PropertyEditorFactory propertyEditorFactory)
        {
            if (propertyEditorFactory == null) throw new ArgumentNullException("propertyEditorFactory");
            this.PropertyEditorFactory = propertyEditorFactory;

            this.TreeColumnFactory = new TreeColumnFactory(propertyEditorFactory);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates the test data types
        /// </summary>
        private void InitDataTypes()
        {
            //get the data types from the CoreCmsData
            _dataTypes = new List <DataType>()
            {
                _frameworkContext.TypeMappers.Map <DataType>(CoreCmsData.RequiredCoreUserAttributeTypes().Where(x => x.Id == new HiveId("rte-pe".EncodeAsGuid())).Single()),
                _frameworkContext.TypeMappers.Map <DataType>(CoreCmsData.RequiredCoreUserAttributeTypes().Where(x => x.Id == new HiveId("sltb-pe".EncodeAsGuid())).Single()),
                _frameworkContext.TypeMappers.Map <DataType>(CoreCmsData.RequiredCoreUserAttributeTypes().Where(x => x.Id == new HiveId("csp-pe".EncodeAsGuid())).Single()),
                _frameworkContext.TypeMappers.Map <DataType>(CoreCmsData.RequiredCoreUserAttributeTypes().Where(x => x.Id == new HiveId("tag-pe".EncodeAsGuid())).Single()),
                _frameworkContext.TypeMappers.Map <DataType>(CoreCmsData.RequiredCoreUserAttributeTypes().Where(x => x.Id == new HiveId("mltb-pe".EncodeAsGuid())).Single()),
                _frameworkContext.TypeMappers.Map <DataType>(CoreCmsData.RequiredCoreUserAttributeTypes().Where(x => x.Id == new HiveId("media-picker-pe".EncodeAsGuid())).Single()),
                _frameworkContext.TypeMappers.Map <DataType>(CoreCmsData.RequiredCoreUserAttributeTypes().Where(x => x.Id == new HiveId("integer-pe".EncodeAsGuid())).Single()),
                _frameworkContext.TypeMappers.Map <DataType>(CoreCmsData.RequiredCoreUserAttributeTypes().Where(x => x.Id == new HiveId("uploader-pe".EncodeAsGuid())).Single())
            };

            //create the inbuilt data types

            var selectedTemplateAttributeType = _attributeTypeRegistry.GetAttributeType(SelectedTemplateAttributeType.AliasValue);

            _selectedTemplateDataType = new DataType(
                selectedTemplateAttributeType.Id,
                selectedTemplateAttributeType.Name,
                selectedTemplateAttributeType.Alias,
                PropertyEditorFactory.GetPropertyEditor(new Guid(CorePluginConstants.SelectedTemplatePropertyEditorId)).Value,
                string.Empty);

            var nodeNameAttributeType = _attributeTypeRegistry.GetAttributeType(NodeNameAttributeType.AliasValue);

            _nodeNameDataType = new DataType(
                nodeNameAttributeType.Id,
                nodeNameAttributeType.Name,
                nodeNameAttributeType.Alias,
                PropertyEditorFactory.GetPropertyEditor(new Guid(CorePluginConstants.NodeNamePropertyEditorId)).Value,
                string.Empty);
        }
Exemplo n.º 3
0
        public BlockUIFactory(PropertyEditorFactory propertyEditorFactory)
        {
            if (propertyEditorFactory == null)
            {
                throw new ArgumentNullException("propertyEditorFactory");
            }
            this.PropertyEditorFactory = propertyEditorFactory;

            this.TreeColumnFactory = new TreeColumnFactory(propertyEditorFactory);
        }
Exemplo n.º 4
0
        public TreeColumnFactory(PropertyEditorFactory propertyEditorFactory)
        {
            if (propertyEditorFactory == null)
            {
                throw new ArgumentNullException("propertyEditorFactory");
            }
            this._propertyEditorFactory = propertyEditorFactory;

            //默认的列类型和column编辑器的映射关系
            this.SetDictionary(new Dictionary <string, Type>()
            {
                { WPFEditorNames.Memo, typeof(MemoTreeColumn) },
                { WPFEditorNames.Boolean, typeof(BooleanTreeColumn) },
                //{ WPFEditorNames.Enum, typeof(ComboBoxTreeColumn) },
                //{ WPFEditorNames.EntitySelection_DropDown, typeof(ComboBoxTreeColumn) },
                //{ WPFEditorNames.DateTime, typeof(DateTreeColumn) },
                //{ WPFEditorNames.Time, typeof(DateTreeColumn) },
                //{ WPFEditorNames.Date, typeof(DateTreeColumn) },
            });
        }