private void backgroundWorker2_DoWork(object sender, DoWorkEventArgs e) { if (calculater == null) { Geo.Utils.FormUtil.ShowWarningMessageBox("请先读取数据。"); return; } var coordStr = this.namedStringControlCoord.GetValue(); double val = 0; if (this.radioButtonLonLat.Checked) { var radius = HeightOnSphere + AveRadiusOfEarch; LonLat lonlat = LonLat.Parse(coordStr); val = calculater.GetValue(maxOrder, lonlat, radius); } else { XYZ lonlat = XYZ.Parse(coordStr); var polar = Geo.Coordinates.CoordTransformer.XyzToPolar(lonlat); val = calculater.GetValue(maxOrder, polar); } var span = DateTime.Now - Start; Geo.Utils.FormUtil.SetText(this.richTextBoxControl1, "计算值:" + val + ",耗时 : " + span + ""); log.Info("计算完毕! ,计算值:" + val + ",耗时 : " + span + ""); }
private void button_lonlatToGauss_Click(object sender, EventArgs e) { var strs = this.richTextBoxControl_lonlat.Lines; var inputs = new List <LonLat>(); foreach (string item in strs) { if (String.IsNullOrWhiteSpace(item)) { continue; } inputs.Add(LonLat.Parse(item)); } var results = new List <XY>(); double orinalLonDeg = this.namedFloatControl_orinalLonDeg.GetValue(); foreach (var item in inputs) { var longlat = Coordinates.CoordTransformer.LonLatToGaussXy(item, AveGeoHeight, BeltWidth3Or6, ref orinalLonDeg, IsIndicateOriginLon, Ellipsoid, YConst, AngleUnit, IsWithBeltNum); results.Add(longlat); } this.namedFloatControl_orinalLonDeg.SetValue(orinalLonDeg); var spliter = IsOutSplitByTab ? "\t" : ", "; StringBuilder sb = new StringBuilder(); foreach (var item in results) { sb.AppendLine(item.ToString("0.000000", spliter)); } this.richTextBoxControl_gauss.Text = sb.ToString(); }
private void button_calculate_Click(object sender, EventArgs e) { Time time = new Time(this.namedTimeControl1.GetValue()); LonLat geoCoord = LonLat.Parse(this.namedStringControl1_geoCoord.GetValue()); var result = this.IonoFileService.Get(time, geoCoord); this.richTextBoxControl1.Text = result.ToString(); }