mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
b02427417c
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@5614 21ef857c-d57f-4fe0-8362-d861dc6d29cd
61 lines
984 B
C#
61 lines
984 B
C#
using System;
|
|
using System.Text;
|
|
using System.Collections.ObjectModel;
|
|
|
|
namespace Aga.Controls.Tree
|
|
{
|
|
public class TreePath
|
|
{
|
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")]
|
|
public static readonly TreePath Empty = new TreePath();
|
|
|
|
private object[] _path;
|
|
public object[] FullPath
|
|
{
|
|
get { return _path; }
|
|
}
|
|
|
|
public object LastNode
|
|
{
|
|
get
|
|
{
|
|
if (_path.Length > 0)
|
|
return _path[_path.Length - 1];
|
|
else
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public object FirstNode
|
|
{
|
|
get
|
|
{
|
|
if (_path.Length > 0)
|
|
return _path[0];
|
|
else
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public TreePath()
|
|
{
|
|
_path = new object[0];
|
|
}
|
|
|
|
public TreePath(object node)
|
|
{
|
|
_path = new object[] { node };
|
|
}
|
|
|
|
public TreePath(object[] path)
|
|
{
|
|
_path = path;
|
|
}
|
|
|
|
public bool IsEmpty()
|
|
{
|
|
return (_path.Length == 0);
|
|
}
|
|
}
|
|
}
|