• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# TreeView.SharpTreeNode类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ICSharpCode.TreeView.SharpTreeNode的典型用法代码示例。如果您正苦于以下问题:C# SharpTreeNode类的具体用法?C# SharpTreeNode怎么用?C# SharpTreeNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SharpTreeNode类属于ICSharpCode.TreeView命名空间,在下文中一共展示了SharpTreeNode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ClearDescendants

 void ClearDescendants(SharpTreeNode node)
 {
     var index = List.IndexOf(node);
     while (index + 1 < List.Count && List[index + 1].Level > node.Level) {
         RemoveAt(index + 1);
     }
 }
开发者ID:lucaslra,项目名称:SPM,代码行数:7,代码来源:TreeFlattener.cs


示例2: GetNodeByVisibleIndex

		internal static SharpTreeNode GetNodeByVisibleIndex(SharpTreeNode root, int index)
		{
			root.GetTotalListLength(); // ensure all list lengths are calculated
			Debug.Assert(index >= 0);
			Debug.Assert(index < root.totalListLength);
			SharpTreeNode node = root;
			Debug.Assert(node != null);
			while (true) {
				if (node.left != null && index < node.left.totalListLength) {
					Debug.Assert(node.left != null);
					node = node.left;
				} else {
					if (node.left != null) {
						index -= node.left.totalListLength;
					}
					if (node.isVisible) {
						if (index == 0)
							return node;
						index--;
					}
					Debug.Assert(node.right != null);
					node = node.right;
				}
			}
		}
开发者ID:GreenDamTan,项目名称:dnSpy,代码行数:25,代码来源:FlatListTreeNode.cs


示例3: Copy

		public override IDataObject Copy(SharpTreeNode[] nodes)
		{
			var data = new DataObject();
			var paths = SharpTreeNode.ActiveNodes.Cast<FileSystemNode>().Select(n => n.FullPath).ToArray();
			data.SetData(typeof(string[]), paths);
			return data;
		}
开发者ID:lujinlong,项目名称:Apq,代码行数:7,代码来源:FileSystemNode.cs


示例4: Execute

        public void Execute(SharpTreeNode[] selectedNodes)
        {
            //Cast
            var node = (ILSpyTreeNode)selectedNodes[0];

            //Checks if the selected node is an assembly
            if (node is AssemblyTreeNode)
            {
                //Forces lazy-loading
                node.EnsureLazyChildren();

                //Checks if it's a multi-module assembly
                if (node.Children.Count > 1)
                {
                    MessageBox.Show("In a multi-module assembly select a specific module", "Select module", MessageBoxButton.OK, MessageBoxImage.Error);
                    return;
                }

                //Takes the first (and only) module
                node = (ILSpyTreeNode)node.Children[0];
            }

            //Shows the injection window
            new Injection.InjectWindow(node, 0, new InjectExistingEntry().IsVisible(selectedNodes)).ShowDialog();
        }
开发者ID:95ulisse,项目名称:ILEdit,代码行数:25,代码来源:InjectNewEntry.cs


示例5: DeleteCore

		public override void DeleteCore(SharpTreeNode[] nodes)
		{
			foreach (var node in nodes.ToArray())
			{
				node.Parent.Children.Remove(node);
			}
		}
开发者ID:lujinlong,项目名称:Apq,代码行数:7,代码来源:FileSystemNode.cs


