本文整理汇总了C#中GridPanel.NormalizeIndices方法的典型用法代码示例。如果您正苦于以下问题:C# GridPanel.NormalizeIndices方法的具体用法?C# GridPanel.NormalizeIndices怎么用?C# GridPanel.NormalizeIndices使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GridPanel
的用法示例。
在下文中一共展示了GridPanel.NormalizeIndices方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessControlExtend
private void ProcessControlExtend(GridPanel panel, bool extend)
{
if (panel.LastProcessedItem == null)
panel.LastProcessedItem = _MouseDownHitRow;
GridContainer lastRow = panel.LastProcessedItem as GridContainer;
if (lastRow != null)
{
int startIndex = lastRow.GridIndex;
int endIndex = _HitItem.GridIndex;
panel.NormalizeIndices(extend,
_AnchorIndex, ref startIndex, ref endIndex);
for (int i = startIndex; i <= endIndex; i++)
{
if (extend == false || i != _AnchorIndex)
panel.SetSelectedRows(i, 1, !panel.IsRowSelected(i));
}
InvalidateRows(panel, startIndex, endIndex, true);
}
}
示例2: ExtendSelection
internal void ExtendSelection(
GridPanel panel, GridContainer endItem, bool extend)
{
int startIndex = panel.SelectionRowAnchor.GridIndex;
int endIndex = endItem.GridIndex;
panel.NormalizeIndices(false, 0, ref startIndex, ref endIndex);
if (panel.OnlyRowsSelected(startIndex, endIndex) == false)
{
if (extend == false)
panel.ClearAllSelected();
else
panel.ClearAll(false);
panel.SetSelectedRows(startIndex, endIndex - startIndex + 1, true);
GridContainer row = GetLastProcessedRow(panel);
if (extend == true && row != null)
startIndex = row.GridIndex;
InvalidateRows(panel, startIndex, endIndex, extend);
}
}