using System;
using System.Data;
namespace Terminal.Gui {
///
/// Defines the event arguments for
///
public class SelectedCellChangedEventArgs : EventArgs {
///
/// 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
///
///
public DataTable Table { get; }
///
/// The previous selected column index. May be invalid e.g. when the selection has been changed as a result of replacing the existing Table with a smaller one
///
///
public int OldCol { get; }
///
/// The newly selected column index.
///
///
public int NewCol { get; }
///
/// The previous selected row index. May be invalid e.g. when the selection has been changed as a result of deleting rows from the table
///
///
public int OldRow { get; }
///
/// The newly selected row index.
///
///
public int NewRow { get; }
///
/// Creates a new instance of arguments describing a change in selected cell in a
///
///
///
///
///
///
public SelectedCellChangedEventArgs (DataTable t, int oldCol, int newCol, int oldRow, int newRow)
{
Table = t;
OldCol = oldCol;
NewCol = newCol;
OldRow = oldRow;
NewRow = newRow;
}
}
}