ACAT.Extensions.Default.UI.Scanners.TalkApplicationScannerQwerty55Keys.createAndShowScanner C# (CSharp) Method

createAndShowScanner() private method

Creates and shows the specified scanner
private createAndShowScanner ( String panelClass, Form form ) : bool
panelClass String type of the scanner
form System.Windows.Forms.Form
return bool
        private bool createAndShowScanner(String panelClass, Form form)
        {
            bool retVal = true;

            form.Invoke(new MethodInvoker(delegate()
            {
                IPanel panel = Context.AppPanelManager.CreatePanel(panelClass) as IPanel;

                if (panel != null)
                {
                    _disableAllButtons = true;
                    _dimScanner = false;
                    IScannerPanel scannerPanel = panel as IScannerPanel;
                    scannerPanel.ScannerCommon.PositionSizeController.DockScanner(form.Handle, Windows.WindowPosition.TopRight);
                    Context.AppPanelManager.Show(form as IPanel, panel);
                }
                else
                {
                    retVal = false;
                }
            }));

            return retVal;
        }