示例#1
0
        public int GetLayerIndex(string layerName)
        {
            for (int i = 0; i < GraphicsLayers.Count(); i++)
            {
                if (GraphicsLayers.ElementAt(i) == layerName)
                {
                    return(i);
                }
            }

            return(-1);
        }
示例#2
0
        public void RemoveLayer(string layerName)
        {
            for (int i = 0; i < GraphicsLayers.Count(); i++)
            {
                if (GraphicsLayers.ElementAt(i) == layerName)
                {
                    GraphicsLayers.RemoveAt(i);

                    InvalidateDraw();

                    break;
                }
            }
        }