void DoRowHeaderHover(HitTestInformation hi) { IsMouseOverRowHeaders = true; _excel.MouseOverRowIndex = hi.HeaderInfo.Row; if (hi.HeaderInfo.InRowResize) { _excel.MouseOverRowIndex = -1; } _excel.UpdateRowHeaderCellsState(hi.HeaderInfo.Row, _excel.ActiveSheet.RowHeader.ColumnCount - 1, 1, 1); }
void DoColumnHeaderHover(HitTestInformation hi) { IsMouseOverColumnHeaders = true; _excel.MouseOverColumnIndex = hi.HeaderInfo.Column; if (hi.HeaderInfo.InColumnResize) { _excel.MouseOverColumnIndex = -1; } _excel.UpdateColumnHeaderCellsState(_excel.ActiveSheet.ColumnHeader.RowCount - 1, hi.HeaderInfo.Column, 1, 1); }
public void DoHover(HitTestInformation hi) { if (!object.ReferenceEquals(_oldHi, hi)) { IsMouseOverCornerHeaders = false; IsMouseOverRowHeaders = false; IsMouseOverColumnHeaders = false; IsMouseOverViewports = false; if (_oldHi != null) { switch (_oldHi.HitTestType) { case HitTestType.RowHeader: _excel.UpdateRowHeaderCellsState(_oldHi.HeaderInfo.Row, _excel.ActiveSheet.RowHeader.ColumnCount - 1, 1, 1); break; case HitTestType.ColumnHeader: _excel.UpdateColumnHeaderCellsState(_excel.ActiveSheet.ColumnHeader.RowCount - 1, _oldHi.HeaderInfo.Column, 1, 1); break; case HitTestType.Corner: _excel.UpdateCornerHeaderCellState(); break; } } switch (hi.HitTestType) { case HitTestType.Corner: DoCornerHeaderHover(hi); break; case HitTestType.RowHeader: DoRowHeaderHover(hi); break; case HitTestType.ColumnHeader: DoColumnHeaderHover(hi); break; case HitTestType.Viewport: IsMouseOverViewports = true; break; } _oldHi = hi; } }
void DoCornerHeaderHover(HitTestInformation hi) { IsMouseOverCornerHeaders = true; _excel.UpdateCornerHeaderCellState(); }