Пример #1
0
        /// <summary>
        /// The constructor will setup the property editor based on the attribute if one is found
        /// </summary>
        internal PropertyEditor()
        {
            StaticallyDefinedValueEditor = new ValueEditor();
            StaticallyDefinedPreValueEditor = new PreValueEditor();

            //assign properties based on the attribute if it is found
            var att = GetType().GetCustomAttribute<PropertyEditorAttribute>(false);
            if (att != null)
            {
                Id = Guid.Parse(att.Id);
                Name = att.Name;

                StaticallyDefinedValueEditor.ValueType = att.ValueType;
                StaticallyDefinedValueEditor.View = att.EditorView;
                StaticallyDefinedPreValueEditor.View = att.PreValueEditorView;
            }
        }
Пример #2
0
        /// <summary>
        /// The constructor will setup the property editor based on the attribute if one is found
        /// </summary>
        internal PropertyEditor()
        {
            StaticallyDefinedValueEditor    = new ValueEditor();
            StaticallyDefinedPreValueEditor = new PreValueEditor();

            //assign properties based on the attribute if it is found
            var att = GetType().GetCustomAttribute <PropertyEditorAttribute>(false);

            if (att != null)
            {
                Id   = Guid.Parse(att.Id);
                Name = att.Name;

                StaticallyDefinedValueEditor.ValueType = att.ValueType;
                StaticallyDefinedValueEditor.View      = att.EditorView;
                StaticallyDefinedPreValueEditor.View   = att.PreValueEditorView;
            }
        }