JD2022-TU1/main/tools/framework/JD.TeaBoxAddinSystem/Addins/ExtensionNodeChangedEventArgs.cs

61 lines
1.3 KiB
C#

using System;
using JD.TeaBoxAddinSystem.Addins.Internal;
namespace JD.TeaBoxAddinSystem.Addins
{
/// <summary>
/// ExtensionNode Changed EventArgs
/// </summary>
public class ExtensionNodeChangedEventArgs : EventArgs
{
#region Variables
private readonly string m_path;
private readonly TreeNode m_node;
#endregion
#region Constructor
internal ExtensionNodeChangedEventArgs(TreeNode node)
{
System.Diagnostics.Debug.Assert(node != null);
m_path = node.FullPath;
m_node = node;
}
internal ExtensionNodeChangedEventArgs(string path)
{
m_path = path;
m_node = null;
}
#endregion
#region Properties
/// <summary>
/// Path of the node where the change occurs.
/// </summary>
public string Path
{
get
{
return m_path;
}
}
/// <summary>
/// ExtensionNode involved in the change.
/// </summary>
public ExtensionNode ExtensionNode
{
get
{
return m_node == null ? null : m_node.ExtensionNode;
}
}
#endregion
}
}