GetConfigFileForScreen() public static method

Returns the config file for the specified Type that represents a scanner
public static GetConfigFileForScreen ( Type type ) : String
type System.Type Type of the scanner
return String
コード例 #1
0
ファイル: ScannerCommon.cs プロジェクト: angellcq/src
        /// <summary>
        /// Performs initialization.  Reads the config file for the form, creates
        /// the animation manager, widget manager, loads in  all the widgets,
        /// subscribes to events
        /// Call this function in the Initialize() function in the scanner.
        /// </summary>
        /// <param name="startupArg"></param>
        /// <returns></returns>
        public bool Initialize(StartupArg startupArg)
        {
            Log.Debug("Entered from Initialize");

            Glass.Enable = CoreGlobals.AppPreferences.EnableGlass;

            Glass.EvtShowGlass += Glass_EvtShowGlass;

            StartupArg = startupArg;

            ScannerForm.AutoScaleMode = AutoScaleMode.None;

            ScannerForm.TopMost = true;

            Windows.ShowWindowBorder(ScannerForm,
                                     CoreGlobals.AppPreferences.ScannerShowBorder,
                                     CoreGlobals.AppPreferences.ScannerShowTitleBar ? ScannerForm.Text : String.Empty);

            Windows.EvtWindowPositionChanged += Windows_EvtWindowPositionChanged;

            ScannerForm.SizeChanged += ScannerForm_SizeChanged;

            subscribeTalkWindowManager();

            ScannerForm.Shown          += form_Shown;
            ScannerForm.VisibleChanged += form_VisibleChanged;

            _dialogMode = startupArg.DialogMode;

            var configFile = startupArg.ConfigFileName;

            if (String.IsNullOrEmpty(configFile))
            {
                configFile = PanelConfigMap.GetConfigFileForScreen(ScannerForm.GetType());
            }

            bool retVal = initWidgetManager(configFile);

            if (retVal)
            {
                retVal = initAnimationManager(configFile);
            }

            if (retVal)
            {
                createIdleTimer();
            }

            PositionSizeController.Initialize();

            PositionSizeController.AutoSetPosition();

            _windowOverlapWatchdog = new WindowOverlapWatchdog(ScannerForm);

            WindowActivityMonitor.EvtWindowMonitorHeartbeat += WindowActivityMonitor_EvtWindowMonitorHeartbeat;

            Log.Debug("Returning from Initialize");
            return(retVal);
        }
コード例 #2
0
 /// <summary>
 /// Returns the config file for this form.
 /// </summary>
 /// <returns></returns>
 private String getConfigFile()
 {
     return(!String.IsNullOrEmpty(_panelName) ?
            PanelConfigMap.GetConfigFileForPanel(_panelName) :
            PanelConfigMap.GetConfigFileForScreen(_form.GetType()));
 }