Exemple #1
0
        private void OldCustomers_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
                this.Visible = false;
            }
            else if (e.Control && e.KeyCode == Keys.F)
            {
                List <DataGridView> bufferGrid = new List <DataGridView>(StockManagementMenu.SheetGridHolder);

                bufferGrid.Add(DefaultSheet);

                StockManagementMenu.AdvancedSearchWindow(DefaultSheet, false, this.Text, bufferGrid);
            }
        }
Exemple #2
0
        private void OldCustomers_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (e.CloseReason != CloseReason.FormOwnerClosing)
            {
                e.Cancel = true;

                if (StockManagementMenu.SearchWindowMenu != null && StockManagementMenu.SearchWindowMenu.Visible)
                {
                    StockManagementMenu.AdvancedSearchWindow(StockManagementMenu.CurrentSheetGrid, true, StockManagementMenu.CurrentSheetGrid.Tag.ToString(), StockManagementMenu.SheetGridHolder);
                }

                this.Visible = false;
                this.Owner.BringToFront();
            }
        }