当前位置: 首页>>代码示例>>C#>>正文


C# ITreeBuilder.MoveToPosition方法代码示例

本文整理汇总了C#中ITreeBuilder.MoveToPosition方法的典型用法代码示例。如果您正苦于以下问题:C# ITreeBuilder.MoveToPosition方法的具体用法?C# ITreeBuilder.MoveToPosition怎么用?C# ITreeBuilder.MoveToPosition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ITreeBuilder的用法示例。


在下文中一共展示了ITreeBuilder.MoveToPosition方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetPackagesFolderNode

		ProjectPackagesFolderNode GetPackagesFolderNode (ITreeBuilder treeBuilder)
		{
			NodePosition originalPosition = treeBuilder.CurrentPosition;

			if (!treeBuilder.MoveToParent ()) {
				return null;
			}

			ProjectPackagesFolderNode packagesFolder = null;
			if (treeBuilder.MoveToChild (ProjectPackagesFolderNode.NodeName, typeof(ProjectPackagesFolderNode))) {
				packagesFolder = treeBuilder.DataItem as ProjectPackagesFolderNode;
			}

			treeBuilder.MoveToPosition (originalPosition);

			return packagesFolder;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:17,代码来源:ProjectReferencesNodeBuilderExtension.cs

示例2: GetNodeInfo

			internal static void GetNodeInfo (ExtensibleTreeView tree, ITreeBuilder tb, NodeBuilder[] chain, object dataObject, out string text, out Gdk.Pixbuf icon, out Gdk.Pixbuf closedIcon)
			{
				icon = null;
				closedIcon = null;
				text = string.Empty;
				
				NodePosition pos = tb.CurrentPosition;
				
				foreach (NodeBuilder builder in chain) {
					try {
						builder.BuildNode (tb, dataObject, ref text, ref icon, ref closedIcon);
					} catch (Exception ex) {
						LoggingService.LogError (ex.ToString ());
					}
					tb.MoveToPosition (pos);
				}
					
				if (closedIcon == null) closedIcon = icon;
				
				if (tree.CopyObjects != null && ((IList)tree.CopyObjects).Contains (dataObject) && tree.CurrentTransferOperation == DragOperation.Move) {
					Gdk.Pixbuf gicon = tree.BuilderContext.GetComposedIcon (icon, "fade");
					if (gicon == null) {
						gicon = ImageService.MakeTransparent (icon, 0.5);
						tree.BuilderContext.CacheComposedIcon (icon, "fade", gicon);
					}
					icon = gicon;
					gicon = tree.BuilderContext.GetComposedIcon (closedIcon, "fade");
					if (gicon == null) {
						gicon = ImageService.MakeTransparent (closedIcon, 0.5);
						tree.BuilderContext.CacheComposedIcon (closedIcon, "fade", gicon);
					}
					closedIcon = gicon;
				}
			}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:34,代码来源:TreeBuilder.cs

示例3: HasChildNodes

			internal static bool HasChildNodes (ITreeBuilder tb, NodeBuilder[] chain, object dataObject)
			{
				NodePosition pos = tb.CurrentPosition;
				foreach (NodeBuilder nb in chain) {
					try {
						bool res = nb.HasChildNodes (tb, dataObject);
						if (res) return true;
					} catch (Exception ex) {
						LoggingService.LogError (ex.ToString ());
					} finally {
						tb.MoveToPosition (pos);
					}
				}
				return false;
			}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:15,代码来源:TreeBuilder.cs

示例4: GetAttributes

			internal static NodeAttributes GetAttributes (ITreeBuilder tb, NodeBuilder[] chain, object dataObject)
			{
				NodePosition pos = tb.CurrentPosition;
				NodeAttributes ats = NodeAttributes.None;
				
				foreach (NodeBuilder nb in chain) {
					try {
						nb.GetNodeAttributes (tb, dataObject, ref ats);
					} catch (Exception ex) {
						LoggingService.LogError (ex.ToString ());
					}
					tb.MoveToPosition (pos);
				}
				return ats;
			}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:15,代码来源:TreeBuilder.cs

示例5: GetNodeInfo

			internal static NodeInfo GetNodeInfo (NodeInfo nodeInfo, ExtensibleTreeView tree, ITreeBuilder tb, NodeBuilder[] chain, object dataObject)
			{
				NodePosition pos = tb.CurrentPosition;

				foreach (NodeBuilder builder in chain) {
					try {
						builder.BuildNode (tb, dataObject, nodeInfo);
					} catch (Exception ex) {
						LoggingService.LogError (ex.ToString ());
					}
					tb.MoveToPosition (pos);
				}
					
				if (nodeInfo.ClosedIcon == null) nodeInfo.ClosedIcon = nodeInfo.Icon;
				
				if (tree.CopyObjects != null && ((IList)tree.CopyObjects).Contains (dataObject) && tree.CurrentTransferOperation == DragOperation.Move) {
					var gicon = tree.BuilderContext.GetComposedIcon (nodeInfo.Icon, "fade");
					if (gicon == null) {
						gicon = nodeInfo.Icon.WithAlpha (0.5);
						tree.BuilderContext.CacheComposedIcon (nodeInfo.Icon, "fade", gicon);
					}
					nodeInfo.Icon = gicon;
					gicon = tree.BuilderContext.GetComposedIcon (nodeInfo.ClosedIcon, "fade");
					if (gicon == null) {
						gicon = nodeInfo.ClosedIcon.WithAlpha (0.5);
						tree.BuilderContext.CacheComposedIcon (nodeInfo.ClosedIcon, "fade", gicon);
					}
					nodeInfo.ClosedIcon = gicon;
				}
				return nodeInfo;
			}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:31,代码来源:TreeBuilder.cs


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