Ejemplo n.º 1
0
        /// <summary>
        /// 查询平台配置参数
        /// </summary>
        /// <param name="pParamName">参数名称或参数分类名(如"子目录\孙目录\参数名称")</param>
        /// <returns>参数值,未找到返回空字符串</returns>
        public string QueryParamValue(string pParamName)
        {
            string        upperName = pParamName.ToUpper();
            WMonitorParam sParam    = null;

            foreach (WMonitorParam sp in _params)
            {
                if (sp.ClassParamName.ToUpper().CompareTo(upperName) == 0)
                {
                    sParam = sp;
                    break;
                }
            }

            if (sParam != null)
            {
                return(sParam.ParamValue);
            }
            return(string.Empty);
        }
Ejemplo n.º 2
0
        public VWPlatformConfig()
        {
            _params = new List <WMonitorParam>();
            WMonitorParam param1 = new WMonitorParam();

            param1.ClassParamName = "系统设置\\地图类型";
            param1.ParamValue     = ConfigurationManager.AppSettings["MapType"];
            _params.Add(param1);

            WMonitorParam param2 = new WMonitorParam();

            param2.ClassParamName = "系统设置\\地图地址";
            param2.ParamValue     = ConfigurationManager.AppSettings["MapAddress"];
            _params.Add(param2);

            WMonitorParam param3 = new WMonitorParam();

            param3.ClassParamName = "系统设置\\默认地图范围";
            param3.ParamValue     = ConfigurationManager.AppSettings["MapDefaultExtent"];
            _params.Add(param3);
        }