Beispiel #1
0
        protected override void OnFormClosed(FormClosedEventArgs e)
        {
            _intercommsClient.Send("MNG_DIS", "PDFSCANSERVICEPIPE");

            Thread.Sleep(1000);

            _intercommsServer.IntercommsMessage -= new IntercommsMessageDelegate(IntercommsMessageHandler);
            _intercommsServer = null;
            _intercommsClient = null;

            _barcodeOptions.Save();
            _directorySettings.Save();

            CleanUp();

            base.OnFormClosed(e);
        }
Beispiel #2
0
        protected override void OnLoad(EventArgs e)
        {
            try
            {
                if (!Init())
                {
                    Close();
                    return;
                }
            }
            catch (Exception ex)
            {
                ShowError(ex);
                Close();
            }

            _intercommsServer = new IntercommsServer();
            _intercommsServer.IntercommsMessage += new IntercommsMessageDelegate(IntercommsMessageHandler);
            _intercommsClient = new IntercommsClient();

            _intercommsServer.Listen("PDFSCANMANAGEPIPE");

            RefreshGridView();

            dataGridView_Click(null, e);

            isExistService = false;
            ServiceController sc;

            try
            {
                sc             = new ServiceController(SERVICE_NAME);
                isExistService = true;
            }
            catch (Exception)
            {
            }

            //tmrServiceCheck.Start();

            base.OnLoad(e);
        }