瀏覽代碼

修改星历

wyq 1 年之前
父節點
當前提交
ad9cd780f8

+ 2 - 1
XdCxRhDW.App/UserControl/X1D1GDOPParam.cs

@@ -8,6 +8,7 @@ using XdCxRhDW.Repostory.Model;
 using XdCxRhDW.Repostory.EFContext;
 using XdCxRhDW.Core.Api;
 using System.Runtime.ConstrainedExecution;
+using XdCxRhDW.Repostory;
 namespace XdCxRhDW.App.UserControl
 {
     public partial class X1D1GDOPParam : DevExpress.XtraEditors.XtraUserControl
@@ -53,7 +54,7 @@ namespace XdCxRhDW.App.UserControl
                     this.txtRefLocation1.Text = $"{station.RefLon},{station.RefLat}";
                     this.txtCXStation.Text = $"{station.CxLon},{station.CxLat}";
                 }
-                var xlList = db.XlInfos.OrderBy(p => p.SatName).OrderByDescending(p => p.TimeBJ).ToList();
+                var xlList = XlCache.GetAllAsync().Result.OrderBy(p => p.SatName).OrderByDescending(p => p.TimeBJ).ToList();
                 xlall.AddRange(xlList.Select(m => m.TwoLine));
                 if (xlall.Count() == 0) return;
                 if (cg.MainCode.HasValue && xlList.Any(m => m.SatCode == cg.MainCode.Value))

+ 7 - 5
XdCxRhDW.App/UserControl/X2D1GDOPParam.cs

@@ -40,7 +40,7 @@ namespace XdCxRhDW.App.UserControl
             this.txtCapTime.DateTime = item.SigTime;
             this.txtDtousErr1.EditValue = 1;
             this.txtSatLocErr1.EditValue = 10000;
-            //List<string> xlall = new List<string>();
+            List<string> xlall = new List<string>();
             string mainTle = string.Empty;
             string adjaTle = string.Empty;
 
@@ -64,8 +64,9 @@ namespace XdCxRhDW.App.UserControl
                     this.txtStationLocation1.Text = $"{station.CdbTxLon},{station.CdbTxLat}";
                     this.txtRefLocation1.Text = $"{station.RefLon},{station.RefLat}";
                 }
-                var xlList = XlCache.GetAll();
-                if (xlList.Count == 0) return;
+                var xlList = XlCache.GetAllAsync().Result;
+                xlall.AddRange(xlList.Select(m => m.TwoLine));
+                if (xlall.Count == 0) return;
                 if (cg.MainCode.HasValue && xlList.Any(m => m.SatCode == cg.MainCode.Value))
                 {
                     mainTle = xlList.First(m => m.SatCode == cg.MainCode.Value).TwoLine;
@@ -83,9 +84,10 @@ namespace XdCxRhDW.App.UserControl
                 {
                     adjaTle = xlList.First().TwoLine;
                 }
-                txtTleMain.UseDefault().SetStringData(xlList.Select(p => p.TwoLine)).Text = mainTle;
-                txtTleAdja.UseDefault().SetStringData(xlList.Select(p => p.TwoLine)).Text = adjaTle;
             }
+
+            txtTleMain.UseDefault().SetStringData(xlall).Text = mainTle;
+            txtTleAdja.UseDefault().SetStringData(xlall).Text = adjaTle;
         }
 
 

+ 2 - 1
XdCxRhDW.App/UserControl/X2DFGDOPParam.cs

@@ -7,6 +7,7 @@ using System.Collections.Generic;
 using System.Data;
 using System.Linq;
 using XdCxRhDW.Core.Api;
+using XdCxRhDW.Repostory;
 using XdCxRhDW.Repostory.EFContext;
 using XdCxRhDW.Repostory.Model;
 namespace XdCxRhDW.App.UserControl
@@ -57,7 +58,7 @@ namespace XdCxRhDW.App.UserControl
                 this.txtFu1.EditValue = cg.TarFreqUp.HasValue ? cg.TarFreqUp.Value * 1e-6 : 950;
                 this.txtFu2.EditValue = cg.RefFreqUp.HasValue ? cg.RefFreqUp.Value * 1e-6 : 950;
 
-                var xlList = db.XlInfos.OrderBy(p => p.SatName).OrderByDescending(p => p.TimeBJ).ToList();
+                var xlList = XlCache.GetAllAsync().Result.OrderBy(p => p.SatName).OrderByDescending(p => p.TimeBJ).ToList();
                 xlall.AddRange(xlList.Select(m => m.TwoLine));
                 if (xlall.Count() == 0) return;
                 if (cg.MainCode.HasValue && xlList.Any(m => m.SatCode == cg.MainCode.Value))

+ 2 - 1
XdCxRhDW.App/UserControl/X3DFGDOPParam .cs

@@ -7,6 +7,7 @@ using System.Collections.Generic;
 using System.Data;
 using System.Linq;
 using XdCxRhDW.Core.Api;
+using XdCxRhDW.Repostory;
 using XdCxRhDW.Repostory.EFContext;
 using XdCxRhDW.Repostory.Model;
 
@@ -59,7 +60,7 @@ namespace XdCxRhDW.App.UserControl
                 this.txtFu1.EditValue = cg.TarFreqUp.HasValue ? cg.TarFreqUp.Value * 1e-6 : 950;
                 this.txtFu2.EditValue = cg.RefFreqUp.HasValue ? cg.RefFreqUp.Value * 1e-6 : 950;
 
-                var xlList = db.XlInfos.OrderBy(p => p.SatName).OrderByDescending(p => p.TimeBJ).ToList();
+                var xlList = XlCache.GetAllAsync().Result.OrderBy(p => p.SatName).OrderByDescending(p => p.TimeBJ).ToList();
                 xlall.AddRange(xlList.Select(m => m.TwoLine));
                 if (xlall.Count() == 0) return;
                 if (cg.MainCode.HasValue && xlList.Any(m => m.SatCode == cg.MainCode.Value))

+ 2 - 1
XdCxRhDW.App/UserControl/X3GDOPParam.cs

@@ -8,6 +8,7 @@ using XdCxRhDW.Repostory.Model;
 using XdCxRhDW.Repostory.EFContext;
 using XdCxRhDW.Core.Api;
 using DxHelper;
+using XdCxRhDW.Repostory;
 namespace XdCxRhDW.App.UserControl
 {
     public partial class X3GDOPParam : DevExpress.XtraEditors.XtraUserControl
@@ -55,7 +56,7 @@ namespace XdCxRhDW.App.UserControl
                 {
                     this.txtRefLocation1.Text = $"{station.RefLon},{station.RefLat}";
                 }
-                var xlList = db.XlInfos.OrderBy(p => p.SatName).OrderByDescending(p => p.TimeBJ).ToList();
+                var xlList = XlCache.GetAllAsync().Result.OrderBy(p => p.SatName).OrderByDescending(p => p.TimeBJ).ToList();
                 xlall.AddRange(xlList.Select(m => m.TwoLine));
                 if (xlall.Count() == 0) return;
                 if (cg.MainCode.HasValue && xlList.Any(m => m.SatCode == cg.MainCode.Value))