private void BuildCellEvent(CellEventArgs args, Point location)
{
OlvListViewHitTestInfo hitTest = this.OlvHitTest(location.X, location.Y);
args.HitTest = hitTest;
args.ListView = this;
args.Location = location;
args.Item = hitTest.Item;
args.SubItem = hitTest.SubItem;
args.Model = hitTest.RowObject;
args.ColumnIndex = hitTest.ColumnIndex;
args.Column = hitTest.Column;
if (hitTest.Item != null)
args.RowIndex = hitTest.Item.Index;
args.ModifierKeys = Control.ModifierKeys;
// In non-details view, we want any hit on an item to act as if it was a hit
// on column 0 -- which, effectively, it was.
if (args.Item != null && args.ListView.View != View.Details) {
args.ColumnIndex = 0;
args.Column = args.ListView.GetColumn(0);
args.SubItem = args.Item.GetSubItem(0);
}
}