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.BringIntoView();
                }
                else
                {
                    sfw.Show();
                    sfw.Owner     = this;
                    sfw.ShapeFile = MapLayersHandler.CurrentMapLayer.LayerObject as Shapefile;
                    sfw.ShowShapeFileAttribute();
                }
                MapWindowManager.ShapeFileAttributesWindow = sfw;
                break;

            case "buttonRemove":
                break;

            case "buttonAdd":
                break;
            }
        }
Exemple #2
0
 public static ShapeFileAttributesWindow GetInstance(MapInterActionHandler mapInterActionHandler)
 {
     if (_instance == null)
     {
         _instance = new ShapeFileAttributesWindow(mapInterActionHandler);
     }
     return(_instance);
 }
Exemple #3
0
 private void OnWindowClosing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     CleanUp();
     this.SavePlacement();
     MapWindowManager.ShapeFileAttributesWindow = null;
     MapWindowManager.MapWindowForm.Focus();
     _instance = null;
 }
Exemple #4
0
 private void CleanUp()
 {
     _instance = null;
     _mapInterActionHandler.ShapesSelected   -= _mapInterActionHandler_ShapesSelected;
     _mapInterActionHandler.SelectionCleared -= _mapInterActionHandler_SelectionCleared;
     _mapInterActionHandler.MapLayersHandler.CurrentLayer         -= MapLayersHandler_CurrentLayer;
     _mapInterActionHandler.MapLayersHandler.AllSelectionsCleared -= MapLayersHandler_AllSelectionsCleared;
     _mapInterActionHandler = null;
 }
Exemple #5
0
 private void OnWindowClosed(object sender, EventArgs e)
 {
     //CleanUp();
     //this.SavePlacement();
     //MapWindowManager.ShapeFileAttributesWindow = null;
     //if (MapWindowManager.MapWindowForm != null)
     //{
     //    MapWindowManager.MapWindowForm.Focus();
     //}
     _instance = null;
 }