Ejemplo n.º 1
0
        /// <summary>
        /// 隐藏
        /// </summary>
        /// <param name="isVisible"></param>
        public void SetVisible(bool isVisible)
        {
            if (this.isVisible == isVisible)
            {
                return;
            }
            ILayer layer = mapFactory.GetLayerByName(this.BelongLayer.LayerName);
            CompositeGraphicsLayerClass graphLayer = layer as CompositeGraphicsLayerClass;

            if (graphLayer == null)
            {
                return;
            }

            Dosomething((Action)(delegate
            {
                if (isVisible)//显示
                {
                    graphLayer.AddElement(this, 1);
                }
                else
                {
                    graphLayer.DeleteElement(this);
                }

                Update();
            }), true);

            this.isVisible = isVisible;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 显示隐藏
        /// </summary>
        /// <param name="isVisible"></param>
        public void SetVisible(bool isVisible)
        {
            if (this.isVisible == isVisible)
            {
                return;
            }
            ILayer layer = factoryArcMap.GetLayerByName(belongLayer.LayerName);
            CompositeGraphicsLayerClass graphLayer = layer as CompositeGraphicsLayerClass;

            this.isVisible = isVisible;
            if (isVisible)//显示
            {
                this.Dosomething((Action) delegate()
                {
                    graphLayer.AddElement(this, 1);
                }, true);
            }
            else
            {
                this.Dosomething((Action) delegate()
                {
                    graphLayer.DeleteElement(this);
                }, true);
            }

            Update();
            this.isVisible = isVisible;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 显示隐藏
        /// </summary>
        /// <param name="isVisible"></param>
        public void SetVisible(bool isVisible)
        {
            if (this.isVisible == isVisible)
            {
                return;
            }
            ILayer layer = mapFactory.GetLayerByName(belongLayer.LayerName);
            CompositeGraphicsLayerClass graphLayer = layer as CompositeGraphicsLayerClass;

            this.isVisible = isVisible;
            if (isVisible)//显示
            {
                graphLayer.AddElement(this, 1);
            }
            else
            {
                graphLayer.DeleteElement(this);
            }
            Update();
        }