コード例 #1
0
        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;
            }
        }
コード例 #2
0
 public bool RemoveGrid25Layers()
 {
     MapLayersHandler.RemoveLayer("Minor grid");
     MapLayersHandler.RemoveLayer("Major grid");
     MapLayersHandler.RemoveLayer("Labels");
     MapLayersHandler.RemoveLayer("MBR");
     ResetGrid();
     HasGrid = false;
     return(true);
 }