예제 #1
0
        /// <summary>
        /// 是否存在面shp
        /// </summary>
        /// <param name="lyr"></param>
        /// <returns></returns>
        private bool ShpPolygonLyrExits(ShpPolygonLayer lyr)
        {
            ShpPolygonLayerList lst = ShpPolygonConfig.ReadConfigFile();

            if (lst == null || lst.Count == 0)
            {
                return(false);
            }
            foreach (var item in lst.LayerList)
            {
                if (item.LayerName == lyr.LayerName)
                {
                    return(true);
                }
            }
            return(false);
        }
예제 #2
0
        private bool GetLayerVisiableInConfig(string lyrName)
        {
            ShpLineLayerList lineList = ShpLineConfig.ReadConfigFile();

            if (lineList != null)
            {
                foreach (ShpLineLayer lineLayer in lineList.LayerList)
                {
                    if (lineLayer.LayerName == lyrName)
                    {
                        return(lineLayer.Visible);
                    }
                }
            }

            ShpPointLayerList PointList = ShpPointConfig.ReadConfigFile();

            if (PointList != null)
            {
                foreach (ShpPointLayer PointLayer in PointList.LayerList)
                {
                    if (PointLayer.LayerName == lyrName)
                    {
                        return(PointLayer.Visible);
                    }
                }
            }

            ShpPolygonLayerList PolygonList = ShpPolygonConfig.ReadConfigFile();

            if (PolygonList != null)
            {
                foreach (ShpPolygonLayer PolygonLayer in PolygonList.LayerList)
                {
                    if (PolygonLayer.LayerName == lyrName)
                    {
                        return(PolygonLayer.Visible);
                    }
                }
            }

            return(false);
        }