|
@@ -14,6 +14,7 @@ using System.Threading.Tasks;
|
|
|
using System.Windows.Forms;
|
|
|
using XdDw.App;
|
|
|
using XdDw.App.Api.星地GDOP误差椭圆;
|
|
|
+using XdDw.App.EFContext;
|
|
|
using XzXdDw.App.Model;
|
|
|
|
|
|
namespace XdDw.App.UserControl
|
|
@@ -33,19 +34,28 @@ namespace XdDw.App.UserControl
|
|
|
DtousErr = Convert.ToDouble(txtDtousErr1.Text),
|
|
|
SatLocErr = Convert.ToDouble(txtSatLocErr1.Text),
|
|
|
};
|
|
|
- public X2D1GDOPParam(DateTime sigTime)
|
|
|
+ public X2D1GDOPParam(long cgResID)
|
|
|
{
|
|
|
InitializeComponent();
|
|
|
txtCapTime.UseDefault();
|
|
|
- txtCapTime.DateTime = sigTime;
|
|
|
txtTleMain.UseDoubleClickToSelectAll();
|
|
|
txtTleAdja.UseDoubleClickToSelectAll();
|
|
|
txtStationLocation1.UseDoubleClickToSelectAll();
|
|
|
txtRefLocation1.UseDoubleClickToSelectAll();
|
|
|
|
|
|
- this.txtCapTime.DateTime = sigTime;
|
|
|
- this.txtStationLocation1.Text = TestData.RecLoc;
|
|
|
- this.txtRefLocation1.Text = TestData.RefLoc;
|
|
|
+ List<TxInfo> listTx = new List<TxInfo>();
|
|
|
+ CgRes cg;
|
|
|
+ using (RHDWContext db = new RHDWContext())
|
|
|
+ {
|
|
|
+ listTx = db.TxInfos.ToList();
|
|
|
+ cg = db.CgRes.Where(m => m.ID == cgResID).FirstOrDefault();
|
|
|
+ }
|
|
|
+ var cdbTx = listTx.Find(p => p.TxType == EnumTxType.Cdb);
|
|
|
+ var refTx = listTx.Find(p => p.TxType == EnumTxType.Ref);
|
|
|
+
|
|
|
+ this.txtCapTime.DateTime = cg.SigTime;
|
|
|
+ this.txtStationLocation1.Text = $"{cdbTx.Lon},{cdbTx.Lat}";
|
|
|
+ this.txtRefLocation1.Text = $"{refTx.Lon},{refTx.Lat}";
|
|
|
txtTleMain.UseDefault().SetStringData(TestData.AllTle).Text = TestData.TleMain;
|
|
|
txtTleAdja.UseDefault().SetStringData(TestData.AllTle).Text = TestData.TleAdja1;
|
|
|
this.txtDtousErr1.EditValue = TestData.DtousErr;
|