ソースを参照

修改重新DW

wyq 1 年間 前
コミット
98ce6c4cee

+ 18 - 18
XdCxRhDW.App/EditForms/X2PosParamEditor.Designer.cs

@@ -29,11 +29,6 @@
         private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
-            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions11 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject41 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject42 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject43 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject44 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
@@ -79,6 +74,11 @@
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject34 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject35 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject36 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions10 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject37 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject38 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject39 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject40 = new DevExpress.Utils.SerializableAppearanceObject();
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
             this.ucEphXYZAdja = new XdCxRhDW.App.UserControl.UCEphXYZParam();
             this.ucEphXYZMain = new XdCxRhDW.App.UserControl.UCEphXYZParam();
@@ -234,9 +234,9 @@
             this.txtDtoSx.MaximumSize = new System.Drawing.Size(0, 20);
             this.txtDtoSx.Name = "txtDtoSx";
             this.txtDtoSx.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "us", -1, false, true, false, editorButtonImageOptions11, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject41, serializableAppearanceObject42, serializableAppearanceObject43, serializableAppearanceObject44, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "us", -1, false, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.txtDtoSx.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
-            this.txtDtoSx.Properties.MaskSettings.Set("mask", "f3");
+            this.txtDtoSx.Properties.MaskSettings.Set("mask", "f4");
             this.txtDtoSx.Properties.MaxLength = 10;
             this.txtDtoSx.Properties.NullValuePrompt = "必需";
             this.txtDtoSx.Size = new System.Drawing.Size(240, 20);
@@ -249,9 +249,9 @@
             this.txtYbMain.MaximumSize = new System.Drawing.Size(0, 20);
             this.txtYbMain.Name = "txtYbMain";
             this.txtYbMain.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "us", -1, false, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "us", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.txtYbMain.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
-            this.txtYbMain.Properties.MaskSettings.Set("mask", "f3");
+            this.txtYbMain.Properties.MaskSettings.Set("mask", "f4");
             this.txtYbMain.Properties.MaxLength = 10;
             this.txtYbMain.Size = new System.Drawing.Size(211, 20);
             this.txtYbMain.StyleController = this.layoutControl1;
@@ -263,9 +263,9 @@
             this.txtYbAdja.MaximumSize = new System.Drawing.Size(0, 20);
             this.txtYbAdja.Name = "txtYbAdja";
             this.txtYbAdja.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "us", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "us", -1, false, true, false, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.txtYbAdja.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
-            this.txtYbAdja.Properties.MaskSettings.Set("mask", "f3");
+            this.txtYbAdja.Properties.MaskSettings.Set("mask", "f4");
             this.txtYbAdja.Properties.MaxLength = 10;
             this.txtYbAdja.Size = new System.Drawing.Size(200, 20);
             this.txtYbAdja.StyleController = this.layoutControl1;
@@ -314,7 +314,7 @@
             this.txtDfo.MaximumSize = new System.Drawing.Size(0, 20);
             this.txtDfo.Name = "txtDfo";
             this.txtDfo.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions4, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject13, serializableAppearanceObject14, serializableAppearanceObject15, serializableAppearanceObject16, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.txtDfo.Size = new System.Drawing.Size(240, 20);
             this.txtDfo.StyleController = this.layoutControl1;
             this.txtDfo.TabIndex = 13;
@@ -325,7 +325,7 @@
             this.txtTarFreqUp.MaximumSize = new System.Drawing.Size(0, 20);
             this.txtTarFreqUp.Name = "txtTarFreqUp";
             this.txtTarFreqUp.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions4, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject13, serializableAppearanceObject14, serializableAppearanceObject15, serializableAppearanceObject16, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions5, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject17, serializableAppearanceObject18, serializableAppearanceObject19, serializableAppearanceObject20, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.txtTarFreqUp.Size = new System.Drawing.Size(240, 20);
             this.txtTarFreqUp.StyleController = this.layoutControl1;
             this.txtTarFreqUp.TabIndex = 14;
