public virtual void OnMouseEnter(Point point) { System.Diagnostics.Trace.Assert(currentItem == null && currentRow == null); if (point.Y > RowHeight + Padding.Vertical) { Point rowRelativePoint; currentRow = SelectChild(point, out rowRelativePoint); if (currentRow == null) { return; } currentRow.OnMouseEnter(rowRelativePoint); } else { Point itemRelativePoint; currentItem = GetItemFromPosition(point, out itemRelativePoint); if (currentItem == null) { return; } currentItem.OnMouseEnter(itemRelativePoint); } }
protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (level1ColWidths == null) { level1ColWidths = level1Widths(); } Point rowRelativePoint; CustomListRow row = getRowFromPoint(e.Location, out rowRelativePoint); if (row != null && row == currentRow) { currentRow.OnMouseMove(rowRelativePoint); return; } if (currentRow != null) { currentRow.OnMouseLeave(); } currentRow = row; if (currentRow != null) { currentRow.OnMouseEnter(rowRelativePoint); } }
public virtual void OnMouseMove(Point point) { System.Diagnostics.Trace.Assert(currentItem == null || currentRow == null); if (point.Y > RowHeight + Padding.Vertical) { if (currentItem != null) { currentItem.OnMouseLeave(); currentItem = null; } Point rowRelativePoint; CustomListRow row = SelectChild(point, out rowRelativePoint); if (row != null && currentRow == row) { currentRow.OnMouseMove(rowRelativePoint); return; } if (currentRow != null) currentRow.OnMouseLeave(); currentRow = row; if (currentRow != null) currentRow.OnMouseEnter(rowRelativePoint); } else { if(currentRow != null) { currentRow.OnMouseLeave(); currentRow = null; } Point itemRelativePoint; CustomListItem item = GetItemFromPosition(point, out itemRelativePoint); if (item != null && currentItem == item) { currentItem.OnMouseMove(itemRelativePoint); return; } if (currentItem != null) currentItem.OnMouseLeave(); currentItem = item; if (currentItem != null) currentItem.OnMouseEnter(itemRelativePoint); } }
public virtual void OnMouseEnter(Point point) { System.Diagnostics.Trace.Assert(currentItem == null && currentRow == null); if (point.Y > RowHeight + Padding.Vertical) { Point rowRelativePoint; currentRow = SelectChild(point, out rowRelativePoint); if (currentRow == null) return; currentRow.OnMouseEnter(rowRelativePoint); } else { Point itemRelativePoint; currentItem = GetItemFromPosition(point, out itemRelativePoint); if (currentItem == null) return; currentItem.OnMouseEnter(itemRelativePoint); } }
public virtual void OnMouseMove(Point point) { System.Diagnostics.Trace.Assert(currentItem == null || currentRow == null); if (point.Y > RowHeight + Padding.Vertical) { if (currentItem != null) { currentItem.OnMouseLeave(); currentItem = null; } Point rowRelativePoint; CustomListRow row = SelectChild(point, out rowRelativePoint); if (row != null && currentRow == row) { currentRow.OnMouseMove(rowRelativePoint); return; } if (currentRow != null) { currentRow.OnMouseLeave(); } currentRow = row; if (currentRow != null) { currentRow.OnMouseEnter(rowRelativePoint); } } else { if (currentRow != null) { currentRow.OnMouseLeave(); currentRow = null; } Point itemRelativePoint; CustomListItem item = GetItemFromPosition(point, out itemRelativePoint); if (item != null && currentItem == item) { currentItem.OnMouseMove(itemRelativePoint); return; } if (currentItem != null) { currentItem.OnMouseLeave(); } currentItem = item; if (currentItem != null) { currentItem.OnMouseEnter(itemRelativePoint); } } }
protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (level1ColWidths == null) level1ColWidths = level1Widths(); Point rowRelativePoint; CustomListRow row = getRowFromPoint(e.Location, out rowRelativePoint); if (row != null && row == currentRow) { currentRow.OnMouseMove(rowRelativePoint); return; } if (currentRow != null) currentRow.OnMouseLeave(); currentRow = row; if (currentRow != null) currentRow.OnMouseEnter(rowRelativePoint); }