private void OnToolbarButtonClick(object sender, RoutedEventArgs e) { switch (((Button)sender).Name) { case "buttonAttributes": ShapeFileAttributesWindow sfw = ShapeFileAttributesWindow.GetInstance(MapWindowManager.MapInterActionHandler); if (sfw.Visibility == Visibility.Visible && sfw.Focusable) { sfw.BringIntoView(); sfw.Focus(); } else { sfw.Show(); sfw.Owner = this; sfw.ShapeFile = MapLayersHandler.CurrentMapLayer.LayerObject as Shapefile; sfw.ShowShapeFileAttribute(); } MapWindowManager.ShapeFileAttributesWindow = sfw; break; case "buttonRemove": MapLayersHandler.RemoveLayer(MapLayersHandler.CurrentMapLayer.Handle); break; case "buttonAdd": break; } }
public bool RemoveGrid25Layers() { MapLayersHandler.RemoveLayer("Minor grid"); MapLayersHandler.RemoveLayer("Major grid"); MapLayersHandler.RemoveLayer("Labels"); MapLayersHandler.RemoveLayer("MBR"); ResetGrid(); HasGrid = false; return(true); }