ACAT.Lib.Core.PanelManagement.PanelConfigMap.GetPanelConfigMapEntry C# (CSharp) Method

GetPanelConfigMapEntry() public static method

Returns the config map for the specified scanner. Looks up the preferred config map first to see if there is a config entry that has been specifically configured for the scanner. If not, it looks up the map talbe
public static GetPanelConfigMapEntry ( String panel ) : ACAT.Lib.Core.PanelManagement.PanelConfigMapEntry
panel String Name of the scanner
return ACAT.Lib.Core.PanelManagement.PanelConfigMapEntry
        public static PanelConfigMapEntry GetPanelConfigMapEntry(String panel)
        {
            PanelConfigMapEntry retVal = null;
            List<PanelConfigMapEntry> list = null;

            _mapTable.TryGetValue(panel, out list);

            if (list == null || list.Count <= 0)
            {
                return null;
            }

            var configName = _preferredPanelConfig.GetConfigName(panel);
            if (!String.IsNullOrEmpty(configName))
            {
                retVal = findMapEntryInList(configName, list);
            }

            if (retVal == null)
            {
                retVal = findMapEntryInMapTable(configName);
            }

            if (retVal == null)
            {
                retVal = list[0];
            }

            return retVal;
        }

Usage Example

示例#1
0
        /// <summary>
        /// If the form doesn't have a panel name, call this in the
        /// constructor of the form
        /// </summary>
        /// <returns>true on success</returns>
        public bool Initialize(StartupArg startupArg)
        {
            _panelName = startupArg.PanelClass;

            var panelConfigMapEntry = PanelConfigMap.GetPanelConfigMapEntry(startupArg.PanelClass);

            if (panelConfigMapEntry == null) // did not find the panel
            {
                return(false);
            }

            bool retVal = initWidgetManager(panelConfigMapEntry);

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

            Windows.SetTopMost(_form);

            PanelManager.Instance.EvtScannerShow += Instance_EvtScannerShow;
            Windows.EvtWindowPositionChanged     += Windows_EvtWindowPositionChanged;

            Windows.SetWindowPositionAndNotify(_form, Windows.WindowPosition.CenterScreen);

            _windowOverlapWatchdog = new WindowOverlapWatchdog(_form);

            return(retVal);
        }
All Usage Examples Of ACAT.Lib.Core.PanelManagement.PanelConfigMap::GetPanelConfigMapEntry