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


C# Tree.TreePath类代码示例

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


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

示例1: GetChildren

 public override System.Collections.IEnumerable GetChildren(TreePath treePath)
 {
     Task t= treePath.LastNode as Task;
     if(t==null)
         return new List<Task>(this.projects);
     return t.Tasks;
 }
开发者ID:masterspambot,项目名称:MyProject,代码行数:7,代码来源:TaskTreeModel.cs

示例2: GetChildren

 public System.Collections.IEnumerable GetChildren(TreePath treePath)
 {
     if (treePath.IsEmpty())
     return _list;
        else
     return null;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:7,代码来源:TreeListAdapter.cs

示例3: TreePathEventArgs

		public TreePathEventArgs(TreePath path)
		{
			if (path == null)
				throw new ArgumentNullException();

			_path = path;
		}
开发者ID:ASK-sa,项目名称:ASK.ServEasy,代码行数:7,代码来源:TreePathEventArgs.cs

示例4: IsLeaf

 public override bool IsLeaf(TreePath treePath)
 {
     if (Settings.Default.AreasViewAsList)
         return true;
     Area item = treePath.LastNode as Area;
     return item != null && ((item.ChildAreas != null && item.ChildAreas.Count == 0) | (item.Equipments.Count == 0));
 }
开发者ID:Winsor,项目名称:ITInfra,代码行数:7,代码来源:AreasTreeModel_.cs

示例5: HandleModelChanged

 protected override void HandleModelChanged(object sender, ModelChangedArgs e) {
     TreePath treePath = new TreePath(view.Tree.Root);
     switch (e.Context) {
         case EventContext.WorkitemPropertiesUpdatedFromView:
             HandleWorkitemPropertiesUpdated(PropertyUpdateSource.WorkitemView);
             break;
         case EventContext.WorkitemPropertiesUpdatedFromPropertyView:
             HandleWorkitemPropertiesUpdated(PropertyUpdateSource.WorkitemPropertyView);
             break;
         case EventContext.WorkitemsChanged:
             treePath = view.Tree.GetPath(view.CurrentNode.Level == 2 ? view.CurrentNode.Parent : view.CurrentNode);
             model.InvokeStructureChanged(treePath);
             break;
         case EventContext.VirtualWorkitemRemoved:
             treePath = view.Tree.GetPath(view.CurrentNode.Parent??view.Tree.Root);
             model.InvokeStructureChanged(treePath);
             break;
         case EventContext.ProjectSelected:
             HandleModelChanged();
             break;
         case EventContext.WorkitemsRequested:
             HandleModelChanged();
             break;
         case EventContext.WorkitemSaved:
             treePath = view.Tree.GetPath(view.CurrentNode.Level == 2 ? view.CurrentNode.Parent : view.CurrentNode);
             model.InvokeStructureChanged(treePath);
             break;
         case EventContext.WorkitemCacheInvalidated:
             assetCache.Drop();
             break;
         default:
             throw new NotSupportedException();
     }
 }
开发者ID:cagatayalkan,项目名称:VersionOne.Client.VisualStudio,代码行数:34,代码来源:WorkitemTreeController.cs

示例6: IsLeaf

        public bool IsLeaf(TreePath treePath)
        {
            if (treePath.IsEmpty())
            {
                var relations = _dataService.GetRelations(null);
                return relations == null || !relations.Any();
            }

            if (treePath.LastNode is DbItem)
            {
                var item = treePath.LastNode as DbItem;
                var relations = _dataService.GetRelations(item.Id);
                return relations == null || !relations.Any();
            }
            else if (treePath.LastNode is DbRelation)
            {
                var relation = treePath.LastNode as DbRelation;
                if (relation.ToId != null)
                {
                    var item = _dataService.GetItem(relation.ToId.Value);
                    return item == null;
                }
            }

            return true;
        }
开发者ID:SorenHK,项目名称:sdb,代码行数:26,代码来源:SDBTreeModel.cs

示例7: TreePath

		public TreePath(TreePath parent, object node)
		{
			_path = new object[parent.FullPath.Length + 1];
			for (int i = 0; i < _path.Length - 1; i++)
				_path[i] = parent.FullPath[i];
			_path[_path.Length - 1] = node;
		}
开发者ID:AndrewTPohlmann,项目名称:open-hardware-monitor,代码行数:7,代码来源:TreePath.cs

示例8: FindNode

		public Node FindNode(TreePath path)
		{
			if (path.IsEmpty())
				return this.Root;

            return FindNode(this.Root, path, 0);
		}
开发者ID:john-peterson,项目名称:processhacker,代码行数:7,代码来源:TreeModel.cs

示例9: IsLeaf

 public bool IsLeaf(TreePath path)
 {
     if (path.LastNode != null && path.LastNode is Expression) {
         return !((Expression)path.LastNode).HasChildren();
     }
     return true;
 }
开发者ID:dp0h,项目名称:QuickWatchEx,代码行数:7,代码来源:TreeModel.cs

示例10: GetChildren

 public override IEnumerable GetChildren(TreePath treePath)
 {
     if (treePath.IsEmpty())
     {
         yield return root;
     }
     else if (treePath.LastNode == root)
     {                
         foreach (var pluginDescriptor in PluginDescriptors)
         {
             var pluginNode = new PluginNode(pluginDescriptor);
             root.Nodes.Add(pluginNode);
             foreach (var file in pluginDescriptor.FilePaths)
             {
                 var fullPath = Path.Combine(pluginDescriptor.BaseDirectory.FullName, file);
                 var exists = fileSystem.FileExists(fullPath);
                 pluginNode.Nodes.Add(new FileNode(file, exists));
             }
             yield return pluginNode;
         }
     }
     else if (treePath.LastNode is PluginNode)
     {
         var pluginNode = (PluginNode) treePath.LastNode;
         foreach (var child in pluginNode.Nodes)
         {
             yield return child;
         }
     }
 }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:30,代码来源:PluginTreeModel.cs

示例11: IsLeaf

 public override bool IsLeaf(TreePath treePath)
 {
     DataRowNode n = treePath.LastNode as DataRowNode;
     if (n.Row["IsFolder"] == DBNull.Value)
         return false;
     return !Convert.ToBoolean(n.Row["IsFolder"]);
 }
开发者ID:montague247,项目名称:treeviewadv,代码行数:7,代码来源:DataTableTreeModel.cs

示例12: ReportRenamed

 private void ReportRenamed(string oldReportName, string newReportName)
 {
     var treePath = new TreePath(new[] { projectRoot, reportsNode });
     OnNodesRemoved(new TreeModelEventArgs(treePath, new[] { new ReportNode(oldReportName) }));
     OnNodesInserted(new TreeModelEventArgs(treePath, new[] { 0 }, 
         new[] { new ReportNode(newReportName) }));
 }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:7,代码来源:ProjectTreeModel.cs

示例13: FindNode

 public Node FindNode(TreePath path)
 {
     if (path.IsEmpty())
         return _root;
     else
         return FindNode(_root, path, 0);
 }
开发者ID:Celtech,项目名称:BolDevStudio,代码行数:7,代码来源:TreeModel.cs

示例14: GetChildren

        public override System.Collections.IEnumerable GetChildren(TreePath treePath)
        {
            List<DataRowNode> items = new List<DataRowNode>();

            if (treePath.IsEmpty() )
            {
                items.Add(m_root);
            }
            else
            {
                DataRowNode n = treePath.LastNode as DataRowNode;

                DataRow row = n.Row;
                int id = Convert.ToInt32(row[m_IDColumnName]);

                DataRow[] rows = m_table.Select("ParentID = " + id+" and "+m_IDColumnName+" <> "+id);
                foreach (DataRow r in rows)
                {
                    DataRowNode node = new DataRowNode(r,r["Name"].ToString());
                    node.Row = r;
                    //SampleApp.Properties.Resources.ResourceManager.
                    //node.Icon = new Bitmap(SampleApp.Properties.Resources.Records,new Size(15,15));
                    items.Add(node);
                }
            }
            return items;
        }
开发者ID:kanbang,项目名称:Colt,代码行数:27,代码来源:DataTableTreeModel.cs

示例15: GetChildren

        public System.Collections.IEnumerable GetChildren(TreePath treePath)
        {
            this.InitAssemblyCache();
            List<BaseItem> items = new List<BaseItem>();

            BaseItem parentItem = treePath.LastNode as BaseItem;
            TypeItem parentTypeItem = parentItem as TypeItem;
            NamespaceItem parentNamespaceItem = parentItem as NamespaceItem;

            Type parentType = parentTypeItem != null ? parentTypeItem.TypeInfo : this.baseType;
            string parentName = parentNamespaceItem != null ? parentNamespaceItem.Name : null;

            if (this.showNamespaces && parentTypeItem == null)
            {
                foreach (string subName in this.GetSubNamespaces(parentName))
                {
                    items.Add(new NamespaceItem(subName, parentItem));
                }
            }
            if (!this.showNamespaces || parentName != null)
            {
                foreach (Assembly assembly in this.assemblies)
                {
                    foreach (Type exportedType in assembly.GetExportedTypes())
                    {
                        if (this.showNamespaces && exportedType.Namespace != parentName) continue;
                        if (exportedType.BaseType != parentType && (!parentType.IsInterface || !exportedType.GetInterfaces().Contains(parentType))) continue;
                        if (this.filter != null && !this.filter(exportedType)) continue;
                        items.Add(new TypeItem(exportedType, parentItem));
                    }
                }
            }

            return items;
        }
开发者ID:CKoewing,项目名称:duality,代码行数:35,代码来源:TypeBrowserTreeModel.cs


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