Beispiel #1
0
        private void OnItemsChosen(IEnumerable <object> chosenItems)
        {
            bool flag = this.onItemsChosen == null;

            if (!flag)
            {
                List <ITreeViewItem> list = new List <ITreeViewItem>();
                foreach (object current in chosenItems)
                {
                    TreeView.TreeViewItemWrapper treeViewItemWrapper = (TreeView.TreeViewItemWrapper)current;
                    list.Add(treeViewItemWrapper.item);
                }
                this.onItemsChosen(list);
            }
        }
Beispiel #2
0
 private void CreateWrappers(IEnumerable <ITreeViewItem> treeViewItems, int depth, ref List <TreeView.TreeViewItemWrapper> wrappers)
 {
     foreach (ITreeViewItem current in treeViewItems)
     {
         TreeView.TreeViewItemWrapper item = new TreeView.TreeViewItemWrapper
         {
             depth = depth,
             item  = current
         };
         wrappers.Add(item);
         bool flag = this.m_ExpandedItemIds.Contains(current.id) && current.hasChildren;
         if (flag)
         {
             this.CreateWrappers(current.children, depth + 1, ref wrappers);
         }
     }
 }