コード例 #1
0
ファイル: FlatListTreeNode.cs プロジェクト: tris2481/ILSpy
 void ReplaceWith(SharpTreeNode node)
 {
     if (listParent != null)
     {
         if (listParent.left == this)
         {
             listParent.left = node;
         }
         else
         {
             Debug.Assert(listParent.right == this);
             listParent.right = node;
         }
         if (node != null)
         {
             node.listParent = listParent;
         }
         listParent = null;
     }
     else
     {
         // this was a root node
         Debug.Assert(node != null);                 // cannot delete the only node in the tree
         node.listParent = null;
         if (treeFlattener != null)
         {
             Debug.Assert(node.treeFlattener == null);
             node.treeFlattener      = this.treeFlattener;
             this.treeFlattener      = null;
             node.treeFlattener.root = node;
         }
     }
 }
コード例 #2
0
ファイル: SharpTreeView.cs プロジェクト: tris2481/ILSpy
 void Reload()
 {
     if (flattener != null)
     {
         flattener.Stop();
     }
     if (Root != null)
     {
         if (!(ShowRoot && ShowRootExpander))
         {
             Root.IsExpanded = true;
         }
         flattener        = new TreeFlattener(Root, ShowRoot);
         this.ItemsSource = flattener;
     }
 }
コード例 #3
0
 void Reload()
 {
     if (flattener != null)
     {
         flattener.Stop();
     }
     if (Root != null)
     {
         if (!(ShowRoot && ShowRootExpander))
         {
             Root.IsExpanded = true;
         }
         flattener = new TreeFlattener(Root, ShowRoot);
         flattener.CollectionChanged += flattener_CollectionChanged;
         this.Items = flattener;
     }
 }
コード例 #4
0
ファイル: SharpTreeView.cs プロジェクト: HEskandari/ILSpy
 void Reload()
 {
     if (flattener != null) {
         flattener.Stop();
     }
     if (Root != null) {
         if (!(ShowRoot && ShowRootExpander)) {
             Root.IsExpanded = true;
         }
         flattener = new TreeFlattener(Root, ShowRoot);
         this.ItemsSource = flattener;
     }
 }
コード例 #5
0
ファイル: FlatListTreeNode.cs プロジェクト: Gobiner/ILSpy
		void ReplaceWith(SharpTreeNode node)
		{
			if (listParent != null) {
				if (listParent.left == this) {
					listParent.left = node;
				} else {
					Debug.Assert(listParent.right == this);
					listParent.right = node;
				}
				if (node != null)
					node.listParent = listParent;
				listParent = null;
			} else {
				// this was a root node
				Debug.Assert(node != null); // cannot delete the only node in the tree
				node.listParent = null;
				if (treeFlattener != null) {
					Debug.Assert(node.treeFlattener == null);
					node.treeFlattener = this.treeFlattener;
					this.treeFlattener = null;
					node.treeFlattener.root = node;
				}
			}
		}