public MapExtent(Window mapWindow) { _coordSys = InteropHelper.GetMapperCoordSys(mapWindow.ID); // Make note of the current MapBasic Coordinate System, equivalent // to calling: SessionInfo(SESSION_INFO_COORDSYS_CLAUSE) string coordSysSystem = InteropHelper.GetSessionCoordSys(); string distanceUnitSystem = InteropHelper.GetSessionDistanceUnit(); InteropHelper.SetSessionCoordSys(_coordSys); _centerX = InteropHelper.GetMapperCenterX(mapWindow.ID); _centerY = InteropHelper.GetMapperCenterY(mapWindow.ID); _distanceUnit = InteropHelper.GetMapperDistanceUnit(mapWindow.ID); InteropHelper.SetSessionDistanceUnit(_distanceUnit); _zoomWidth = InteropHelper.GetMapperZoom(mapWindow.ID); // Restore the MapBasic Coordinate System to its previous state InteropHelper.SetSessionCoordSys(coordSysSystem); InteropHelper.SetSessionDistanceUnit(distanceUnitSystem); }
public MapWindowExtents(Window mapWindow, Boolean allowWrapAround) { _mapWindow = mapWindow; _extentList = new MapExtentList(_mapWindow, allowWrapAround); }
public MapWindowExtents(Window mapWindow) { _mapWindow = mapWindow; _extentList = new MapExtentList(_mapWindow); }
/// <summary> /// Sets the current zoom of mapper window represented by mapWindow /// </summary> /// <param name="mapWindow">The window to apply the extent on</param> public void SetZoom(Window mapWindow) { InteropHelper.SetView(mapWindow.ID, _zoomWidth, _distanceUnit); }
/// <summary> /// Sets the current view of mapper window represented by mapWindow /// </summary> /// <param name="mapWindow">The window to apply the extent on</param> public void SetExtent(Window mapWindow) { InteropHelper.SetView(mapWindow.ID, _centerX, _centerY, _zoomWidth, _distanceUnit, _coordSys); }
/// <summary> /// Sets the current center of mapper window represented by mapWindow /// </summary> /// <param name="mapWindow">The window to apply the extent on</param> public void SetCenter(Window mapWindow) { InteropHelper.SetView(mapWindow.ID, _centerX, _centerY, _coordSys); }
//------------------------------------------------- #region Constructor public Win32Window(int windowID) { this.ID = windowID; _window = new Windows.Window(windowID); }