@@ -336,7 +336,7 @@
             this.txtTarFreqDown.MaximumSize = new System.Drawing.Size(0, 20);
             this.txtTarFreqDown.Name = "txtTarFreqDown";
             this.txtTarFreqDown.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions5, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject17, serializableAppearanceObject18, serializableAppearanceObject19, serializableAppearanceObject20, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions6, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject21, serializableAppearanceObject22, serializableAppearanceObject23, serializableAppearanceObject24, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.txtTarFreqDown.Size = new System.Drawing.Size(415, 20);
             this.txtTarFreqDown.StyleController = this.layoutControl1;
             this.txtTarFreqDown.TabIndex = 15;
@@ -347,7 +347,7 @@
             this.txtYbMainDfo.MaximumSize = new System.Drawing.Size(0, 20);
             this.txtYbMainDfo.Name = "txtYbMainDfo";
             this.txtYbMainDfo.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions6, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject21, serializableAppearanceObject22, serializableAppearanceObject23, serializableAppearanceObject24, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions7, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject25, serializableAppearanceObject26, serializableAppearanceObject27, serializableAppearanceObject28, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.txtYbMainDfo.Size = new System.Drawing.Size(211, 20);
             this.txtYbMainDfo.StyleController = this.layoutControl1;
             this.txtYbMainDfo.TabIndex = 16;
@@ -358,7 +358,7 @@
             this.txtYbAdjaDfo.MaximumSize = new System.Drawing.Size(0, 20);
             this.txtYbAdjaDfo.Name = "txtYbAdjaDfo";
             this.txtYbAdjaDfo.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions7, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject25, serializableAppearanceObject26, serializableAppearanceObject27, serializableAppearanceObject28, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions8, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject29, serializableAppearanceObject30, serializableAppearanceObject31, serializableAppearanceObject32, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.txtYbAdjaDfo.Size = new System.Drawing.Size(200, 20);
             this.txtYbAdjaDfo.StyleController = this.layoutControl1;
             this.txtYbAdjaDfo.TabIndex = 17;
@@ -369,7 +369,7 @@
             this.txtRefFreqDown.MaximumSize = new System.Drawing.Size(0, 20);
             this.txtRefFreqDown.Name = "txtRefFreqDown";
             this.txtRefFreqDown.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions8, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject29, serializableAppearanceObject30, serializableAppearanceObject31, serializableAppearanceObject32, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions9, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject33, serializableAppearanceObject34, serializableAppearanceObject35, serializableAppearanceObject36, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.txtRefFreqDown.Size = new System.Drawing.Size(415, 20);
             this.txtRefFreqDown.StyleController = this.layoutControl1;
             this.txtRefFreqDown.TabIndex = 18;
@@ -380,7 +380,7 @@
             this.txtRefFreqUp.MaximumSize = new System.Drawing.Size(0, 20);
             this.txtRefFreqUp.Name = "txtRefFreqUp";
             this.txtRefFreqUp.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions9, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject33, serializableAppearanceObject34, serializableAppearanceObject35, serializableAppearanceObject36, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions10, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject37, serializableAppearanceObject38, serializableAppearanceObject39, serializableAppearanceObject40, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.txtRefFreqUp.Size = new System.Drawing.Size(240, 20);
             this.txtRefFreqUp.StyleController = this.layoutControl1;
             this.txtRefFreqUp.TabIndex = 19;

+ 6 - 6
XdCxRhDW.App/EditForms/X2PosParamEditor.cs

