Procházet zdrojové kódy

Merge branch 'master' of http://139.155.15.221:3000/zoulei/XdCxRhDW

gongqiuhong před 1 rokem
rodič
revize
1ca4d442e0

+ 5 - 2
XdCxRhDW.App/CorTools/XlCalculateForm.cs

@@ -21,6 +21,7 @@ using System.Windows.Forms;
 using XdCxRhDw.Dto;
 using XdCxRhDW.Core;
 using XdCxRhDW.Core.Api;
+using XdCxRhDW.Repostory;
 using XdCxRhDW.Repostory.EFContext;
 using XdCxRhDW.Repostory.Model;
 
@@ -45,10 +46,12 @@ namespace XdCxRhDW.App.CorTools
             gridControl.Init<SatEphDto>().UseSort().UseFilter().UseMultiSelect().UseRowNumber();
             gridControl.DataSource = listEph;
             txtTle.UseDoubleClickToSelectAll();
-            txtTle.UseDefault().SetStringData(listXl.Select(p=>p.TwoLine));
+            this.listXl = XlCache.GetAllAsync().Result;
+            txtTle.UseDefault().SetStringData(listXl.Select(p => p.TwoLine));
+
         }
 
-      
+
         private async void btnCalculate_Click(object sender, EventArgs e)
         {
 

+ 5 - 1
XdCxRhDW.App/UserControl/CtrlTarget.cs

@@ -106,8 +106,12 @@ namespace XdCxRhDW.App.UserControl
         {
             try
             {
+                if (XtraMessageBox.Show("确认删除选择得目标信息?", "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
+                {
+                    return;
+                }
                 var ids = gridView1.GetSelectedRows();
-
+               
                 using (RHDWContext db = new RHDWContext())
                 {
                     foreach (var id in ids)

+ 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))