/// <summary> /// Clears all map layers. /// </summary> public void ClearMapLayers() { AllocationLayers.Clear(); foreach (var allocationMap in AllocationMaps.Values) { allocationMap.Invalidate(); } }
/// <summary> /// Adds a map layer. /// </summary> /// <param name="layer">The layer.</param> public void AddMapLayer(AllocationLayer layer) { AllocationLayers.Add(layer); foreach (var allocationMap in AllocationMaps.Values) { allocationMap.Invalidate(); } }
/// <summary> /// Removes a layer. /// </summary> /// <param name="name">The name of the layer to remove</param> /// <returns></returns> public bool RemoveLayer(string name) { var existing = AllocationLayers.Find(delegate(AllocationLayer layer) { return(layer.Name == name); }); if (existing != null) { AllocationLayers.Remove(existing); foreach (var allocationMap in AllocationMaps.Values) { allocationMap.Invalidate(); } return(true); } else { return(false); } }