Exemplo n.º 1
0
        private void CloseScanner()
        {
            if (_fpScanner == null)
            {
                return;
            }

            // StopCapturing();

            _fpScanner.Dispose();
            _fpScanner = null;
        }
Exemplo n.º 2
0
        private void OpenSelectFGDialog()
        {
            CloseScanner();

            //ResetGUI();
            //DisplayMessage("Device configuration");

            try
            {
                SelectFGWindow_new selectFG = new SelectFGWindow_new(this);

                selectFG.ShowDialog();

                if (selectFG.rDialogResult)
                // if (selectFG.ShowDialog()==DialogResult.OK)
                //if (selectFG.rDialogResult.HasValue && selectFG.rDialogResult.Value)
                {
                    var selectedDeviceIdentity = selectFG.SelectedDeviceIdentity;

                    if (_fpScanner != null)
                    {
                        _fpScanner.Dispose();
                        _fpScanner = null;
                    }

                    OpenSelectDeviceDialog(selectedDeviceIdentity);
                }
                else
                {
                    if (_fpScanner == null)
                    {
                        DisplayError("No Frame-Grabber selected.");
                    }
                    //EnableGUI(false);
                }
            }
            catch (Exception ex)
            {
                DisplayError(ex.Message);
            }
        }