GetConfigFileForPanel() public static method

Returns the name of the animation config file for the specified scanner
public static GetConfigFileForPanel ( String panelClass ) : String
panelClass String scanner name/class
return String
示例#1
0
        /// <summary>
        /// Creates the panel with the specified panel class
        /// </summary>
        /// <param name="panelClass">the panel class</param>
        /// <param name="title">title of the panel</param>
        /// <returns>the form for the panel</returns>
        public Form CreatePanel(String panelClass, String title)
        {
            var startupArg = new StartupArg(panelClass)
            {
                ConfigFileName = PanelConfigMap.GetConfigFileForPanel(panelClass)
            };

            return(CreatePanel(panelClass, title, startupArg));
        }
示例#2
0
        /// <summary>
        /// Initialzies the specified scanner panel
        /// </summary>
        /// <param name="scannerPanel">panel to initialize</param>
        /// <param name="arg">panel arguments</param>
        /// <returns>true on success</returns>
        private bool initializePanel(IScannerPanel scannerPanel, PanelRequestEventArgs arg)
        {
            var startupArg = new StartupArg
            {
                FocusedElement = arg.MonitorInfo.FocusedElement,
                PanelClass     = arg.PanelClass,
                ConfigFileName = PanelConfigMap.GetConfigFileForPanel(arg.PanelClass),
                Arg            = arg.RequestArg
            };

            Log.Debug("panelClass:  " + arg.PanelClass + ", ConfigFIle: " + startupArg.ConfigFileName);
            return(scannerPanel.Initialize(startupArg));
        }
示例#3
0
        /// <summary>
        /// Creates the panel with the specified panel class
        /// </summary>
        /// <param name="panelClass">the panel class</param>
        /// <param name="panelTitle">panel title</param>
        /// <param name="startupArg">statrtup arg for the panel</param>
        /// <returns>the form for the panel</returns>
        public Form CreatePanel(String panelClass, String panelTitle, StartupArg startupArg)
        {
            Log.Debug("panelClass: " + panelClass);
            Form form = CreatePanel(ref panelClass, panelTitle, IntPtr.Zero, null);

            Log.IsNull("Form for this panel ", form);
            if (form is IScannerPanel)
            {
                var scannerPanel = form as IScannerPanel;
                if (String.IsNullOrEmpty(startupArg.ConfigFileName))
                {
                    startupArg.ConfigFileName = PanelConfigMap.GetConfigFileForPanel(panelClass);
                }

                scannerPanel.Initialize(startupArg);
            }

            Log.Debug("Returning form from createPanel");
            return(form);
        }
示例#4
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()));
 }