public void SelectionChanged(IEnumerable <IISOViewModel> added, IEnumerable <IISOViewModel> removed)
 {
     foreach (var i in added)
     {
         SelectionTree.addGenerator(i);
     }
     foreach (var i in removed)
     {
         SelectionTree.removeGenerator(i);
     }
 }
Exemple #2
0
        public void Draw(Action <Type> onTypeSelected)
        {
            var dropdownItems = GetDropdownItems();
            var selectionTree = new SelectionTree(dropdownItems, _selectedType, onTypeSelected, ProjectSettings.SearchbarMinItemsCount, _attribute.ExcludeNone);

            if (_attribute.ExpandAllFolders)
            {
                selectionTree.ExpandAllFolders();
            }

            DropdownWindow.Create(selectionTree, _attribute.DropdownHeight, GUIUtility.GUIToScreenPoint(Event.current.mousePosition), DropdownWindowType.Dropdown);
        }
        public void Draw(Action <Type> onTypeSelected)
        {
            var dropdownItems = GetDropdownItems();
            var selectionTree = new SelectionTree(dropdownItems, _selectedType, onTypeSelected, _attribute.SearchbarMinItemsCount, _attribute.ExcludeNone);

            if (_attribute.ExpandAllFolders)
            {
                selectionTree.ExpandAllFolders();
            }

            DropdownWindow.Create(selectionTree, _attribute.DropdownHeight);
        }
        private void UpdateTree()
        {
            this.InvokeLater(() =>
            {
                SelectionTree.BeginUpdate();

                SelectionTree.Nodes.Clear();

                var doc = _context.Get <MapDocument>("ActiveDocument");
                if (doc != null)
                {
                    foreach (var root in doc.Selection.GetSelectedParents())
                    {
                        SelectionTree.Nodes.Add(CreateNode(root));
                    }
                }

                SelectionTree.ExpandAll();
                SelectionTree.EndUpdate();
            });
        }