当前位置: 首页>>代码示例>>C#>>正文


C# GridPanel.ClearAll方法代码示例

本文整理汇总了C#中GridPanel.ClearAll方法的典型用法代码示例。如果您正苦于以下问题:C# GridPanel.ClearAll方法的具体用法?C# GridPanel.ClearAll怎么用?C# GridPanel.ClearAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GridPanel的用法示例。


在下文中一共展示了GridPanel.ClearAll方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ProcessExtendSelection

        private void ProcessExtendSelection(GridPanel panel, bool extend)
        {
            int startIndex = panel.Columns.GetDisplayIndex(panel.SelectionColumnAnchor);
            int endIndex = panel.Columns.GetDisplayIndex(_HitColumn);

            if (startIndex > endIndex)
            {
                int tempIndex = startIndex;
                startIndex = endIndex;
                endIndex = tempIndex;
            }

            if (panel.OnlyColumnsSelected(startIndex, endIndex) == false)
            {
                if (extend == false)
                    panel.ClearAll();

                int[] map = panel.Columns.DisplayIndexMap;

                for (int i = 0; i < map.Length; i++)
                {
                    GridColumn column = panel.Columns[map[i]];

                    if (column.Visible == true)
                    {
                        column.IsSelected =
                            (i >= startIndex && i <= endIndex);
                    }
                }
            }
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:31,代码来源:GridColumnHeader.cs

示例2: InitRowMove

        private void InitRowMove(GridPanel panel)
        {
            if (panel.CanMoveRow == true)
            {
                Capture = true;

                panel.ClearAll();
                IsSelected = true;

                IsReordering = false;

                panel.SelectionRowAnchor = _MouseDownHitRow;
            }
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:14,代码来源:GridRow.cs

示例3: ProcessInRowHeaderMouseDown

        private void ProcessInRowHeaderMouseDown(GridPanel panel)
        {
            if (panel.TopLeftHeaderSelectBehavior != TopLeftHeaderSelectBehavior.NoSelection)
            {
                bool select = (_SelectAllCount != panel.SelectionUpdateCount);

                if (select == true)
                {
                    if (panel.MultiSelect == true)
                    {
                        panel.SelectAll();
                    }
                    else if (panel.ActiveRow != null)
                    {
                        panel.ClearAll();
                        panel.ActiveRow.IsSelected = true;
                    }
                }
                else
                {
                    panel.ClearAll();
                }

                if (select == true)
                    _SelectAllCount = panel.SelectionUpdateCount;
            }
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:27,代码来源:GridColumnHeader.cs

示例4: 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);
            }
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:25,代码来源:GridContainer.cs


注:本文中的GridPanel.ClearAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。