public int GetLayerIndex(string layerName) { for (int i = 0; i < GraphicsLayers.Count(); i++) { if (GraphicsLayers.ElementAt(i) == layerName) { return(i); } } return(-1); }
public void RemoveLayer(string layerName) { for (int i = 0; i < GraphicsLayers.Count(); i++) { if (GraphicsLayers.ElementAt(i) == layerName) { GraphicsLayers.RemoveAt(i); InvalidateDraw(); break; } } }