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


C# ITreeNavigator类代码示例

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


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


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