Beispiel #1
0
        /// <summary>
        /// 是否存在点shp
        /// </summary>
        /// <param name="lyr"></param>
        /// <returns></returns>
        private bool ShpPointLyrExits(ShpPointLayer lyr)
        {
            ShpPointLayerList lst = ShpPointConfig.ReadConfigFile();

            if (lst == null || lst.Count == 0)
            {
                return(false);
            }
            foreach (var item in lst.LayerList)
            {
                if (item.LayerName == lyr.LayerName)
                {
                    return(true);
                }
            }
            return(false);
        }
Beispiel #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);
        }