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;
}