private void btnOk_Click2(object sender, EventArgs e) { if (_data) { try { using (CalcGpsPointForm form = new CalcGpsPointForm(NmeaData, pointName, pointCN, DAL, currentZone, false)) { form.ShowDialog(); if (form.IsCalaculated && !form.Canceled) { calculated = true; _Point = (GpsPoint)TtUtils.CopyPoint(form._GpsPoint); this.Close(); } else { calculated = false; //do nothing } } } catch { MessageBox.Show("Calculate Point Form Error."); } } else { MessageBox.Show("No Gps points logged."); } }
private void gpsInfoControl1_MiscClick2() { if (pointInfoCtrl.Op == OpType.Take5) { take5InfoCtrl1.Visible = true; gpsInfoControl1.Visible = false; } else if(pointInfoCtrl.Op == OpType.Walk) { walkInfoCtrl1.Visible = true; gpsInfoControl1.Visible = false; } else if (pointInfoCtrl.Op == OpType.GPS) { if (UpdatedPoint != null && TtUtils.PointHasValue(UpdatedPoint)) { List<GpsAccess.NmeaBurst> bursts = DAL.GetNmeaBurstsByPointCN(UpdatedPoint.CN); if (bursts.Count > 0) { using (CalcGpsPointForm form = new CalcGpsPointForm(bursts, UpdatedPoint.PID, UpdatedPoint.CN, DAL, CurrMeta.Zone, true)) { form.ShowDialog(); if (form.IsCalaculated && !form.Canceled) { GpsPoint gpsPoint = form._GpsPoint; GpsPoint currGps = new GpsPoint(UpdatedPoint); currGps.Time = DateTime.Now; currGps.UnAdjX = gpsPoint.UnAdjX; currGps.UnAdjY = gpsPoint.UnAdjY; currGps.UnAdjZ = gpsPoint.UnAdjZ; ////currGps.X = gpsPoint.X; ////currGps.Y = gpsPoint.Y; ////currGps.Z = gpsPoint.Z; currGps.RMSEr = gpsPoint.RMSEr; _UpdatedPoint = currGps; GetConversion(ref _UpdatedPoint); gpsInfoControl1.CurrentPoint = (GpsPoint)UpdatedPoint; _dirty = true; LockControls(true); } } } else { AutoClosingMessageBox.Show("No NMEA data associated with point.", "No NMEA", 1000); } } } }