Ejemplo n.º 1
0
        public static void SuspendDataGridViews()
        {
            WorkTables.SetSheetDataGridViewFocus();

            System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;

            SuspendDataGridViewDrawing();

            void SuspendDataGridViewDrawing()
            {
                NAVForm.SuspendSheetDataGridView();
                ExplorerForm.SuspendResultDataGridView();
            }

        }
Ejemplo n.º 2
0
        private void DeleteColumnMenuItemClick(object sender, System.EventArgs e)
        {
            if (SheetDataGridView.CurrentCell != null)
            {
                DataGridViewColumn FirstVisibleColumn = SheetDataGridView.Columns.GetFirstColumn(DataGridViewElementStates.Visible);
                int iFirstColumnIndex  = FirstVisibleColumn.DisplayIndex;
                int iOwningColumnIndex = SheetDataGridView.CurrentCell.OwningColumn.Index;

                SheetDataGridView.ClearSelection();
                SheetDataGridView.Columns[iOwningColumnIndex].Visible = false;

                if (iFirstColumnIndex == iOwningColumnIndex)
                {
                    ClassLibraryFramework.DataGridViewMethods.SortOnFirstVisibleColumn(SheetDataGridView);
                }

                WorkTables.SetSheetDataGridViewFocus();

                ComparisonReset();
            }
        }
Ejemplo n.º 3
0
        private static void RestoreColumnMenuItemClickEvent()
        {
            DataGridViewColumn firstVisibleColumn = SheetDataGridView.Columns.GetFirstColumn(DataGridViewElementStates.Visible);
            bool bComparisonRebuild = false;

            foreach (DataGridViewColumn column in SheetDataGridView.Columns)
            {
                if (column.Name != Constants.KEY_COLUMN)
                {
                    if (!column.Visible)
                    {
                        column.Visible     = true;
                        bComparisonRebuild = true;
                    }
                }
            }

            if (bComparisonRebuild)
            {
                if (firstVisibleColumn != SheetDataGridView.Columns.GetFirstColumn(DataGridViewElementStates.Visible))
                {
                    ClassLibraryFramework.DataGridViewMethods.SortOnFirstVisibleColumn(SheetDataGridView);
                }

                ComparisonReset();
            }

            if (ExplorerForm.GetResultDataGridView() != null)
            {
                if (ExplorerForm.GetResultDataGridView().Rows.Count == 0)
                {
                    ClassLibraryFramework.DataGridViewMethods.SetBackgroundColour(SheetDataGridView, Constants.COLOR_DEFAULT);
                }
            }

            WorkTables.SetSheetDataGridViewFocus();
        }