Example #1
0
        void MainForm_Closing(object sender, CancelEventArgs e)
        {
            isBusy = true;
            if ((listViewRegs.Visible && cache.IsTempRegsListChanged()) ||
                listViewDefs.Visible || listViewConts.Visible)
            {
                MessageBox.Show("Для завершения работы перейдите к списку изделий",
                                "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Exclamation,
                                MessageBoxDefaultButton.Button1);
                isBusy   = false;
                e.Cancel = true;
                return;
            }
            ExitForm form = new ExitForm();

            if (form.ShowDialog() == DialogResult.Cancel)
            {
                isBusy   = false;
                e.Cancel = true;
                return;
            }
            //if (dcdEvent.IsListening) dcdEvent.StopScanListener();
            cache.SaveCache();
        }
        public static void ShowExitMessage()
        {
            ExitForm ExitMessage = new ExitForm(); /* Create object */

            ExitMessage.ShowDialog();              /* Show message */
        }