Beispiel #1
0
        private void OnMapperForm_Load(object sender, EventArgs e)
        {
            MapControl = axMap;
            toolstripToolBar.ClickThrough = true;
            Text = "Map";
            global.LoadFormSettings(this);
            _mapLayersHandler = new MapLayersHandler(axMap);
            _mapLayersHandler.OnLayerVisibilityChanged += OnMapLayerVisibilityChanged;
            _mapLayersHandler.CurrentLayer             += OnCurrentMapLayer;
            _mapLayersHandler.LayerRead += OnMapLayerRead;
            _mapInterActionHandler       = new MapInterActionHandler(axMap, _mapLayersHandler)
            {
                MapContextMenuStrip = menuDropDown
            };

            if (global.MappingMode == fad3MappingMode.defaultMode)
            {
                _mapLayersHandler.LoadMapState();
            }
            else
            {
                tsButtonSave.Enabled = false;
            }
            ConfigureMapControl();
            SetCursor(tkCursorMode.cmSelection);
            EventHandler handler = MapperOpen;

            if (handler != null)
            {
                handler(this, EventArgs.Empty);
            }
            global.MappingForm = this;
            MapLegend          = new MapLegend(MapControl, _mapLayersHandler);
        }
Beispiel #2
0
 public static ShapefileAttributesForm GetInstance(MapperForm parentForm, MapInterActionHandler mapInterActionHandler)
 {
     if (_instance == null)
     {
         _instance = new ShapefileAttributesForm(parentForm, mapInterActionHandler);
     }
     return(_instance);
 }
Beispiel #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="parent"></param>
 /// <param name="mapInterActionHandler"></param>
 public ShapefileAttributesForm(MapperForm parent, MapInterActionHandler mapInterActionHandler)
 {
     InitializeComponent();
     MapInterActionHandler            = mapInterActionHandler;
     MapInterActionHandler.Selection += OnLayerSelection;
     MapInterActionHandler.MapLayersHandler.CurrentLayer += OnCurrentLayer;
     _parentForm      = parent;
     _currentMapLayer = MapInterActionHandler.MapLayersHandler.CurrentMapLayer;
 }