ObjectActivatedEventArgs.cs 894 B

1234567891011121314151617181920212223
  1. namespace Terminal.Gui;
  2. /// <summary>Event args for the <see cref="TreeView{T}.ObjectActivated"/> event</summary>
  3. /// <typeparam name="T"></typeparam>
  4. public class ObjectActivatedEventArgs<T> where T : class
  5. {
  6. /// <summary>Creates a new instance documenting activation of the <paramref name="activated"/> object</summary>
  7. /// <param name="tree">Tree in which the activation is happening</param>
  8. /// <param name="activated">What object is being activated</param>
  9. public ObjectActivatedEventArgs (TreeView<T> tree, T activated)
  10. {
  11. Tree = tree;
  12. ActivatedObject = activated;
  13. }
  14. /// <summary>The object that was selected at the time of activation</summary>
  15. /// <value></value>
  16. public T ActivatedObject { get; }
  17. /// <summary>The tree in which the activation occurred</summary>
  18. /// <value></value>
  19. public TreeView<T> Tree { get; }
  20. }