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

C# ITreeNavigator类代码示例

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

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



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

示例1:

		List<ReferenceSegment> IAssemblyBrowserNodeBuilder.Disassemble (TextEditorData data, ITreeNavigator navigator)
		{
			if (DomMethodNodeBuilder.HandleSourceCodeEntity (navigator, data)) 
				return null;
			var field = CecilLoader.GetCecilObject ((IUnresolvedField)navigator.DataItem);
			return DomMethodNodeBuilder.Disassemble (data, rd => rd.DisassembleField (field));
		}
开发者ID:vitorelli,项目名称:monodevelop,代码行数:7,代码来源:DomFieldNodeBuilder.cs


示例2: GetNodeName

		public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
		{
			var method = (IUnresolvedMethod)dataObject;
			if (method.EntityType == EntityType.Constructor || method.EntityType == EntityType.Destructor)
				return method.DeclaringTypeDefinition.Name;
			return method.Name;
		}
开发者ID:rajeshpillai,项目名称:monodevelop,代码行数:7,代码来源:DomMethodNodeBuilder.cs


示例3: Fill

		public void Fill (Extension ext, ITreeNavigator nav)
		{
			labelName.Markup = "<small>Extension</small>\n<big><b>" + GLib.Markup.EscapeText (Util.GetDisplayName (ext)) + "</b></big>";
			object parent = ext.GetExtendedObject ();
			
			if (parent is ExtensionPoint) {
				ExtensionPoint ep = (ExtensionPoint) parent;
				string txt = "<small>Extension Point</small>\n<b>" + GLib.Markup.EscapeText (Util.GetDisplayName (ep)) + "</b>";
				if (!string.IsNullOrEmpty (ep.Description))
					txt += "\n" + GLib.Markup.EscapeText (ep.Description);
				Gtk.Label lab = new Gtk.Label ();
				lab.Xalign = lab.Yalign = 0;
				lab.Markup = txt;
				lab.WidthRequest = 400;
				lab.Wrap = true;
				Gtk.Image img = new Gtk.Image (ImageService.GetPixbuf ("md-extension-point", Gtk.IconSize.Menu));
				img.Yalign = 0;
				Gtk.HBox box = new Gtk.HBox (false, 6);
				box.PackStart (img, false, false, 0);
				box.PackStart (lab, true, true, 0);
				buttonExt.Add (box);
				buttonExt.ShowAll ();
				buttonExt.Clicked += delegate {
					if (nav.MoveToObject (ext)) {
						nav.MoveToParent (typeof(Solution));
						nav.Expanded = true;
						if (nav.MoveToObject (ep.ParentAddinDescription)) {
							nav.Expanded = true;
							if (nav.MoveToObject (ep))
								nav.Selected = true;
						}
					}
				};
			}
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:35,代码来源:ExtensionView.cs


示例4: CompareObjects

		public override int CompareObjects (ITreeNavigator thisNode, ITreeNavigator otherNode)
		{
			if (otherNode.DataItem is Enumeration)
				return 1;
			else
				return -1;
		}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:7,代码来源:TypedefNodeBuilder.cs


示例5: GetNodeName

		public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
		{
			Translation translation = dataObject as Translation;
			if (translation == null)
				return "Translation";
			return translation.IsoCode;
		}
开发者ID:powerumc,项目名称:monodevelop_korean,代码行数:7,代码来源:TranslationNodeBuilder.cs


示例6: CompareObjects

 public override int CompareObjects(ITreeNavigator thisNode, ITreeNavigator otherNode)
 {
     if (otherNode.DataItem is ProjectReferenceCollection) {
         return 1;
     }
     return -1;
 }
开发者ID:twing207,项目名称:monodevelop-dnx-addin,代码行数:7,代码来源:DependenciesFolderNodeBuilder.cs


示例7: MoveCopyFile

        public static void MoveCopyFile(Project project, ITreeNavigator nav, string filename, bool move, bool alreadyInPlace)
        {
            if (Runtime.FileUtilityService.IsDirectory (filename))
                return;

            ProjectFolder folder = nav.GetParentDataItem (typeof(ProjectFolder), true) as ProjectFolder;

            string name = System.IO.Path.GetFileName (filename);
            string baseDirectory = folder != null ? folder.Path : project.BaseDirectory;
            string newfilename = alreadyInPlace ? filename : Path.Combine (baseDirectory, name);

            if (filename != newfilename) {
                if (File.Exists (newfilename)) {
                    if (!Runtime.MessageService.AskQuestion (string.Format (GettextCatalog.GetString ("The file '{0}' already exists. Do you want to replace it?"), newfilename), "MonoDevelop"))
                        return;
                }
                File.Copy (filename, newfilename, true);
                if (move)
                    Runtime.FileService.RemoveFile (filename);
            }

            if (project.IsCompileable (newfilename)) {
                project.AddFile (newfilename, BuildAction.Compile);
            } else {
                project.AddFile (newfilename, BuildAction.Nothing);
            }

            Runtime.ProjectService.SaveCombine();
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:29,代码来源:FolderNodeBuilder.cs


示例8: GetNodeName

		public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
		{
			if (thisNode.Options["NestedNamespaces"])
				return ((Namespace)dataObject).Name;
			else
				return ((Namespace)dataObject).FullName;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:7,代码来源:NamespaceNodeBuilder.cs


示例9: CompareObjects

		public override int CompareObjects (ITreeNavigator thisNode, ITreeNavigator otherNode)
		{
			if (otherNode.DataItem is SolutionFolderFileNode)
				return DefaultSort;
			else
				return -1;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:7,代码来源:SolutionFolderFileNodeBuilder.cs


示例10: MustParseAndCacheCurrentSelection

    /// <summary>
    /// Checks if it's necessary to parse and cache the current selection.
    /// </summary>
    /// <param name="currentTreeSelection">Current tree selection.</param>
    /// <param name="forceCaching">Overrides the current logic and forces the caching of the current selection.</param>
    /// <returns>True if it's necessary to parse and cache the current selection, false otherwise.</returns>
    private bool MustParseAndCacheCurrentSelection(ITreeNavigator[] currentTreeSelection, bool forceCaching)
    {
      bool parseAndCacheCurrentSelection = false;

      // Check if the cached tree selection and the current one are still the same.
      if (cachedTreeSelection != null && currentTreeSelection != null && cachedTreeSelection.Length == currentTreeSelection.Length && !forceCaching)
      {
        // Check if the selection is still the same.
        for (int i = 0; i < cachedTreeSelection.Length; i++)
        {
          if (!cachedTreeSelection[i].DataItem.Equals(currentTreeSelection[i].DataItem))
          {
            cachedTreeSelection = currentTreeSelection;
            parseAndCacheCurrentSelection = true;
            break;
          }
        }
      }
      else
      {
        cachedTreeSelection = currentTreeSelection;
        parseAndCacheCurrentSelection = true;
      }

      return parseAndCacheCurrentSelection;
    }
开发者ID:DarkCloud14,项目名称:MonoDevelop.StyleCop,代码行数:32,代码来源:StyleCopNodeCommandHandler.cs


示例11: GetNodeAttributes

		public override void GetNodeAttributes (ITreeNavigator parentNode, object dataObject, ref NodeAttributes attributes)
		{
			Project p = parentNode.DataItem as Project;
			
			if (p is CProject)
				attributes |= NodeAttributes.Hidden;
		}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:7,代码来源:ProjectResourcesExtension.cs


示例12: CompareObjects

        public override int CompareObjects(ITreeNavigator thisNode, ITreeNavigator otherNode)
        {
            if (thisNode.Options ["GroupByType"]) {

            }
            return DefaultSort;
        }
开发者ID:Kalnor,项目名称:monodevelop,代码行数:7,代码来源:EventNodeBuilder.cs


示例13: CompareObjects

		public override int CompareObjects (ITreeNavigator thisNode, ITreeNavigator otherNode)
		{
			if (otherNode.DataItem is ProjectFolder)
				return 1;
			else
				return DefaultSort;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:7,代码来源:SystemFileNodeBuilder.cs


示例14: GetNodeName

		public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
		{
			TranslationProject project = dataObject as TranslationProject;
			if (project == null)
				return "TranslationProject";
			return project.Name;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:7,代码来源:TranslationProjectNodeBuilder.cs


示例15: CompareObjects

		public override int CompareObjects (ITreeNavigator thisNode, ITreeNavigator otherNode)
		{
			if (otherNode.NodeName == ".NET Portable Subset") {
				return 1;
			}
			return -1;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:7,代码来源:ProjectReferencesFromPackagesFolderNodeBuilder.cs


示例16: GetAddinData

		public AddinData GetAddinData (ITreeNavigator nav)
		{
			DotNetProject p = (DotNetProject) nav.GetParentDataItem (typeof(DotNetProject), true);
			if (p == null)
				return null;
			return p.GetAddinData ();
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:7,代码来源:ExtensionModelTypeNodeBuilder.cs


示例17: CompareObjects

		public override int CompareObjects (ITreeNavigator thisNode, ITreeNavigator otherNode)
		{
			AddinDescription ad1 = thisNode.DataItem as AddinDescription;
			AddinDescription ad2 = otherNode.DataItem as AddinDescription;
			if (ad1 != null && ad2 != null)
				return Util.GetDisplayName (ad1).CompareTo (Util.GetDisplayName (ad2));
			return base.CompareObjects (thisNode, otherNode);
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:8,代码来源:AddinNodeBuilder.cs


示例18: CompareObjects

		public override int CompareObjects (ITreeNavigator thisNode, ITreeNavigator otherNode)
		{
			if (otherNode.DataItem is ProjectReferenceCollection)
				return 1;
			if (otherNode.DataItem is Ide.Gui.Pads.ProjectPad.GettingStartedNode)
				return 1;
			return -1;
		}
开发者ID:kdubau,项目名称:monodevelop,代码行数:8,代码来源:ProjectPackagesFolderNodeBuilder.cs


示例19: GetNodeName

		public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
		{
			RegistryInfo reg = (RegistryInfo) dataObject;
			string name = reg.ApplicationName;
			if (string.IsNullOrEmpty (name))
				name = reg.ApplicationPath;
			return name;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:8,代码来源:RegistryNodeBuilder.cs


示例20: GetNodeAttributes

		/// <summary>
		/// Gets the attributes of the given node. In this case, sets the hidden attribute if the node matches the Connected Services folder in the project root
		/// </summary>
		public override void GetNodeAttributes (ITreeNavigator parentNode, object dataObject, ref NodeAttributes attributes)
		{
			var folder = (ProjectFolder)dataObject;

			if (parentNode != null && parentNode.DataItem is DotNetProject && folder.Path.FileName == ConnectedServices.ProjectStateFolderName)
			{
				attributes |= NodeAttributes.Hidden;
			}
		}
开发者ID:PlayScriptRedux,项目名称:monodevelop,代码行数:12,代码来源:ConnectedServicesFolderNodeHiderExtension.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# ITreeNode类代码示例发布时间:2022-05-24
下一篇:
C# ITreeItem类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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