示例6: Delete

		public override void Delete(SharpTreeNode[] nodes)
		{
			if (MessageBox.Show("Sure?", "Delete", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
			{
				DeleteCore(nodes);
			}
		}
开发者ID:lujinlong,项目名称:Apq,代码行数:7,代码来源:FileSystemNode.cs


示例7: Execute

		public void Execute(SharpTreeNode[] selectedNodes)
		{
			// TODO: figure out when equivalent nodes are already present
			// and focus those instead.
			foreach (IMemberTreeNode node in selectedNodes) {
				Analyze(node.Member);
			}
		}
开发者ID:95ulisse,项目名称:ILEdit,代码行数:8,代码来源:AnalyzeContextMenuEntry.cs


示例8: IsEnabled

		public bool IsEnabled(SharpTreeNode[] selectedNodes)
		{
			foreach (IMemberTreeNode node in selectedNodes) {
				if (!(node.Member is FieldDefinition || node.Member is MethodDefinition))
					return false;
			}
			return true;
		}
开发者ID:tanujmathur,项目名称:ILSpy,代码行数:8,代码来源:AnalyzeContextMenuEntry.cs


示例9: TreeFlattener

 public TreeFlattener(SharpTreeNode modelRoot, bool includeRoot)
 {
     this.root = modelRoot;
     while (root.listParent != null)
         root = root.listParent;
     root.treeFlattener = this;
     this.includeRoot = includeRoot;
 }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:8,代码来源:TreeFlattener.cs


示例10: ImportCore

        protected override IMetadataTokenProvider ImportCore(MemberImportingOptions options, SharpTreeNode node)
        {
            //Checks that the task hasn't been canceled
            options.CancellationToken.ThrowIfCancellationRequested();

            //Imports and returns
            return Session.DestinationModule.Import((TypeReference)Member);
        }
开发者ID:95ulisse,项目名称:ILEdit,代码行数:8,代码来源:TypeReferenceInModuleImporter.cs


示例11: Insert

 void Insert(int index, SharpTreeNode node)
 {
     List.Insert(index, node);
     node.PropertyChanged += node_PropertyChanged;
     if (node.IsExpanded) {
         node.Children.CollectionChanged += node_ChildrenChanged;
     }
 }
开发者ID:lucaslra,项目名称:SPM,代码行数:8,代码来源:TreeFlattener.cs


示例12: GoForward

        public SharpTreeNode GoForward(SharpTreeNode oldNode)
        {
            if (oldNode != null)
                back.Add(oldNode);

            SharpTreeNode node = forward[forward.Count - 1];
            forward.RemoveAt(forward.Count - 1);
            return node;
        }
开发者ID:richardschneider,项目名称:ILSpy,代码行数:9,代码来源:NavigationHistory.cs


示例13: GoBack

        public SharpTreeNode GoBack(SharpTreeNode oldNode)
        {
            if (oldNode != null)
                forward.Add(oldNode);

            SharpTreeNode node = back[back.Count - 1];
            back.RemoveAt(back.Count - 1);
            return node;
        }
开发者ID:richardschneider,项目名称:ILSpy,代码行数:9,代码来源:NavigationHistory.cs


示例14: Execute

        public void Execute(SharpTreeNode[] selectedNodes)
        {
            var types = selectedNodes
                .OfType<TypeTreeNode>()
                .Select(n => HAL.Converter.Type(n.TypeDefinition))
                .ToArray();

            Services.BrowseInteractions(types, true);
        }
开发者ID:nevzatalkan,项目名称:AssemblyVisualizer,代码行数:9,代码来源:BrowseInteractionsContextMenuEntry.cs


示例15: IsVisible

		protected override bool IsVisible(SharpTreeNode node)
		{
			return node is EventTreeNode
			       || node is FieldTreeNode
			       || node is MethodTreeNode
			       || node is PropertyTreeNode
			       || node is TypeTreeNode
				   || node is AssemblyReferenceTreeNode
			       || node is ResourceTreeNode;
		}
开发者ID:XQuantumForceX,项目名称:Reflexil,代码行数:10,代码来源:BaseMemberContextMenu.cs


示例16: Execute

        public void Execute(SharpTreeNode[] selectedNodes)
        {
            var assemblyDefinitions = selectedNodes
                .OfType<AssemblyTreeNode>()
                .Select(n => n.LoadedAssembly.AssemblyDefinition)
                .ToList();

            var window = WindowManager.AssemblyBrowsers.Single();
            window.ViewModel.AddAssemblies(assemblyDefinitions);
        }
开发者ID:dalebrubaker,项目名称:ILSpy-Visualizer-Plugin,代码行数:10,代码来源:AddAssemblyContextMenuEntry.cs


示例17: GetDataObject

		protected override IDataObject GetDataObject(SharpTreeNode[] nodes)
		{
			string[] data = nodes
				.OfType<XamlOutlineNode>()
				.Select(item => item.GetMarkupText())
				.ToArray();
			var dataObject = new DataObject();
			dataObject.SetData(typeof(string[]), data);
			
			return dataObject;
		}
开发者ID:ratoy,项目名称:SharpDevelop,代码行数:11,代码来源:XamlOutlineNode.cs


示例18: IsEnabled

		public bool IsEnabled(SharpTreeNode[] selectedNodes)
		{
			foreach (IMemberTreeNode node in selectedNodes) {
				if (!(node.Member is FieldDefinition
					|| node.Member is MethodDefinition
					|| Analyzer.AnalyzedPropertyTreeNode.CanShow(node.Member)
					|| Analyzer.AnalyzedEventTreeNode.CanShow(node.Member)))
					return false;
			}
			return true;
		}
开发者ID:ThomasZitzler,项目名称:ILSpy,代码行数:11,代码来源:AnalyzeContextMenuEntry.cs


示例19: ActivateItem

		internal static bool ActivateItem(SharpTreeNode node, TypeDefinition def)
		{
			if (def != null) {
				var assemblyListNode = node.Ancestors().OfType<AssemblyListTreeNode>().FirstOrDefault();
				if (assemblyListNode != null) {
					assemblyListNode.Select(assemblyListNode.FindTypeNode(def));
					return true;
				}
			}
			return false;
		}
开发者ID:95ulisse,项目名称:ILEdit,代码行数:11,代码来源:BaseTypesEntryNode.cs


示例20: Execute

        public void Execute(SharpTreeNode[] selectedNodes)
        {
            var assemblyDefinitions = selectedNodes
                .OfType<AssemblyTreeNode>()
                .Select(n => n.LoadedAssembly.AssemblyDefinition);

            var window = new DependencyBrowserWindow(assemblyDefinitions.Select(HAL.Converter.Assembly))
            {
                Owner = Services.MainWindow
            };
            window.Show();
        }
开发者ID:nevzatalkan,项目名称:AssemblyVisualizer,代码行数:12,代码来源:BrowseDependenciesContextMenuEntry.cs



注:本文中的ICSharpCode.TreeView.SharpTreeNode类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# TreeView.SharpTreeViewItem类代码示例发布时间:2022-05-26
下一篇:
C# Document.TextMarker类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap