CellActivatedEventArgs.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using System.Data;
  3. namespace Terminal.Gui {
  4. /// <summary>
  5. /// Defines the event arguments for <see cref="TableView.CellActivated"/> event
  6. /// </summary>
  7. public class CellActivatedEventArgs : EventArgs {
  8. /// <summary>
  9. /// The current table to which the new indexes refer. May be null e.g. if selection change is the result of clearing the table from the view
  10. /// </summary>
  11. /// <value></value>
  12. public DataTable Table { get; }
  13. /// <summary>
  14. /// The column index of the <see cref="Table"/> cell that is being activated
  15. /// </summary>
  16. /// <value></value>
  17. public int Col { get; }
  18. /// <summary>
  19. /// The row index of the <see cref="Table"/> cell that is being activated
  20. /// </summary>
  21. /// <value></value>
  22. public int Row { get; }
  23. /// <summary>
  24. /// Creates a new instance of arguments describing a cell being activated in <see cref="TableView"/>
  25. /// </summary>
  26. /// <param name="t"></param>
  27. /// <param name="col"></param>
  28. /// <param name="row"></param>
  29. public CellActivatedEventArgs (DataTable t, int col, int row)
  30. {
  31. Table = t;
  32. Col = col;
  33. Row = row;
  34. }
  35. }
  36. }