//stop gps private void mItGpsStop_Click(object sender, EventArgs e) { gpsConnector.isClosingGps = true; timerCoordinates.Enabled = false; timerPositionSave.Enabled = false; timerSatelliteView.Enabled = false; map.mapDraw.drawFromStatus = MOBMAP.MAP.MapDraw.DrawFromStatus.NOT_DRAW_FROM; //close coordinates system if (coordinates != null) { coordinates.close(); } if (delaunayListener != null) { delaunayListener.Detach(); } //close gps connection if (gpsConnector != null) { gpsConnector.close(); } gpsConnector = null; //clear data in form clearForm(); mItGpsStart.Enabled = true; mItGpsStop.Enabled = false; }
//start gps private void mItGpsStart_Click(object sender, EventArgs e) { map.mapDraw.isDbReading = false; if (coordinates != null) { coordinates.close(); } if (delaunayListener != null) { delaunayListener.Detach(); } coordinates = new Coordinates.CoordinateSystem(this); delaunayTriangulation = new MOBMAP.Triangulation.DelaunayEventChanged(); delaunayListener = new MOBMAP.Triangulation.DelaunayListEventListener(this, delaunayTriangulation); map.mapDraw.drawFromStatus = MOBMAP.MAP.MapDraw.DrawFromStatus.DRAW_FROM_GPS; mapGoogle = new MOBMAP.MapGoogle.MapGoogle(this.pBoxMap.Width, this.pBoxMap.Height); //create gps connection gpsPositionList = new MOBMAP.GPS.Position <GpsPosition>(this); timerCoordinates.Enabled = true; timerPositionSave.Enabled = true; timerSatelliteView.Enabled = true; coordinates = new Coordinates.CoordinateSystem(this); gpsConnector = new GPS.GpsConnector(this); gpsConnector.isClosingGps = false; mItGpsStart.Enabled = false; mItGpsStop.Enabled = true; }
//stop gps private void mItGpsStop_Click(object sender, EventArgs e) { gpsConnector.isClosingGps = true; timerCoordinates.Enabled = false; timerPositionSave.Enabled = false; timerSatelliteView.Enabled = false; map.mapDraw.drawFromStatus = MOBMAP.MAP.MapDraw.DrawFromStatus.NOT_DRAW_FROM; //close coordinates system if (coordinates != null) coordinates.close(); if (delaunayListener != null) delaunayListener.Detach(); //close gps connection if (gpsConnector != null) gpsConnector.close(); gpsConnector = null; //clear data in form clearForm(); mItGpsStart.Enabled = true; mItGpsStop.Enabled = false; }
//start gps private void mItGpsStart_Click(object sender, EventArgs e) { map.mapDraw.isDbReading = false; if (coordinates != null) coordinates.close(); if (delaunayListener != null) delaunayListener.Detach(); coordinates = new Coordinates.CoordinateSystem(this); delaunayTriangulation = new MOBMAP.Triangulation.DelaunayEventChanged(); delaunayListener = new MOBMAP.Triangulation.DelaunayListEventListener(this, delaunayTriangulation); map.mapDraw.drawFromStatus = MOBMAP.MAP.MapDraw.DrawFromStatus.DRAW_FROM_GPS; mapGoogle = new MOBMAP.MapGoogle.MapGoogle(this.pBoxMap.Width, this.pBoxMap.Height); //create gps connection gpsPositionList = new MOBMAP.GPS.Position<GpsPosition>(this); timerCoordinates.Enabled = true; timerPositionSave.Enabled = true; timerSatelliteView.Enabled = true; coordinates = new Coordinates.CoordinateSystem(this); gpsConnector = new GPS.GpsConnector(this); gpsConnector.isClosingGps = false; mItGpsStart.Enabled = false; mItGpsStop.Enabled = true; }
public GpsEvents(GpsConnector gpsConnector) { this.gpsConnector = gpsConnector; }