@@ -70,9 +70,9 @@ namespace XdCxRhDW.App.EditForms
             }
             if (cg != null)
             {
-                this.txtDtoSx.Text = $"{cg.Dto1.Value:f3}";
-                this.txtYbMain.Text = $"{cg.YbMainDto.Value:f3}";
-                this.txtYbAdja.Text = $"{cg.YbAdja1Dto.Value:f3}";
+                this.txtDtoSx.Text = $"{cg.Dto1.Value:f4}";
+                this.txtYbMain.Text = $"{cg.YbMainDto.Value:f4}";
+                this.txtYbAdja.Text = $"{cg.YbAdja1Dto.Value:f4}";
                 this.txtSigTime.EditValue = info.SigTime;
 
                 var mainEph = (cg.MainX, cg.MainY, cg.MainZ, cg.MainVx, cg.MainVy, cg.MainVz);
@@ -81,9 +81,9 @@ namespace XdCxRhDW.App.EditForms
                 var adjaEph = (cg.Adja1X, cg.Adja1Y, cg.Adja1Z, cg.Adja1Vx, cg.Adja1Vy, cg.Adja1Vz);
                 ucEphXYZAdja.SetParam($"邻星", cg.Adja1Code, adjaEph, Color.Black);
 
-                this.txtDfo.Text = $"{cg.Dfo1.Value:f3}";
-                this.txtYbMainDfo.Text = $"{cg.YbMainDfo.Value:f3}";
-                this.txtYbAdjaDfo.Text = $"{cg.YbAdja1Dfo.Value:f3}";
+                this.txtDfo.Text = $"{cg.Dfo1.Value:f4}";
+                this.txtYbMainDfo.Text = $"{cg.YbMainDfo.Value:f4}";
+                this.txtYbAdjaDfo.Text = $"{cg.YbAdja1Dfo.Value:f4}";
                 this.txtTarFreqUp.Text = $"{cg.TarFreqUp.Value:f3}";
                 this.txtTarFreqDown.Text = $"{cg.TarFreqDown.Value:f3}";
                 this.txtRefFreqUp.Text = $"{cg.RefFreqUp.Value:f3}";

+ 5 - 5
XdCxRhDW.App/EditForms/X3DfoPosParamEditor.cs

@@ -64,11 +64,11 @@ namespace XdCxRhDW.App.EditForms
             }
             if (cg != null)
             {
-                this.txtDfoSx.Text = $"{cg.Dfo1.Value:f3}";
-                this.txtDfoSx1.Text = $"{cg.Dfo2.Value:f3}";
-                this.txtYbMain.Text = $"{cg.YbMainDfo.Value:f3}";
-                this.txtYbAdja.Text = $"{cg.YbAdja1Dfo.Value:f3}";
-                this.txtYbAdja1.Text = $"{cg.YbAdja2Dfo.Value:f3}";
+                this.txtDfoSx.Text = $"{cg.Dfo1.Value:f4}";
+                this.txtDfoSx1.Text = $"{cg.Dfo2.Value:f4}";
+                this.txtYbMain.Text = $"{cg.YbMainDfo.Value:f4}";
+                this.txtYbAdja.Text = $"{cg.YbAdja1Dfo.Value:f4}";
+                this.txtYbAdja1.Text = $"{cg.YbAdja2Dfo.Value:f4}";
                 this.sigTime.EditValue = info.SigTime;
                 var mainEph = (cg.MainX, cg.MainY, cg.MainZ, cg.MainVx, cg.MainVy, cg.MainVz);
                 ucEphXYZMain.SetParam($"主星", cg.MainCode, mainEph, Color.Black);

+ 1 - 1
XdCxRhDW.App/ExtensionsDev/MapControlEx.cs

@@ -649,7 +649,7 @@ public static class MapControlEx
     /// <param name="setCenter">是否将这个点设置到地图中心显示</param>
     public static void UpdatePosItem<T>(this MapControl ctrl, T item, bool setCenter = false) where T : PosData, new()
     {
-        if (item == null) return;
+        if (item == null||item.PosLon==999||item.PosLat==999) return;
         var innerData = ctrl.Tag as InnerData;
         var key = innerData._dataCache.Keys.Where(p => p.ID == item.ID).FirstOrDefault();
         if (key != null)

+ 123 - 36
XdCxRhDW.App/UserControl/CtrlHome.cs

@@ -1,48 +1,31 @@
-using DevExpress.Utils;
+using DevExpress.Mvvm.Native;
+using DevExpress.Utils;
 using DevExpress.Utils.Drawing;
 using DevExpress.Utils.Svg;
 using DevExpress.XtraEditors.ButtonsPanelControl;
+using DevExpress.XtraEditors.Controls;
 using DevExpress.XtraGrid.Views.Grid;
 using DxHelper;
+using ExtensionsDev;
 using System;
 using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.Data;
+using System.Configuration;
 using System.Data.Entity;
+using System.Data.Entity.Migrations;
 using System.Drawing;
 using System.Linq;
 using System.Net;
-using System.Text;
-using System.Windows.Forms;
-using XdCxRhDW.App.EditForms;
-using XdCxRhDW.Repostory;
-using XdCxRhDW.WebApi;
-using ExtensionsDev;
-using DevExpress.XtraEditors;
-using System.Data.Entity.Migrations;
 using System.Threading;
 using System.Threading.Tasks;
-using System.IO;
+using System.Windows.Forms;
+using XdCxRhDW.Api;
+using XdCxRhDW.App.EditForms;
+using XdCxRhDW.App.Model;
 using XdCxRhDW.App.PopupControl;
-using System.Windows.Controls;
 using XdCxRhDW.Dto;
-using DevExpress.XtraEditors.Controls;
-using DevExpress.Mvvm.Native;
 using XdCxRhDW.Entity;
-using XdCxRhDW.Api;
-using XdCxRhDW.App.Controllers;
-using DevExpress.XtraPrinting.Native.Properties;
-using DevExpress.Utils.Drawing.Helpers;
-using DevExpress.Office.Crypto;
-using XdCxRhDW.App.Model;
-using DPP_YH_Core.Extensions;
-using DevExpress.Utils.Filtering;
-using DevExpress.Data.Svg;
-using DevExpress.Utils.About;
-using XdCxRhDW.App.App.Properties;
-using System.Windows.Documents;
-using System.Configuration;
-using DevExpress.XtraExport.Helpers;
+using XdCxRhDW.Repostory;
+using XdCxRhDW.WebApi;
 
 namespace XdCxRhDW.App.UserControl
 {
@@ -911,8 +894,8 @@ namespace XdCxRhDW.App.UserControl
                 case EnumPosResType.X2Dfo:
                     try
                     {
-                        StationRes station=null;
-                        CgRes cg=null;
+                        StationRes station = null;
+                        CgRes cg = null;
 
                         using (RHDWPartContext db = RHDWPartContext.GetContext(item.SigTime))
                         {
@@ -999,8 +982,8 @@ namespace XdCxRhDW.App.UserControl
         {
             try
             {
-                CxRes cx=null;
-                StationRes station=null;
+                CxRes cx = null;
+                StationRes station = null;
                 using (RHDWPartContext db = RHDWPartContext.GetContext(item.SigTime))
                 {
                     if (db.DatabaseExist)
@@ -1192,13 +1175,13 @@ namespace XdCxRhDW.App.UserControl
                         case EnumPosResType.X2D1:
                         case EnumPosResType.X2D1NoRef:
 
-                            var xlInfo1 = await XlRepository.GetLatestAsync(item.CgRes.Adja1Code.Value, item.SigTime);
-                            if (xlInfo1 == null)
+                            var x2lInfo1 = await XlRepository.GetLatestAsync(item.CgRes.Adja1Code.Value, item.SigTime);
+                            if (x2lInfo1 == null)
                             {
                                 Serilog.Log.Error($"重新定位异常:卫星:{item.CgRes.Adja1Code.Value}未找到对应的星历信息,请导入星历");
                                 continue;
                             }
-                            var eph1 = EphHelper.Calc(xlInfo1.TwoLine, item.SigTime);
+                            var eph1 = EphHelper.Calc(x2lInfo1.TwoLine, item.SigTime);
                             CgRes.Dto1 = item.CgRes.Dto1;
                             CgRes.Dfo1 = item.CgRes.Dfo1;
                             CgRes.Snr1 = item.CgRes.Snr1;
@@ -1221,12 +1204,116 @@ namespace XdCxRhDW.App.UserControl
                         case EnumPosResType.X3:
                         case EnumPosResType.X3NoRef:
 
+                            var x3lInfo1 = await XlRepository.GetLatestAsync(item.CgRes.Adja1Code.Value, item.SigTime);
+                            if (x3lInfo1 == null)
+                            {
+                                Serilog.Log.Error($"重新定位异常:卫星:{item.CgRes.Adja1Code.Value}未找到对应的星历信息,请导入星历");
+                                continue;
+                            }
+                            var X3eph1 = EphHelper.Calc(x3lInfo1.TwoLine, item.SigTime);
+
+                            var x3lInfo2 = await XlRepository.GetLatestAsync(item.CgRes.Adja2Code.Value, item.SigTime);
+                            if (x3lInfo2 == null)
+                            {
+                                Serilog.Log.Error($"重新定位异常:卫星:{item.CgRes.Adja2Code.Value}未找到对应的星历信息,请导入星历");
+                                continue;
+                            }
+                            var X3eph2 = EphHelper.Calc(x3lInfo2.TwoLine, item.SigTime);
+                            CgRes.Dto1 = item.CgRes.Dto1;
+                            CgRes.Dto2 = item.CgRes.Dto2;
+                            CgRes.YbMainDto = item.CgRes.YbMainDto;
+                            CgRes.YbAdja1Dto = item.CgRes.YbAdja1Dto;
+                            CgRes.YbAdja2Dto = item.CgRes.YbAdja2Dto;
+                            CgRes.Adja1X = X3eph1.X;
+                            CgRes.Adja1Y = X3eph1.Y;
+                            CgRes.Adja1Z = X3eph1.Z;
+                            CgRes.Adja2X = X3eph2.X;
+                            CgRes.Adja2Y = X3eph2.Y;
+                            CgRes.Adja2Z = X3eph2.Z;
+
+                            res = item.PosResType == EnumPosResType.X3 ? PosApi.X3_Pos(CgRes, StationRes) : PosApi.X3_PosNoRef(CgRes, StationRes);
+                            item.PosLon = res[0];
+                            item.PosLat = res[1];
+                            item.MirrLon = res[3];
+                            item.MirrLat = res[4];
                             break;
                         case EnumPosResType.X3TwoDfo:
 
+                            var x3dflInfo1 = await XlRepository.GetLatestAsync(item.CgRes.Adja1Code.Value, item.SigTime);
+                            if (x3dflInfo1 == null)
+                            {
+                                Serilog.Log.Error($"重新定位异常:卫星:{item.CgRes.Adja1Code.Value}未找到对应的星历信息,请导入星历");
+                                continue;
+                            }
+                            var X3dfeph1 = EphHelper.Calc(x3dflInfo1.TwoLine, item.SigTime);
+
+                            var x3dflInfo2 = await XlRepository.GetLatestAsync(item.CgRes.Adja2Code.Value, item.SigTime);
+                            if (x3dflInfo2 == null)
+                            {
+                                Serilog.Log.Error($"重新定位异常:卫星:{item.CgRes.Adja2Code.Value}未找到对应的星历信息,请导入星历");
+                                continue;
+                            }
+                            var X3dfeph2 = EphHelper.Calc(x3dflInfo2.TwoLine, item.SigTime);
+                            CgRes.Dfo1 = item.CgRes.Dfo1;
+                            CgRes.Dfo2 = item.CgRes.Dfo2;
+                            CgRes.YbMainDfo = item.CgRes.YbMainDfo;
+                            CgRes.YbAdja1Dfo = item.CgRes.YbAdja1Dfo;
+                            CgRes.YbAdja2Dfo = item.CgRes.YbAdja2Dfo;
+                            CgRes.TarFreqUp = item.CgRes.TarFreqUp;
+                            CgRes.TarFreqDown = item.CgRes.TarFreqDown;
+                            CgRes.RefFreqUp = item.CgRes.RefFreqUp;
+                            CgRes.RefFreqDown = item.CgRes.RefFreqDown;
+                            CgRes.Adja1X = X3dfeph1.X;
+                            CgRes.Adja1Y = X3dfeph1.Y;
+                            CgRes.Adja1Z = X3dfeph1.Z;
+                            CgRes.Adja1Vx = X3dfeph1.VX;
+                            CgRes.Adja1Vy = X3dfeph1.VY;
+                            CgRes.Adja1Vz = X3dfeph1.VZ;
+                            CgRes.Adja2X = X3dfeph2.X;
+                            CgRes.Adja2Y = X3dfeph2.Y;
+                            CgRes.Adja2Z = X3dfeph2.Z;
+                            CgRes.Adja2Vx = X3dfeph2.VX;
+                            CgRes.Adja2Vy = X3dfeph2.VY;
+                            CgRes.Adja2Vz = X3dfeph2.VZ;
+                            res = PosApi.X3_PosTwoDfo(CgRes, StationRes);
+                            item.PosLon = res[0];
+                            item.PosLat = res[1];
+                            item.MirrLon = res[3];
+                            item.MirrLat = res[4];
                             break;
                         case EnumPosResType.X2Dfo:
+                            var x2dflInfo1 = await XlRepository.GetLatestAsync(item.CgRes.Adja1Code.Value, item.SigTime);
+                            if (x2dflInfo1 == null)
+                            {
+                                Serilog.Log.Error($"重新定位异常:卫星:{item.CgRes.Adja1Code.Value}未找到对应的星历信息,请导入星历");
+                                continue;
+                            }
+                            var X2dfeph1 = EphHelper.Calc(x2dflInfo1.TwoLine, item.SigTime);
+
+                            CgRes.Dto1 = item.CgRes.Dto1;
+                            CgRes.Dfo1 = item.CgRes.Dfo1;
+                            CgRes.Snr1 = item.CgRes.Snr1;
+
+                            CgRes.YbMainDto = item.CgRes.YbMainDto;
+                            CgRes.YbMainDfo = item.CgRes.YbMainDfo;
+                            CgRes.YbAdja1Dto = item.CgRes.YbAdja1Dto;
+                            CgRes.YbAdja1Dfo = item.CgRes.YbAdja1Dfo;
+                            CgRes.TarFreqUp = item.CgRes.TarFreqUp;
+                            CgRes.TarFreqDown = item.CgRes.TarFreqDown;
+                            CgRes.RefFreqUp = item.CgRes.RefFreqUp;
+                            CgRes.RefFreqDown = item.CgRes.RefFreqDown;
+                            CgRes.Adja1X = X2dfeph1.X;
+                            CgRes.Adja1Y = X2dfeph1.Y;
+                            CgRes.Adja1Z = X2dfeph1.Z;
+                            CgRes.Adja1Vx = X2dfeph1.VX;
+                            CgRes.Adja1Vy = X2dfeph1.VY;
+                            CgRes.Adja1Vz = X2dfeph1.VZ;
 
+                            res = PosApi.X2_PosDtoDfo(CgRes, StationRes);
+                            item.PosLon = res[0];
+                            item.PosLat = res[1];
+                            item.MirrLon = res[3];
+                            item.MirrLat = res[4];
                             break;
                         default:
                             break;