ObjectActivatedEventArgs.cs 921 B

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