예제 #1
0
 public ItemsEditorAttribute(ItemsEditorOptions editorOptions, Type validationType,
                             string tag)
 {
     this.EditorOptions  = editorOptions;
     this.ValidationType = validationType;
     this.Tag            = tag;
 }
예제 #2
0
        public void Initialize <T>(ItemsEditorOptions editorOptions, IEnumerable <T> collection) where T : ITreeNodeData
        {
            this.editorOptions = editorOptions;
            Type itemType = collection.GetType().GetGenericArguments().Single();

            lvItems.RegisterNodeDataType(itemType);

            lvItems.Nodes.Clear();
            foreach (var treeNodeData in collection)
            {
                lvItems.CreateNode(treeNodeData);
            }

            lvItems.CreateNewItemNode();

            IsDirty = false;
            panelSortIconsHint.Visible = SupportSortingIcons();
        }
예제 #3
0
 public ItemsEditorAttribute(ItemsEditorOptions editorOptions, Type validationType)
     : this(editorOptions, validationType, null)
 {
 }
예제 #4
0
 public ItemsEditorAttribute(ItemsEditorOptions editorOptions)
     : this(editorOptions, null)
 {
 }