Quellcode durchsuchen

修改参数验证

wyq vor 1 Jahr
Ursprung
Commit
f659bd517a

+ 17 - 17
XdCxRhDW.App/EditForms/RHDTOParamEditor.Designer.cs

@@ -29,11 +29,6 @@
         private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
-            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions6 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject21 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject22 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject23 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject24 = 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();
@@ -54,6 +49,11 @@
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject14 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject15 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject16 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions5 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject17 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject18 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject19 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject20 = new DevExpress.Utils.SerializableAppearanceObject();
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
             this.ucEphXYZAdaj = new XdCxRhDW.App.UserControl.UCEphXYZ();
             this.ucEphXYZMain = new XdCxRhDW.App.UserControl.UCEphXYZ();
@@ -88,8 +88,8 @@
             this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.dxErrorProvider = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components);
             this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
+            this.dxErrorProvider = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components);
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.txtSigTime.Properties)).BeginInit();
@@ -121,8 +121,8 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
@@ -190,7 +190,7 @@
             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, 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, "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.NullValuePrompt = "必需";
             this.txtDtoSx.Size = new System.Drawing.Size(228, 20);
             this.txtDtoSx.StyleController = this.layoutControl1;
@@ -202,7 +202,7 @@
             this.txtDtoCdb.MaximumSize = new System.Drawing.Size(0, 20);
             this.txtDtoCdb.Name = "txtDtoCdb";
             this.txtDtoCdb.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.txtDtoCdb.Properties.NullValuePrompt = "必需";
             this.txtDtoCdb.Size = new System.Drawing.Size(223, 20);
             this.txtDtoCdb.StyleController = this.layoutControl1;
@@ -214,7 +214,7 @@
             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, 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.txtYbMain.Size = new System.Drawing.Size(198, 20);
             this.txtYbMain.StyleController = this.layoutControl1;
             this.txtYbMain.TabIndex = 6;
@@ -225,7 +225,7 @@
             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, 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, "us", -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.txtYbAdja.Size = new System.Drawing.Size(230, 20);
             this.txtYbAdja.StyleController = this.layoutControl1;
             this.txtYbAdja.TabIndex = 6;
@@ -318,7 +318,7 @@
             this.txtcxFx.MaximumSize = new System.Drawing.Size(0, 20);
             this.txtcxFx.Name = "txtcxFx";
             this.txtcxFx.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "°", -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, "° ", -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.txtcxFx.Size = new System.Drawing.Size(200, 20);
             this.txtcxFx.StyleController = this.layoutControl1;
             this.txtcxFx.TabIndex = 6;
@@ -597,10 +597,6 @@
             this.layoutControlItem8.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem8.TextSize = new System.Drawing.Size(72, 14);
             // 
-            // dxErrorProvider
-            // 
-            this.dxErrorProvider.ContainerControl = this;
-            // 
             // emptySpaceItem1
             // 
             this.emptySpaceItem1.AllowHotTrack = false;
@@ -612,6 +608,10 @@
             this.emptySpaceItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
             // 
+            // dxErrorProvider
+            // 
+            this.dxErrorProvider.ContainerControl = this;
+            // 
             // RHDTOParamEditor
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
@@ -651,8 +651,8 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
             this.ResumeLayout(false);
 
         }

+ 76 - 6
XdCxRhDW.App/EditForms/RHDTOParamEditor.cs

@@ -37,13 +37,8 @@ namespace XdCxRhDW.App.EditForms
             txtsatStation.EditValueChanged += TxtsatStation_EditValueChanged;
             txtcdbStation.EditValueChanged += TxtcdbStation_EditValueChanged;
             txtRefLocation.EditValueChanged += TxtRefLocation_EditValueChanged;
-            txtCxLocation.EditValueChanged += TxtCxLocation_EditValueChanged;
         }
 
-        private void TxtCxLocation_EditValueChanged(object sender, EventArgs e)
-        {
-            txtCxLocation.CheckLonLat(dxErrorProvider, "测向站");
-        }
 
         private void TxtRefLocation_EditValueChanged(object sender, EventArgs e)
         {
@@ -103,6 +98,48 @@ namespace XdCxRhDW.App.EditForms
 
         public bool CheckParam()
         {
+            dxErrorProvider.ClearErrors();
+            if (!txtsatStation.CheckLonLat(dxErrorProvider, "接收站"))
+            {
+                return false;
+            }
+            if (!txtcdbStation.CheckLonLat(dxErrorProvider, "超短波"))
+            {
+                return false;
+            }
+            if (!txtRefLocation.CheckLonLat(dxErrorProvider, "参考站"))
+            {
+                return false;
+            }
+            if (!txtDtoSx.CheckDouble(dxErrorProvider, "双星时差"))
+            {
+                return false;
+            }
+            if (!txtDtoCdb.CheckDouble(dxErrorProvider, "主星超短时差"))
+            {
+                return false;
+            }
+            if (!txtYbMain.CheckDouble(dxErrorProvider, "样本主星时差"))
+            {
+                return false;
+            }
+            if (!txtYbAdja.CheckDouble(dxErrorProvider, "样本邻星时差"))
+            {
+                return false;
+            }
+            if (!ucEphXYZMain.CheckEphXYZ(dxErrorProvider))
+            {
+                return false;
+            }
+            if (!ucEphXYZAdaj.CheckEphXYZ(dxErrorProvider))
+            {
+                return false;
+            }
+            return true;
+        }
+        public bool CheckPosParam()
+        {
+            dxErrorProvider.ClearErrors();
             if (!txtsatStation.CheckLonLat(dxErrorProvider, "接收站"))
             {
                 return false;
@@ -115,6 +152,38 @@ namespace XdCxRhDW.App.EditForms
             {
                 return false;
             }
+            if (!txtCxLocation.CheckLonLat(dxErrorProvider, "测向站"))
+            {
+                return false;
+            }
+            if (!txtcxFx.CheckDouble(dxErrorProvider, "测向方向值"))
+            {
+                return false;
+            }
+            if (!txtDtoSx.CheckDouble(dxErrorProvider, "双星时差"))
+            {
+                return false;
+            }
+            if (!txtDtoCdb.CheckDouble(dxErrorProvider, "主星超短时差"))
+            {
+                return false;
+            }
+            if (!txtYbMain.CheckDouble(dxErrorProvider, "样本主星时差"))
+            {
+                return false;
+            }
+            if (!txtYbAdja.CheckDouble(dxErrorProvider, "样本邻星时差"))
+            {
+                return false;
+            }
+            if (!ucEphXYZMain.CheckEphXYZ(dxErrorProvider))
+            {
+                return false;
+            }
+            if (!ucEphXYZAdaj.CheckEphXYZ(dxErrorProvider))
+            {
+                return false;
+            }
             return true;
         }
 
@@ -179,6 +248,7 @@ namespace XdCxRhDW.App.EditForms
 
         private async void btnEphCalc_Click(object sender, EventArgs e)
         {
+            dxErrorProvider.ClearErrors();
             if (this.txtSigTime.DateTime == DateTime.MinValue)
             {
                 DxHelper.MsgBoxHelper.ShowWarning("信号时间不能为空!");
@@ -219,7 +289,7 @@ namespace XdCxRhDW.App.EditForms
 
         private void btnPos_Click(object sender, EventArgs e)
         {
-            if (!CheckParam()) { return; }
+            if (!CheckPosParam()) { return; }
             txtPosRes.Text = " ";
             try
             {

+ 40 - 40
XdCxRhDW.App/EditForms/X1D1DTOParamEditor.Designer.cs

@@ -29,11 +29,6 @@
         private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
-            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions4 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject13 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject14 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject15 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject16 = 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();
@@ -44,6 +39,11 @@
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions3 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject9 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject10 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject11 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject12 = new DevExpress.Utils.SerializableAppearanceObject();
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
             this.ucEphXYZMain = new XdCxRhDW.App.UserControl.UCEphXYZ();
             this.sigTime = new DevExpress.XtraEditors.DateEdit();
@@ -56,6 +56,8 @@
             this.btnPos = new DevExpress.XtraEditors.SimpleButton();
             this.txtCxLocation = new DevExpress.XtraEditors.TextEdit();
             this.txtcxFx = new DevExpress.XtraEditors.ButtonEdit();
+            this.btnCxLin = new DevExpress.XtraEditors.SimpleButton();
+            this.txtYbMain = new DevExpress.XtraEditors.ButtonEdit();
             this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
             this.emptySpaceItem3 = new DevExpress.XtraLayout.EmptySpaceItem();
             this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem();
@@ -71,11 +73,9 @@
             this.itemSigTime = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.dxErrorProvider = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components);
-            this.btnCxLin = new DevExpress.XtraEditors.SimpleButton();
             this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.txtYbMain = new DevExpress.XtraEditors.ButtonEdit();
             this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.dxErrorProvider = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components);
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.sigTime.Properties)).BeginInit();
@@ -86,6 +86,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.txtRefLocation.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtCxLocation.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtcxFx.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtYbMain.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem3)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit();
@@ -101,10 +102,9 @@
             ((System.ComponentModel.ISupportInitialize)(this.itemSigTime)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtYbMain.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
@@ -162,7 +162,7 @@
             this.txtDtoCdb.MaximumSize = new System.Drawing.Size(0, 20);
             this.txtDtoCdb.Name = "txtDtoCdb";
             this.txtDtoCdb.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "us", -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, "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.txtDtoCdb.Properties.NullValuePrompt = "必需";
             this.txtDtoCdb.Size = new System.Drawing.Size(182, 20);
             this.txtDtoCdb.StyleController = this.layoutControl1;
@@ -256,11 +256,33 @@
             this.txtcxFx.MaximumSize = new System.Drawing.Size(0, 20);
             this.txtcxFx.Name = "txtcxFx";
             this.txtcxFx.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "°", -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, "° ", -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.txtcxFx.Size = new System.Drawing.Size(170, 20);
             this.txtcxFx.StyleController = this.layoutControl1;
             this.txtcxFx.TabIndex = 6;
             // 
+            // btnCxLin
+            // 
+            this.btnCxLin.Location = new System.Drawing.Point(208, 205);
+            this.btnCxLin.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.btnCxLin.Name = "btnCxLin";
+            this.btnCxLin.Size = new System.Drawing.Size(98, 22);
+            this.btnCxLin.StyleController = this.layoutControl1;
+            this.btnCxLin.TabIndex = 12;
+            this.btnCxLin.Text = "测向线";
+            this.btnCxLin.Click += new System.EventHandler(this.btnCxLine_Click);
+            // 
+            // txtYbMain
+            // 
+            this.txtYbMain.Location = new System.Drawing.Point(374, 75);
+            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, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            this.txtYbMain.Size = new System.Drawing.Size(150, 20);
+            this.txtYbMain.StyleController = this.layoutControl1;
+            this.txtYbMain.TabIndex = 6;
+            // 
             // Root
             // 
             this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
@@ -481,21 +503,6 @@
             this.layoutControlItem5.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem5.TextSize = new System.Drawing.Size(72, 14);
             // 
-            // dxErrorProvider
-            // 
-            this.dxErrorProvider.ContainerControl = this;
-            // 
-            // btnCxLin
-            // 
-            this.btnCxLin.Location = new System.Drawing.Point(208, 205);
-            this.btnCxLin.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
-            this.btnCxLin.Name = "btnCxLin";
-            this.btnCxLin.Size = new System.Drawing.Size(98, 22);
-            this.btnCxLin.StyleController = this.layoutControl1;
-            this.btnCxLin.TabIndex = 12;
-            this.btnCxLin.Text = "测向线";
-            this.btnCxLin.Click += new System.EventHandler(this.btnCxLine_Click);
-            // 
             // layoutControlItem7
             // 
             this.layoutControlItem7.Control = this.btnCxLin;
@@ -512,17 +519,6 @@
             this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem7.TextVisible = false;
             // 
-            // txtYbMain
-            // 
-            this.txtYbMain.Location = new System.Drawing.Point(374, 75);
-            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, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
-            this.txtYbMain.Size = new System.Drawing.Size(150, 20);
-            this.txtYbMain.StyleController = this.layoutControl1;
-            this.txtYbMain.TabIndex = 6;
-            // 
             // layoutControlItem8
             // 
             this.layoutControlItem8.Control = this.txtYbMain;
@@ -539,6 +535,10 @@
             this.layoutControlItem8.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem8.TextSize = new System.Drawing.Size(72, 14);
             // 
+            // dxErrorProvider
+            // 
+            this.dxErrorProvider.ContainerControl = this;
+            // 
             // X1D1DTOParamEditor
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
@@ -557,6 +557,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.txtRefLocation.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtCxLocation.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtcxFx.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtYbMain.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem3)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit();
@@ -572,10 +573,9 @@
             ((System.ComponentModel.ISupportInitialize)(this.itemSigTime)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtYbMain.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
             this.ResumeLayout(false);
 
         }

+ 55 - 10
XdCxRhDW.App/EditForms/X1D1DTOParamEditor.cs

@@ -87,7 +87,7 @@ namespace XdCxRhDW.App.EditForms
                 this.txtsatStation.Text = $"{station.SatTxLon},{station.SatTxLat}";
                 this.txtcdbStation.Text = $"{station.CdbTxLon},{station.CdbTxLat}";
                 this.txtRefLocation.Text = $"{station.RefLon},{station.RefLat}";
-                this.txtCxLocation.Text= $"{station.CxLon},{station.CxLat}";
+                this.txtCxLocation.Text = $"{station.CxLon},{station.CxLat}";
             }
         }
 
@@ -124,12 +124,52 @@ namespace XdCxRhDW.App.EditForms
         public bool CheckPosParam()
         {
             dxErrorProvider.ClearErrors();
+            if (!txtsatStation.CheckLonLat(dxErrorProvider, "接收站"))
+            {
+                return false;
+            }
+            if (!txtcdbStation.CheckLonLat(dxErrorProvider, "超短波"))
+            {
+                return false;
+            }
+            if (!txtRefLocation.CheckLonLat(dxErrorProvider, "参考站"))
+            {
+                return false;
+            }
+            if (!txtCxLocation.CheckLonLat(dxErrorProvider, "测向站"))
+            {
+                return false;
+            }
+            if (!txtcxFx.CheckDouble(dxErrorProvider, "测向方向值"))
+            {
+                return false;
+            }
+            if (!txtDtoCdb.CheckDouble(dxErrorProvider, "主星超短时差"))
+            {
+                return false;
+            }
+            if (!txtYbMain.CheckDouble(dxErrorProvider, "样本主星时差"))
+            {
+                return false;
+            }
+            if (!ucEphXYZMain.CheckEphXYZ(dxErrorProvider))
+            {
+                return false;
+            }
             return true;
         }
 
         public bool CheckCxLineParam()
         {
             dxErrorProvider.ClearErrors();
+            if (!txtCxLocation.CheckLonLat(dxErrorProvider, "测向站"))
+            {
+                return false;
+            }
+            if (!txtcxFx.CheckDouble(dxErrorProvider, "测向方向值"))
+            {
+                return false;
+            }
             return true;
         }
 
@@ -166,13 +206,13 @@ namespace XdCxRhDW.App.EditForms
             catch (Exception ex)
             {
                 Serilog.Log.Error(ex, $"绘制{info.PosResType.GetEnumDisplayName()}时差线失败.PosID={info.ID},SigTime={info.SigTime}");
-                DxHelper.MsgBoxHelper.ShowWarning($"绘制{info.PosResType.GetEnumDisplayName()}时差线失败");
+                DxHelper.MsgBoxHelper.ShowWarning($"绘制{info.PosResType.GetEnumDisplayName()}时差线失败,{ex.Message}");
             }
         }
 
         private async void btnEphCalc_Click(object sender, EventArgs e)
         {
-
+            dxErrorProvider.ClearErrors();
             if (this.sigTime.DateTime == DateTime.MinValue)
             {
                 DxHelper.MsgBoxHelper.ShowWarning("信号时间不能为空!");
@@ -251,7 +291,7 @@ namespace XdCxRhDW.App.EditForms
             catch (Exception ex)
             {
                 Serilog.Log.Error(ex, $"{info.PosResType.GetEnumDisplayName()}手动定位失败.PosID={info.ID},SigTime={info.SigTime}");
-                DxHelper.MsgBoxHelper.ShowWarning($"{info.PosResType.GetEnumDisplayName()}手动定位失败");
+                DxHelper.MsgBoxHelper.ShowWarning($"{info.PosResType.GetEnumDisplayName()}手动定位失败,{ex.Message}");
             }
         }
 
@@ -260,19 +300,24 @@ namespace XdCxRhDW.App.EditForms
             if (!CheckCxLineParam()) { return; }
             try
             {
-                double deg = cx.Fx;//向北顺时针方向为夹角
+                var deg = Convert.ToDouble(this.txtcxFx.Text);//向北顺时针方向为夹角
+
+                var cxStation = txtCxLocation.GetLonLat();
+
+                double cxLon = cxStation[0];
+                double cxLat= cxStation[1];
                 //计算测向站到定位点之间的距离
-                var km = MapControlEx.CalcLineKm(station.CxLon.Value, station.CxLat.Value, info.PosLon, info.PosLat);
-                var endpoint = MapControlEx.CalcSituation(station.CxLon.Value, station.CxLat.Value, deg, (km + 100) * 1000);
+                var km = MapControlEx.CalcLineKm(cxLon, cxLat, info.PosLon, info.PosLat);
+                var endpoint = MapControlEx.CalcSituation(cxLon, cxLat, deg, (km + 100) * 1000);
                 List<(double, double)> points = new List<(double, double)>();
-                points.Add((station.CxLon.Value, station.CxLat.Value));
+                points.Add((cxLon, cxLat));
                 points.Add((endpoint.Item1, endpoint.Item2));
-                mapControl1.DrawCXLine($"测向线角度:{cx.Fx}°\t\n", points, true);
+                mapControl1.DrawCXLine($"测向线角度:{deg}°\t\n", points, true);
             }
             catch (Exception ex)
             {
                 Serilog.Log.Error(ex, $"绘制测向线失败.PosID={info.ID},SigTime={info.SigTime}");
-                DxHelper.MsgBoxHelper.ShowWarning($"绘制测向线失败");
+                DxHelper.MsgBoxHelper.ShowWarning($"绘制测向线失败,{ex.Message}");
             }
         }
     }

+ 65 - 5
XdCxRhDW.App/EditForms/X2D1DTOParamEditor.cs

@@ -122,12 +122,74 @@ namespace XdCxRhDW.App.EditForms
             {
                 return false;
             }
+
+            if (!txtDtoSx.CheckDouble(dxErrorProvider, "双星时差"))
+            {
+                return false;
+            }
+            if (!txtDtoCdb.CheckDouble(dxErrorProvider, "主星超短时差"))
+            {
+                return false;
+            }
+            if (info.PosResType == EnumPosResType.X2D1 && !txtYbMain.CheckDouble(dxErrorProvider, "样本主星时差"))
+            {
+                return false;
+            }
+            if (info.PosResType == EnumPosResType.X2D1 && !txtYbAdja.CheckDouble(dxErrorProvider, "样本邻星时差"))
+            {
+                return false;
+            }
+            if (!ucEphXYZMain.CheckEphXYZ(dxErrorProvider))
+            {
+                return false;
+            }
+            if (!ucEphXYZAdaj.CheckEphXYZ(dxErrorProvider))
+            {
+                return false;
+            }
             return true;
         }
 
         public bool CheckPosParam()
         {
             dxErrorProvider.ClearErrors();
+            if (!txtsatStation.CheckLonLat(dxErrorProvider, "接收站"))
+            {
+                return false;
+            }
+            if (!txtcdbStation.CheckLonLat(dxErrorProvider, "超短波"))
+            {
+                return false;
+            }
+            if (info.PosResType == EnumPosResType.X2D1 && !txtRefLocation.CheckLonLat(dxErrorProvider, "参考站"))
+            {
+                return false;
+            }
+
+            if (!txtDtoSx.CheckDouble(dxErrorProvider, "双星时差"))
+            {
+                return false;
+            }
+            if (!txtDtoCdb.CheckDouble(dxErrorProvider, "主星超短时差"))
+            {
+                return false;
+            }
+            if (info.PosResType == EnumPosResType.X2D1 && !txtYbMain.CheckDouble(dxErrorProvider, "样本主星时差"))
+            {
+                return false;
+            }
+            if (info.PosResType == EnumPosResType.X2D1 && !txtYbAdja.CheckDouble(dxErrorProvider, "样本邻星时差"))
+            {
+                return false;
+            }
+            if (!ucEphXYZMain.CheckEphXYZ(dxErrorProvider))
+            {
+                return false;
+            }
+            if (!ucEphXYZAdaj.CheckEphXYZ(dxErrorProvider))
+            {
+                return false;
+            }
             return true;
         }
 
@@ -194,12 +256,13 @@ namespace XdCxRhDW.App.EditForms
             catch (Exception ex)
             {
                 Serilog.Log.Error(ex, $"绘制{info.PosResType.GetEnumDisplayName()}时差线失败.PosID={info.ID},SigTime={info.SigTime}");
-                DxHelper.MsgBoxHelper.ShowWarning($"绘制{info.PosResType.GetEnumDisplayName()}时差线失败");
+                DxHelper.MsgBoxHelper.ShowWarning($"绘制{info.PosResType.GetEnumDisplayName()}时差线失败,{ex.Message}");
             }
         }
 
         private async void btnEphCalc_Click(object sender, EventArgs e)
         {
+            dxErrorProvider.ClearErrors();
             if (this.txtSigTime.DateTime == DateTime.MinValue)
             {
                 DxHelper.MsgBoxHelper.ShowWarning("信号时间不能为空!");
@@ -269,10 +332,8 @@ namespace XdCxRhDW.App.EditForms
                 };
 
 
-                string url = string.Format("http://{0}:{1}/Api/Pos/", IpHelper.GetLocalIp(), SysConfig.Config.HttpPort);
                 if (info.PosResType == EnumPosResType.X2D1NoRef)
                 {
-                    url += "PosX2D1NoParAsync";
                     X2D1NoParPosDto dto = new X2D1NoParPosDto()
                     {
                         SigTime = sigTime,
@@ -316,7 +377,6 @@ namespace XdCxRhDW.App.EditForms
                 }
                 else
                 {
-                    url += "PosX2D1Async";
                     X2D1PosDto dto = new X2D1PosDto()
                     {
                         SigTime = sigTime,
@@ -368,7 +428,7 @@ namespace XdCxRhDW.App.EditForms
             catch (Exception ex)
             {
                 Serilog.Log.Error(ex, $"{info.PosResType.GetEnumDisplayName()}手动定位失败.PosID={info.ID},SigTime={info.SigTime}");
-                DxHelper.MsgBoxHelper.ShowWarning($"{info.PosResType.GetEnumDisplayName()}手动定位失败");
+                DxHelper.MsgBoxHelper.ShowWarning($"{info.PosResType.GetEnumDisplayName()}手动定位失败,{ex.Message}");
             }
         }
     }

+ 159 - 17
XdCxRhDW.App/EditForms/X2DTOParamEditor.cs

@@ -108,17 +108,142 @@ namespace XdCxRhDW.App.EditForms
             {
                 return false;
             }
+
+            if (!txtDtoSx.CheckDouble(dxErrorProvider, "双星时差"))
+            {
+                return false;
+            }
+
+            if (!txtYbMain.CheckDouble(dxErrorProvider, "样本主星时差"))
+            {
+                return false;
+            }
+            if (!txtYbAdja.CheckDouble(dxErrorProvider, "样本邻星时差"))
+            {
+                return false;
+            }
+            if (!ucEphXYZMain.CheckEphXYZ(dxErrorProvider))
+            {
+                return false;
+            }
+            if (!ucEphXYZAdja.CheckEphXYZ(dxErrorProvider))
+            {
+                return false;
+            }
             return true;
         }
         public bool CheckPosParam()
         {
             dxErrorProvider.ClearErrors();
+            if (!txtsatStation.CheckLonLat(dxErrorProvider, "接收站"))
+            {
+                return false;
+            }
+            if (!txtRefLocation.CheckLonLat(dxErrorProvider, "参考站"))
+            {
+                return false;
+            }
+            if (!txtDtoSx.CheckDouble(dxErrorProvider, "双星时差"))
+            {
+                return false;
+            }
+
+            if (!txtYbMain.CheckDouble(dxErrorProvider, "样本主星时差"))
+            {
+                return false;
+            }
+            if (!txtYbAdja.CheckDouble(dxErrorProvider, "样本邻星时差"))
+            {
+                return false;
+            }
+            if (!ucEphXYZMain.CheckEph(dxErrorProvider))
+            {
+                return false;
+            }
+            if (!ucEphXYZAdja.CheckEph(dxErrorProvider))
+            {
+                return false;
+            }
+            if (!txtDfo.CheckDouble(dxErrorProvider, "双星频差"))
+            {
+                return false;
+            }
+            if (!txtYbMainDfo.CheckDouble(dxErrorProvider, "样本主星频差"))
+            {
+                return false;
+            }
+            if (!txtYbAdjaDfo.CheckDouble(dxErrorProvider, "样本邻星频差"))
+            {
+                return false;
+            }
+
+            if (!txtTarFreqUp.CheckDouble(dxErrorProvider, "目标上行频点"))
+            {
+                return false;
+            }
+            if (!txtTarFreqDown.CheckDouble(dxErrorProvider, "目标下行频点"))
+            {
+                return false;
+            }
+            if (!txtRefFreqUp.CheckDouble(dxErrorProvider, "参考上行频点"))
+            {
+                return false;
+            }
+            if (!txtRefFreqDown.CheckDouble(dxErrorProvider, "参考下行频点"))
+            {
+                return false;
+            }
             return true;
         }
 
         public bool CheckDfoLineParam()
         {
             dxErrorProvider.ClearErrors();
+            if (!txtsatStation.CheckLonLat(dxErrorProvider, "接收站"))
+            {
+                return false;
+            }
+            if (!txtRefLocation.CheckLonLat(dxErrorProvider, "参考站"))
+            {
+                return false;
+            }
+            if (!ucEphXYZMain.CheckEph(dxErrorProvider))
+            {
+                return false;
+            }
+            if (!ucEphXYZAdja.CheckEph(dxErrorProvider))
+            {
+                return false;
+            }
+            if (!txtDfo.CheckDouble(dxErrorProvider, "双星频差"))
+            {
+                return false;
+            }
+            if (!txtYbMainDfo.CheckDouble(dxErrorProvider, "样本主星频差"))
+            {
+                return false;
+            }
+            if (!txtYbAdjaDfo.CheckDouble(dxErrorProvider, "样本邻星频差"))
+            {
+                return false;
+            }
+
+            if (!txtTarFreqUp.CheckDouble(dxErrorProvider, "目标上行频点"))
+            {
+                return false;
+            }
+            if (!txtTarFreqDown.CheckDouble(dxErrorProvider, "目标下行频点"))
+            {
+                return false;
+            }
+            if (!txtRefFreqUp.CheckDouble(dxErrorProvider, "参考上行频点"))
+            {
+                return false;
+            }
+            if (!txtRefFreqDown.CheckDouble(dxErrorProvider, "参考下行频点"))
+            {
+                return false;
+            }
             return true;
         }
 
@@ -228,13 +353,14 @@ namespace XdCxRhDW.App.EditForms
             catch (Exception ex)
             {
                 Serilog.Log.Error(ex, $"{info.PosResType.GetEnumDisplayName()}手动定位失败.PosID={info.ID},SigTime={info.SigTime}");
-                DxHelper.MsgBoxHelper.ShowWarning($"{info.PosResType.GetEnumDisplayName()}手动定位失败");
+                DxHelper.MsgBoxHelper.ShowWarning($"{info.PosResType.GetEnumDisplayName()}手动定位失败,{ex.Message}");
             }
         }
 
 
         private async void txtEphCalc_Click(object sender, EventArgs e)
         {
+            dxErrorProvider.ClearErrors();
             if (txtSigTime.DateTime == DateTime.MinValue)
             {
                 DxHelper.MsgBoxHelper.ShowWarning("信号时间不能为空!");
@@ -288,8 +414,8 @@ namespace XdCxRhDW.App.EditForms
                 var DtoSx = Convert.ToDouble(this.txtDtoSx.Text);
                 var YbMainDto = Convert.ToDouble(this.txtYbMain.Text);
                 var YbAdja1Dto = Convert.ToDouble(this.txtYbAdja.Text);
-                double[] msEph = ucEphXYZMain.EphParam().Take(3).ToArray();
-                double[] Ns1Eph = ucEphXYZAdja.EphParam().Take(3).ToArray();
+                double[] msEph = ucEphXYZMain.EphXYZ();
+                double[] Ns1Eph = ucEphXYZAdja.EphXYZ();
                 DtoLineTwoStartOption twoStartOption = new DtoLineTwoStartOption();
                 twoStartOption.MsEph = msEph;
                 twoStartOption.NsEph = Ns1Eph;
@@ -310,7 +436,7 @@ namespace XdCxRhDW.App.EditForms
             catch (Exception ex)
             {
                 Serilog.Log.Error(ex, $"绘制{info.PosResType.GetEnumDisplayName()}时差线失败.PosID={info.ID},SigTime={info.SigTime}");
-                DxHelper.MsgBoxHelper.ShowWarning($"绘制{info.PosResType.GetEnumDisplayName()}时差线失败");
+                DxHelper.MsgBoxHelper.ShowWarning($"绘制{info.PosResType.GetEnumDisplayName()}时差线失败,{ex.Message}");
             }
         }
 
@@ -319,20 +445,36 @@ namespace XdCxRhDW.App.EditForms
             if (!CheckDfoLineParam()) { return; }
             try
             {
+                var MsAnt = txtsatStation.GetLonLat();
+                var RefGeod = txtRefLocation.GetLonLat();
+
+                var msEph = ucEphXYZMain.EphParam();
+                var ns1Eph = ucEphXYZAdja.EphParam();
+
+                var Dfo = Convert.ToDouble(this.txtDfo.Text);
+                var YbMainDfo = Convert.ToDouble(this.txtYbMainDfo.Text);
+                var YbAdja1Dfo = Convert.ToDouble(this.txtYbAdjaDfo.Text);
+                var TarFreqUp = Convert.ToDouble(this.txtTarFreqUp.Text) * 1e6;
+                var TarFreqDown = Convert.ToDouble(this.txtTarFreqDown.Text) * 1e6;
+                var RefFreqUp = Convert.ToDouble(this.txtRefFreqUp.Text) * 1e6;
+                var RefFreqDown = Convert.ToDouble(this.txtRefFreqDown.Text) * 1e6;
+
+
                 DfoLineTwoStartOption twoStartOption = new DfoLineTwoStartOption();
-                twoStartOption.Freq = cg.TarFreqUp.HasValue ? cg.TarFreqUp.Value : 0;
-                twoStartOption.RefFreq = cg.RefFreqUp.HasValue ? cg.RefFreqUp.Value : 0;
-                twoStartOption.MsEph = new double[] { cg.MainX.Value, cg.MainY.Value, cg.MainZ.Value, cg.MainVx.Value, cg.MainVy.Value, cg.MainVz.Value };
-                twoStartOption.NsEph = new double[] { cg.Adja1X.Value, cg.Adja1Y.Value, cg.Adja1Z.Value, cg.Adja1Vx.Value, cg.Adja1Vy.Value, cg.Adja1Vz.Value };
-                twoStartOption.MsAnt = new double[] { station.SatTxLon, station.SatTxLat, 0 };
-                twoStartOption.NsAnt = new double[] { station.SatTxLon, station.SatTxLat, 0 };
-                twoStartOption.RefGeod = new double[] { station.RefLon.Value, station.RefLat.Value, 0 };
-                twoStartOption.TargetDfo = cg.Dfo1.Value;
-                twoStartOption.Turn1 = Math.Abs(twoStartOption.Freq - (cg.TarFreqDown.HasValue ? cg.TarFreqDown.Value : 0));
-                twoStartOption.Turn2 = Math.Abs(twoStartOption.RefFreq - (cg.RefFreqDown.HasValue ? cg.RefFreqDown.Value : 0));
-                twoStartOption.RefDfo = cg.YbMainDfo.Value - cg.YbAdja1Dfo.Value;
+                twoStartOption.Freq = TarFreqUp;
+                twoStartOption.RefFreq = RefFreqUp;
+                twoStartOption.MsEph = msEph;
+                twoStartOption.NsEph = ns1Eph;
+                twoStartOption.MsAnt = MsAnt;
+                twoStartOption.NsAnt = MsAnt;
+                twoStartOption.RefGeod = RefGeod;
+                twoStartOption.TargetDfo = Dfo;
+                twoStartOption.Turn1 = Math.Abs(twoStartOption.Freq - TarFreqDown);
+                twoStartOption.Turn2 = Math.Abs(twoStartOption.RefFreq - RefFreqDown);
+                twoStartOption.RefDfo = YbMainDfo - YbAdja1Dfo;
+
                 var tsDtoLine = DrawDfoLineHelper.DfoLineTwoStart(twoStartOption);
-                var msat = listSat?.FirstOrDefault(m => m.SatCode == cg.MainCode.Value)?.Sat; ;
+                var msat = listSat?.FirstOrDefault(m => m.SatCode == cg.MainCode.Value)?.Sat;
                 var ad1sat = listSat?.FirstOrDefault(m => m.SatCode == cg.Adja1Code.Value)?.Sat;
                 if (msat == null) msat = cg.MainCode.ToString();
                 if (ad1sat == null) ad1sat = cg.Adja1Code.ToString();
@@ -341,7 +483,7 @@ namespace XdCxRhDW.App.EditForms
             catch (Exception ex)
             {
                 Serilog.Log.Error(ex, $"绘制{info.PosResType.GetEnumDisplayName()}频差线失败.PosID={info.ID},SigTime={info.SigTime}");
-                DxHelper.MsgBoxHelper.ShowError($"绘制{info.PosResType.GetEnumDisplayName()}频差线失败");
+                DxHelper.MsgBoxHelper.ShowError($"绘制{info.PosResType.GetEnumDisplayName()}频差线失败,{ex.Message}");
             }
         }
     }

+ 20 - 20
XdCxRhDW.App/EditForms/X3DTOParamEditor.Designer.cs

@@ -169,7 +169,7 @@
             // sigTime
             // 
             this.sigTime.EditValue = null;
-            this.sigTime.Location = new System.Drawing.Point(426, 75);
+            this.sigTime.Location = new System.Drawing.Point(440, 75);
             this.sigTime.Name = "sigTime";
             this.sigTime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
@@ -180,7 +180,7 @@
             this.sigTime.Properties.EditFormat.FormatString = "yyyy-MM-dd HH:mm:ss";
             this.sigTime.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
             this.sigTime.Properties.MaskSettings.Set("mask", "yyyy-MM-dd HH:mm:ss");
-            this.sigTime.Size = new System.Drawing.Size(202, 20);
+            this.sigTime.Size = new System.Drawing.Size(188, 20);
             this.sigTime.StyleController = this.layoutControl1;
             this.sigTime.TabIndex = 9;
             // 
@@ -192,19 +192,19 @@
             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, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.txtDtoSx.Properties.NullValuePrompt = "必需";
-            this.txtDtoSx.Size = new System.Drawing.Size(201, 20);
+            this.txtDtoSx.Size = new System.Drawing.Size(225, 20);
             this.txtDtoSx.StyleController = this.layoutControl1;
             this.txtDtoSx.TabIndex = 6;
             // 
             // txtDtoSx1
             // 
-            this.txtDtoSx1.Location = new System.Drawing.Point(221, 75);
+            this.txtDtoSx1.Location = new System.Drawing.Point(245, 75);
             this.txtDtoSx1.MaximumSize = new System.Drawing.Size(0, 20);
             this.txtDtoSx1.Name = "txtDtoSx1";
             this.txtDtoSx1.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)});
             this.txtDtoSx1.Properties.NullValuePrompt = "必需";
-            this.txtDtoSx1.Size = new System.Drawing.Size(201, 20);
+            this.txtDtoSx1.Size = new System.Drawing.Size(191, 20);
             this.txtDtoSx1.StyleController = this.layoutControl1;
             this.txtDtoSx1.TabIndex = 6;
             // 
@@ -215,18 +215,18 @@
             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, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
-            this.txtYbMain.Size = new System.Drawing.Size(201, 20);
+            this.txtYbMain.Size = new System.Drawing.Size(225, 20);
             this.txtYbMain.StyleController = this.layoutControl1;
             this.txtYbMain.TabIndex = 6;
             // 
             // txtYbAdja
             // 
-            this.txtYbAdja.Location = new System.Drawing.Point(219, 121);
+            this.txtYbAdja.Location = new System.Drawing.Point(243, 121);
             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, editorButtonImageOptions4, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject13, serializableAppearanceObject14, serializableAppearanceObject15, serializableAppearanceObject16, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
-            this.txtYbAdja.Size = new System.Drawing.Size(203, 20);
+            this.txtYbAdja.Size = new System.Drawing.Size(193, 20);
             this.txtYbAdja.StyleController = this.layoutControl1;
             this.txtYbAdja.TabIndex = 6;
             // 
@@ -267,12 +267,12 @@
             // 
             // txtYbAdja1
             // 
-            this.txtYbAdja1.Location = new System.Drawing.Point(426, 121);
+            this.txtYbAdja1.Location = new System.Drawing.Point(440, 121);
             this.txtYbAdja1.MaximumSize = new System.Drawing.Size(0, 20);
             this.txtYbAdja1.Name = "txtYbAdja1";
             this.txtYbAdja1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "us", -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.txtYbAdja1.Size = new System.Drawing.Size(202, 20);
+            this.txtYbAdja1.Size = new System.Drawing.Size(188, 20);
             this.txtYbAdja1.StyleController = this.layoutControl1;
             this.txtYbAdja1.TabIndex = 6;
             // 
@@ -358,7 +358,7 @@
             this.layoutControlItem7.MaxSize = new System.Drawing.Size(0, 46);
             this.layoutControlItem7.MinSize = new System.Drawing.Size(54, 46);
             this.layoutControlItem7.Name = "layoutControlItem7";
-            this.layoutControlItem7.Size = new System.Drawing.Size(207, 46);
+            this.layoutControlItem7.Size = new System.Drawing.Size(231, 46);
             this.layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem7.Spacing = new DevExpress.XtraLayout.Utils.Padding(2, 0, 0, 0);
             this.layoutControlItem7.Text = "样本主星时差";
@@ -387,11 +387,11 @@
             this.layoutControlItem8.Control = this.txtYbAdja;
             this.layoutControlItem8.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem8.CustomizationFormText = "轨道经度";
-            this.layoutControlItem8.Location = new System.Drawing.Point(207, 92);
+            this.layoutControlItem8.Location = new System.Drawing.Point(231, 92);
             this.layoutControlItem8.MaxSize = new System.Drawing.Size(0, 46);
             this.layoutControlItem8.MinSize = new System.Drawing.Size(54, 46);
             this.layoutControlItem8.Name = "layoutControlItem8";
-            this.layoutControlItem8.Size = new System.Drawing.Size(207, 46);
+            this.layoutControlItem8.Size = new System.Drawing.Size(197, 46);
             this.layoutControlItem8.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem8.Text = "样本邻星1时差";
             this.layoutControlItem8.TextLocation = DevExpress.Utils.Locations.Top;
@@ -402,11 +402,11 @@
             this.layoutControlItem18.Control = this.txtYbAdja1;
             this.layoutControlItem18.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem18.CustomizationFormText = "轨道经度";
-            this.layoutControlItem18.Location = new System.Drawing.Point(414, 92);
+            this.layoutControlItem18.Location = new System.Drawing.Point(428, 92);
             this.layoutControlItem18.MaxSize = new System.Drawing.Size(0, 46);
             this.layoutControlItem18.MinSize = new System.Drawing.Size(54, 46);
             this.layoutControlItem18.Name = "layoutControlItem18";
-            this.layoutControlItem18.Size = new System.Drawing.Size(208, 46);
+            this.layoutControlItem18.Size = new System.Drawing.Size(194, 46);
             this.layoutControlItem18.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem18.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 2, 0, 0);
             this.layoutControlItem18.Text = "样本邻星2时差";
@@ -441,11 +441,11 @@
             this.layoutControlItem6.Control = this.txtDtoSx1;
             this.layoutControlItem6.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem6.CustomizationFormText = "轨道经度";
-            this.layoutControlItem6.Location = new System.Drawing.Point(207, 46);
+            this.layoutControlItem6.Location = new System.Drawing.Point(231, 46);
             this.layoutControlItem6.MaxSize = new System.Drawing.Size(0, 46);
             this.layoutControlItem6.MinSize = new System.Drawing.Size(1, 1);
             this.layoutControlItem6.Name = "layoutControlItem6";
-            this.layoutControlItem6.Size = new System.Drawing.Size(207, 46);
+            this.layoutControlItem6.Size = new System.Drawing.Size(197, 46);
             this.layoutControlItem6.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem6.Spacing = new DevExpress.XtraLayout.Utils.Padding(2, 0, 0, 0);
             this.layoutControlItem6.Text = "主邻2时差";
@@ -455,11 +455,11 @@
             // itemSigTime
             // 
             this.itemSigTime.Control = this.sigTime;
-            this.itemSigTime.Location = new System.Drawing.Point(414, 46);
+            this.itemSigTime.Location = new System.Drawing.Point(428, 46);
             this.itemSigTime.MaxSize = new System.Drawing.Size(0, 46);
             this.itemSigTime.MinSize = new System.Drawing.Size(83, 46);
             this.itemSigTime.Name = "itemSigTime";
-            this.itemSigTime.Size = new System.Drawing.Size(208, 46);
+            this.itemSigTime.Size = new System.Drawing.Size(194, 46);
             this.itemSigTime.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.itemSigTime.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 2, 0, 0);
             this.itemSigTime.Text = "信号时间";
@@ -527,7 +527,7 @@
             this.layoutControlItem2.MaxSize = new System.Drawing.Size(0, 46);
             this.layoutControlItem2.MinSize = new System.Drawing.Size(54, 46);
             this.layoutControlItem2.Name = "layoutControlItem2";
-            this.layoutControlItem2.Size = new System.Drawing.Size(207, 46);
+            this.layoutControlItem2.Size = new System.Drawing.Size(231, 46);
             this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem2.Spacing = new DevExpress.XtraLayout.Utils.Padding(0, 2, 0, 0);
             this.layoutControlItem2.Text = "主邻1时差";

+ 40 - 11
XdCxRhDW.App/EditForms/X3DTOParamEditor.cs

@@ -97,7 +97,7 @@ namespace XdCxRhDW.App.EditForms
 
         }
 
-        public bool CheckDtoLineParam()
+        public bool CheckParam()
         {
             dxErrorProvider.ClearErrors();
             if (!txtsatStation.CheckLonLat(dxErrorProvider, "接收站"))
@@ -108,17 +108,45 @@ namespace XdCxRhDW.App.EditForms
             {
                 return false;
             }
+            if (!txtDtoSx.CheckDouble(dxErrorProvider, "主邻1时差"))
+            {
+                return false;
+            }
+            if (!txtDtoSx1.CheckDouble(dxErrorProvider, "主邻2时差"))
+            {
+                return false;
+            }
+            if (info.PosResType == EnumPosResType.X3 && !txtYbMain.CheckDouble(dxErrorProvider, "样本主星时差"))
+            {
+                return false;
+            }
+            if (info.PosResType == EnumPosResType.X3 && !txtYbAdja.CheckDouble(dxErrorProvider, "样本邻星1时差"))
+            {
+                return false;
+            }
+            if (info.PosResType == EnumPosResType.X3 && !txtYbAdja1.CheckDouble(dxErrorProvider, "样本邻星2时差"))
+            {
+                return false;
+            }
+            if (!ucEphXYZMain.CheckEphXYZ(dxErrorProvider))
+            {
+                return false;
+            }
+            if (!ucEphXYZAdja1.CheckEphXYZ(dxErrorProvider))
+            {
+                return false;
+            }
+            if (!ucEphXYZAdja2.CheckEphXYZ(dxErrorProvider))
+            {
+                return false;
+            }
             return true;
         }
-        public bool CheckPosParam()
-        {
-            dxErrorProvider.ClearErrors();
-            return true;
-        }
+      
 
         private void btnDtoLine_Click(object sender, EventArgs e)
         {
-            if (!CheckDtoLineParam()) { return; }
+            if (!CheckParam()) { return; }
             try
             {
 
@@ -178,12 +206,13 @@ namespace XdCxRhDW.App.EditForms
             catch (Exception ex)
             {
                 Serilog.Log.Error(ex, $"绘制{info.PosResType.GetEnumDisplayName()}时差线失败.PosID={info.ID},SigTime={info.SigTime}");
-                DxHelper.MsgBoxHelper.ShowWarning($"绘制{info.PosResType.GetEnumDisplayName()}时差线失败");
+                DxHelper.MsgBoxHelper.ShowWarning($"绘制{info.PosResType.GetEnumDisplayName()}时差线失败,{ex.Message}");
             }
         }
 
         private async void btnEphCalc_Click(object sender, EventArgs e)
         {
+            dxErrorProvider.ClearErrors();
             if (this.sigTime.DateTime == DateTime.MinValue)
             {
                 DxHelper.MsgBoxHelper.ShowWarning("信号时间不能为空!");
@@ -227,14 +256,14 @@ namespace XdCxRhDW.App.EditForms
             catch (Exception ex)
             {
                 Serilog.Log.Error(ex, $"手动{info.PosResType.GetEnumDisplayName()}推算星历失败.PosID={info.ID},SigTime={info.SigTime}");
-                DxHelper.MsgBoxHelper.ShowWarning($"手动{info.PosResType.GetEnumDisplayName()}推算星历失败");
+                DxHelper.MsgBoxHelper.ShowWarning($"手动{info.PosResType.GetEnumDisplayName()}推算星历失败,{ex.Message}");
             }
 
         }
 
         private void btnPos_Click(object sender, EventArgs e)
         {
-            if (!CheckPosParam()) { return; }
+            if (!CheckParam()) { return; }
             try
             {
 
@@ -285,7 +314,7 @@ namespace XdCxRhDW.App.EditForms
             catch (Exception ex)
             {
                 Serilog.Log.Error(ex, $"{info.PosResType.GetEnumDisplayName()}手动定位失败.PosID={info.ID},SigTime={info.SigTime}");
-                DxHelper.MsgBoxHelper.ShowWarning($"{info.PosResType.GetEnumDisplayName()}手动定位失败");
+                DxHelper.MsgBoxHelper.ShowWarning($"{info.PosResType.GetEnumDisplayName()}手动定位失败,{ex.Message}");
             }
         }
     }

+ 121 - 39
XdCxRhDW.App/EditForms/X3DfoParamEditor.cs

@@ -117,42 +117,103 @@ namespace XdCxRhDW.App.EditForms
             {
                 return false;
             }
-            if (!double.TryParse(txtDto1.Text, out double _))
+            if (!txtDto1.CheckDouble(dxErrorProvider, "主邻1时差"))
             {
-                dxErrorProvider.SetError(txtDto1, "主邻1时差不能为空");
                 return false;
             }
-            if (!double.TryParse(txtDto2.Text, out double _))
+            if (!txtDto2.CheckDouble(dxErrorProvider, "主邻2时差"))
             {
-                dxErrorProvider.SetError(txtDto2, "主邻2时差不能为空");
                 return false;
             }
-            if (!double.TryParse(txtYbDto1.Text, out double _))
+
+            if (!txtYbDto1.CheckDouble(dxErrorProvider, "样本主星时差"))
             {
-                dxErrorProvider.SetError(txtYbDto1, "样本主星时差不能为空");
                 return false;
             }
-            if (!double.TryParse(txtYbDto2.Text, out double _))
+            if (!txtYbDto2.CheckDouble(dxErrorProvider, "样本邻星1时差"))
             {
-                dxErrorProvider.SetError(txtYbDto2, "样本邻1星时差不能为空");
                 return false;
             }
-            if (!double.TryParse(txtYbDto3.Text, out double _))
+            if (!txtYbDto3.CheckDouble(dxErrorProvider, "样本邻星2时差"))
+            {
+                return false;
+            }
+            if (!ucEphXYZMain.CheckEphXYZ(dxErrorProvider))
+            {
+                return false;
+            }
+            if (!ucEphXYZAdja1.CheckEphXYZ(dxErrorProvider))
+            {
+                return false;
+            }
+            if (!ucEphXYZAdja2.CheckEphXYZ(dxErrorProvider))
             {
-                dxErrorProvider.SetError(txtYbDto3, "样本邻2星时差不能为空");
                 return false;
             }
             return true;
         }
-        public bool CheckDfoParam()
-        {
-            dxErrorProvider.ClearErrors();
-            return true;
-        }
+      
 
         public bool CheckPosParam()
         {
             dxErrorProvider.ClearErrors();
+            if (!txtsatStation.CheckLonLat(dxErrorProvider, "接收站"))
+            {
+                return false;
+            }
+            if (!txtRefLocation.CheckLonLat(dxErrorProvider, "参考站"))
+            {
+                return false;
+            }
+            if (!txtDfo1.CheckDouble(dxErrorProvider, "主邻1频差"))
+            {
+                return false;
+            }
+            if (!txtDfo2.CheckDouble(dxErrorProvider, "主邻2频差"))
+            {
+                return false;
+            }
+
+            if (!txtYbDfo1.CheckDouble(dxErrorProvider, "样本主星频差"))
+            {
+                return false;
+            }
+            if (!txtYbDfo2.CheckDouble(dxErrorProvider, "样本邻星1频差"))
+            {
+                return false;
+            }
+            if (!txtYbDfo3.CheckDouble(dxErrorProvider, "样本邻星2频差"))
+            {
+                return false;
+            }
+            if (!txtTargetFreq.CheckDouble(dxErrorProvider, "目标上行频点"))
+            {
+                return false;
+            }
+            if (!txtTargetDFreq.CheckDouble(dxErrorProvider, "目标下行频点"))
+            {
+                return false;
+            }
+            if (!txtRefFreq.CheckDouble(dxErrorProvider, "参考上行频点"))
+            {
+                return false;
+            }
+            if (!txtRefDFreq.CheckDouble(dxErrorProvider, "参考下行频点"))
+            {
+                return false;
+            }
+            if (!ucEphXYZMain.CheckEph(dxErrorProvider))
+            {
+                return false;
+            }
+            if (!ucEphXYZAdja1.CheckEph(dxErrorProvider))
+            {
+                return false;
+            }
+            if (!ucEphXYZAdja2.CheckEph(dxErrorProvider))
+            {
+                return false;
+            }
             return true;
         }
 
@@ -228,12 +289,13 @@ namespace XdCxRhDW.App.EditForms
             catch (Exception ex)
             {
                 Serilog.Log.Error(ex, $"{info.PosResType.GetEnumDisplayName()}手动定位失败.PosID={info.ID},SigTime={info.SigTime}");
-                DxHelper.MsgBoxHelper.ShowWarning($"{info.PosResType.GetEnumDisplayName()}手动定位失败");
+                DxHelper.MsgBoxHelper.ShowWarning($"{info.PosResType.GetEnumDisplayName()}手动定位失败,{ex.Message}");
             }
         }
 
         private async void btnXl_Click(object sender, EventArgs e)
         {
+            dxErrorProvider.ClearErrors();
             if (this.sigTime.DateTime == DateTime.MinValue)
             {
                 DxHelper.MsgBoxHelper.ShowWarning("信号时间不能为空!");
@@ -277,7 +339,7 @@ namespace XdCxRhDW.App.EditForms
             catch (Exception ex)
             {
                 Serilog.Log.Error(ex, $"手动{info.PosResType.GetEnumDisplayName()}推算星历失败.PosID={info.ID},SigTime={info.SigTime}");
-                DxHelper.MsgBoxHelper.ShowWarning($"手动{info.PosResType.GetEnumDisplayName()}推算星历失败");
+                DxHelper.MsgBoxHelper.ShowWarning($"手动{info.PosResType.GetEnumDisplayName()}推算星历失败,{ex.Message}");
             }
 
         }
@@ -289,7 +351,7 @@ namespace XdCxRhDW.App.EditForms
             {
 
                 var MsAnt = txtsatStation.GetLonLat();
-                var RefGeod = info.PosResType == EnumPosResType.X3 ? txtRefLocation.GetLonLat() : new double[3] { 0, 0, 0 };
+                var RefGeod = txtRefLocation.GetLonLat();
 
                 var DtoSx = Convert.ToDouble(this.txtDto1.Text);
                 var DtoSx1 = Convert.ToDouble(this.txtDto2.Text);
@@ -298,9 +360,9 @@ namespace XdCxRhDW.App.EditForms
                 var YbAdja2Dto = Convert.ToDouble(this.txtYbDto3.Text);
 
 
-                double[] msEph = ucEphXYZMain.EphParam().Take(3).ToArray();
-                double[] Ns1Eph = ucEphXYZAdja1.EphParam().Take(3).ToArray();
-                double[] Ns2Eph = ucEphXYZAdja2.EphParam().Take(3).ToArray();
+                double[] msEph = ucEphXYZMain.EphXYZ();
+                double[] Ns1Eph = ucEphXYZAdja1.EphXYZ();
+                double[] Ns2Eph = ucEphXYZAdja2.EphXYZ();
 
 
                 DtoLineTwoStartOption twoStartOption = new DtoLineTwoStartOption();
@@ -330,36 +392,56 @@ namespace XdCxRhDW.App.EditForms
             catch (Exception ex)
             {
                 Serilog.Log.Error(ex, $"绘制{info.PosResType.GetEnumDisplayName()}时差线失败.PosID={info.ID},SigTime={info.SigTime}");
-                DxHelper.MsgBoxHelper.ShowWarning($"绘制{info.PosResType.GetEnumDisplayName()}时差线失败");
+                DxHelper.MsgBoxHelper.ShowWarning($"绘制{info.PosResType.GetEnumDisplayName()}时差线失败,{ex.Message}");
             }
         }
 
         private void btnDfoCalc_Click(object sender, EventArgs e)
         {
-            if (!CheckDtoLineParam()) { return; }
+            if (!CheckPosParam()) { return; }
             try
             {
+
+                var MsAnt = txtsatStation.GetLonLat();
+                var RefGeod = txtRefLocation.GetLonLat();
+
+                var sigTime = this.sigTime.DateTime;
+                var DfoSx = Convert.ToDouble(this.txtDfo1.Text);
+                var DfoSx1 = Convert.ToDouble(this.txtDfo2.Text);
+                var YbMainDfo = Convert.ToDouble(this.txtYbDfo1.Text);
+                var YbAdja1Dfo = Convert.ToDouble(this.txtYbDfo2.Text);
+                var YbAdja2Dfo = Convert.ToDouble(this.txtYbDfo3.Text);
+
+                var tFreq = Convert.ToDouble(this.txtTargetFreq.Text) * 1e6;
+                var tdFreq = Convert.ToDouble(this.txtTargetDFreq.Text) * 1e6;
+                var rFreq = Convert.ToDouble(this.txtRefFreq.Text) * 1e6;
+                var rdFreq = Convert.ToDouble(this.txtRefDFreq.Text) * 1e6;
+
+                var msEph = ucEphXYZMain.EphParam();
+                var ns1Eph = ucEphXYZAdja1.EphParam();
+                var ns2Eph = ucEphXYZAdja2.EphParam();
+
                 DfoLineTwoStartOption twoStartOption = new DfoLineTwoStartOption();
-                twoStartOption.Freq = cg.TarFreqUp.HasValue ? cg.TarFreqUp.Value : 0;
-                twoStartOption.RefFreq = cg.RefFreqUp.HasValue ? cg.RefFreqUp.Value : 0;
-                twoStartOption.MsEph = new double[] { cg.MainX.Value, cg.MainY.Value, cg.MainZ.Value, cg.MainVx.Value, cg.MainVy.Value, cg.MainVz.Value };
-                twoStartOption.NsEph = new double[] { cg.Adja1X.Value, cg.Adja1Y.Value, cg.Adja1Z.Value, cg.Adja1Vx.Value, cg.Adja1Vy.Value, cg.Adja1Vz.Value };
-                twoStartOption.MsAnt = new double[] { station.SatTxLon, station.SatTxLat, 0 };
-                twoStartOption.NsAnt = new double[] { station.SatTxLon, station.SatTxLat, 0 };
-                twoStartOption.RefGeod = new double[] { station.RefLon.Value, station.RefLat.Value, 0 };
-                twoStartOption.TargetDfo = cg.Dfo1.Value;
-                twoStartOption.Turn1 = Math.Abs(twoStartOption.Freq - (cg.TarFreqDown.HasValue ? cg.TarFreqDown.Value : 0));
-                twoStartOption.Turn2 = Math.Abs(twoStartOption.RefFreq - (cg.RefFreqDown.HasValue ? cg.RefFreqDown.Value : 0));
-                twoStartOption.RefDfo = cg.YbMainDfo.Value - cg.YbAdja1Dfo.Value;
+                twoStartOption.Freq = tFreq;
+                twoStartOption.RefFreq = rFreq;
+                twoStartOption.MsEph = msEph;
+                twoStartOption.NsEph = ns1Eph;
+                twoStartOption.MsAnt = MsAnt;
+                twoStartOption.NsAnt = MsAnt;
+                twoStartOption.RefGeod = RefGeod;
+                twoStartOption.TargetDfo = DfoSx;
+                twoStartOption.Turn1 = Math.Abs(twoStartOption.Freq - tdFreq);
+                twoStartOption.Turn2 = Math.Abs(twoStartOption.RefFreq - rdFreq);
+                twoStartOption.RefDfo = YbMainDfo - YbAdja1Dfo;
                 var tsDtoLine = DrawDfoLineHelper.DfoLineTwoStart(twoStartOption);
                 var msat = listSat?.FirstOrDefault(m => m.SatCode == cg.MainCode.Value)?.Sat; ;
                 var ad1sat = listSat?.FirstOrDefault(m => m.SatCode == cg.Adja1Code.Value)?.Sat;
                 if (msat == null) msat = cg.MainCode.ToString();
                 if (ad1sat == null) ad1sat = cg.Adja1Code.ToString();
                 mapControl1.DrawDtoLine($"{info.PosResType.GetEnumDisplayName()}[{msat},{ad1sat}]频差线", tsDtoLine);
-                twoStartOption.NsEph = new double[] { cg.Adja2X.Value, cg.Adja2Y.Value, cg.Adja2Z.Value, cg.Adja2Vx.Value, cg.Adja2Vy.Value, cg.Adja2Vz.Value };
-                twoStartOption.TargetDfo = cg.Dfo2.Value;
-                twoStartOption.RefDfo = cg.YbMainDfo.Value - cg.YbAdja2Dfo.Value;
+                twoStartOption.NsEph = ns2Eph;
+                twoStartOption.TargetDfo = DfoSx1;
+                twoStartOption.RefDfo = YbMainDfo - YbAdja2Dfo;
                 var tsDtoLine1 = DrawDfoLineHelper.DfoLineTwoStart(twoStartOption);
                 string ad2sat = string.Empty;
                 if (cg.Adja2Code.HasValue)
@@ -370,8 +452,8 @@ namespace XdCxRhDW.App.EditForms
             }
             catch (Exception ex)
             {
-                Serilog.Log.Error(ex, $"绘制{info.PosResType.GetEnumDisplayName()}频差线失败.PosID={info.ID},SigTime={info.SigTime}");
-                DxHelper.MsgBoxHelper.ShowError($"绘制{info.PosResType.GetEnumDisplayName()}频差线失败");
+                Serilog.Log.Error(ex, $"绘制{info.PosResType.GetEnumDisplayName()}频差线失败.PosID={info.ID},SigTime={sigTime}");
+                DxHelper.MsgBoxHelper.ShowError($"绘制{info.PosResType.GetEnumDisplayName()}频差线失败,{ex.Message}");
             }
         }
     }

+ 1 - 16
XdCxRhDW.App/UserControl/UCEphXYZ.cs

@@ -52,22 +52,7 @@ namespace XdCxRhDW.App.UserControl
             ephZ.EditValue = eph.z.HasValue ? eph.z.Value : 0;
             layoutControlItemz.Text = $"{title}星历Z";
         }
-        public (bool, string) ValidateParam()
-        {
-            if (!double.TryParse(ephX.Text, out double _))
-            {
-                return (false, $"{_title}星历X格式错误!");
-            }
-            if (!double.TryParse(ephY.Text, out double _))
-            {
-                return (false, $"{_title}星历Y格式错误!");
-            }
-            if (!double.TryParse(ephZ.Text, out double _))
-            {
-                return (false, $"{_title}星历Z格式错误!");
-            }
-            return (true, string.Empty);
-        }
+      
         public bool CheckEphXYZ(DXErrorProvider dxErrorProvider)
         {
             if (!ephX.CheckDouble(dxErrorProvider, $"{_title}星历X"))

+ 26 - 2
XdCxRhDW.App/UserControl/UCEphXYZParam.cs

@@ -77,7 +77,6 @@ namespace XdCxRhDW.App.UserControl
             }
             return (true, string.Empty);
         }
-
         public bool CheckEphXYZ(DXErrorProvider dxErrorProvider)
         {
             if (!ephX.CheckDouble(dxErrorProvider, $"{_title}星历X"))
@@ -94,12 +93,30 @@ namespace XdCxRhDW.App.UserControl
             {
                 return false;
             }
+            return true;
+        }
 
-            if (!ephVX.CheckDouble(dxErrorProvider, $"{_title}星历VX"))
+        public bool CheckEph(DXErrorProvider dxErrorProvider)
+        {
+            if (!ephX.CheckDouble(dxErrorProvider, $"{_title}星历X"))
             {
                 return false;
             }
 
+            if (!ephY.CheckDouble(dxErrorProvider, $"{_title}星历Y"))
+            {
+                return false;
+            }
+
+            if (!ephZ.CheckDouble(dxErrorProvider, $"{_title}星历Z"))
+            {
+                return false;
+            }
+
+            if (!ephVX.CheckDouble(dxErrorProvider, $"{_title}星历VX"))
+            {
+                return false;
+            }
             if (!ephVY.CheckDouble(dxErrorProvider, $"{_title}星历VY"))
             {
                 return false;
@@ -123,6 +140,13 @@ namespace XdCxRhDW.App.UserControl
             var vz = Convert.ToDouble(ephVZ.EditValue);
             return new double[6] { x, y, z, vx, vy, vz };
         }
+        public double[] EphXYZ()
+        {
+            var x = Convert.ToDouble(ephX.EditValue);
+            var y = Convert.ToDouble(ephY.EditValue);
+            var z = Convert.ToDouble(ephZ.EditValue);
+            return new double[3] { x, y, z };
+        }
 
         public int GetSatCode()
         {

+ 9 - 0
XdCxRhDW.App/UserControl/X1D1GDOPParam.Designer.cs

@@ -28,6 +28,7 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             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();
@@ -69,6 +70,7 @@
             this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
             this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.dxErrorProvider = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components);
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.txtCapTime.Properties)).BeginInit();
@@ -93,6 +95,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
@@ -443,6 +446,10 @@
             this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem8.TextVisible = false;
             // 
+            // dxErrorProvider
+            // 
+            this.dxErrorProvider.ContainerControl = this;
+            // 
             // X1D1GDOPParam
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
@@ -475,6 +482,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -506,5 +514,6 @@
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
         private DevExpress.XtraEditors.SimpleButton btnEphCalc;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
+        private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider;
     }
 }

+ 38 - 49
XdCxRhDW.App/UserControl/X1D1GDOPParam.cs

@@ -8,6 +8,8 @@ using XdCxRhDW.Repostory;
 using XdCxRhDW.Entity;
 using XdCxRhDW.Api;
 using System.Drawing;
+using DevExpress.XtraCharts.Design;
+using System.Runtime.ConstrainedExecution;
 
 namespace XdCxRhDW.App.UserControl
 {
@@ -18,12 +20,9 @@ namespace XdCxRhDW.App.UserControl
         {
             EphMain = ucEphXYZMain.EphParam(),
             CapTime = txtCapTime.DateTime,
-            StationLon = Convert.ToDouble(txtStationLocation1.Text.Replace(",", ",").Split(',')[0].Trim()),
-            StationLat = Convert.ToDouble(txtStationLocation1.Text.Replace(",", ",").Split(',')[1].Trim()),
-            CXLon = Convert.ToDouble(txtCXStation.Text.Replace(",", ",").Split(',')[0].Trim()),
-            CXLat = Convert.ToDouble(txtCXStation.Text.Replace(",", ",").Split(',')[1].Trim()),
-            RefLon = Convert.ToDouble(txtRefLocation1.Text.Replace(",", ",").Split(',')[0].Trim()),
-            RefLat = Convert.ToDouble(txtRefLocation1.Text.Replace(",", ",").Split(',')[1].Trim()),
+            CDBStation = txtStationLocation1.GetLonLat(),
+            CXStation = txtCXStation.GetLonLat(),
+            RefStation = txtRefLocation1.GetLonLat(),
             DtousErr = Convert.ToDouble(txtDtousErr1.Text),
             SatLocErr = Convert.ToDouble(txtSatLocErr1.Text),
             CXErr = Convert.ToDouble(txtCxErr.Text),
@@ -62,47 +61,48 @@ namespace XdCxRhDW.App.UserControl
 
         }
 
-        private (bool, string) ParamValidate()
+        private bool ParamValidate()
         {
-            var mainparam = ucEphXYZMain.ValidateParam();
-            if (!mainparam.Item1)
+            dxErrorProvider.ClearErrors();
+            if (!ucEphXYZMain.CheckEph(dxErrorProvider))
             {
-                return (false, mainparam.Item2);
+                return false;
             }
-            var txtstat = txtStationLocation1.CheckLonLat("超短波");
-            if (!txtstat.Item1)
+            if (!txtStationLocation1.CheckLonLat(dxErrorProvider,"超短波"))
             {
-                return txtstat;
+                return false;
             }
-            var cxsta = txtCXStation.CheckLonLat("测向站");
-            if (!cxsta.Item1)
+            if (!txtCXStation.CheckLonLat(dxErrorProvider, "测向站"))
             {
-                return cxsta;
+                return false;
             }
-            var refsta = txtRefLocation1.CheckLonLat("参考站");
-            if (!refsta.Item1)
+            if (!txtRefLocation1.CheckLonLat(dxErrorProvider,"参考站"))
             {
-                return refsta;
+                return false;
             }
-            return (true, "");
+            if (!txtDtousErr1.CheckDouble(dxErrorProvider, "时差误差"))
+            {
+                return false;
+            }
+            if (!txtSatLocErr1.CheckDouble(dxErrorProvider, "星历位置误差"))
+            {
+                return false;
+            }
+            if (!txtCxErr.CheckDouble(dxErrorProvider, "测向误差"))
+            {
+                return false;
+            }
+            return true;
         }
 
         private void btnOK_Click(object sender, EventArgs e)
         {
-            var pv = ParamValidate();
-            if (!pv.Item1)
-            {
-                DxHelper.MsgBoxHelper.ShowWarning($"{pv.Item2}");
-                return;
-            }
+            if (!ParamValidate()) { return; }
             try
             {
                 mapControl1.ClearMap();
-                var cdb = new double[] { Model.StationLon, Model.StationLat, 0 };
-                var cx = new double[] { Model.StationLon, Model.StationLat, 0 };
-                var refstation = new double[] { Model.RefLon, Model.RefLat, 0 };
-                var data = GdopHelper.Gdop1Sat1DByXyz(Model.EphMain, cdb, cx,
-                                 Model.DtousErr, Model.CXErr, Model.SatLocErr, refstation);
+                var data = GdopHelper.Gdop1Sat1DByXyz(Model.EphMain, Model.CDBStation, Model.CXStation,
+                                 Model.DtousErr, Model.CXErr, Model.SatLocErr, Model.RefStation);
                 if (data == null)
                 {
                     return;
@@ -127,6 +127,7 @@ namespace XdCxRhDW.App.UserControl
 
         private async void btnEphCalc_Click(object sender, EventArgs e)
         {
+            dxErrorProvider.ClearErrors();
             if (txtCapTime.DateTime == DateTime.MinValue)
             {
                 DxHelper.MsgBoxHelper.ShowWarning("信号时间不能为空!");
@@ -168,35 +169,23 @@ namespace XdCxRhDW.App.UserControl
         public DateTime CapTime { get; set; }
 
         /// <summary>
-        /// 超短接收站-经度
+        /// 超短接收站-经度 纬度 高度
         /// </summary>
-        public double StationLon { get; set; }
+        public double[] CDBStation { get; set; }
 
-        /// <summary>
-        /// 超短接收站-纬度
-        /// </summary>
-        public double StationLat { get; set; }
 
 
         /// <summary>
-        /// 参考站位置经度
+        /// 参考站位置-经度 纬度 高度
         /// </summary>
-        public double RefLon { get; set; }
+        public double[] RefStation { get; set; }
 
-        /// <summary>
-        /// 参考站位置纬度
-        /// </summary>
-        public double RefLat { get; set; }
 
         /// <summary>
-        /// 测向站位置经度
+        /// 测向站位置-经度 纬度 高度
         /// </summary>
-        public double CXLon { get; set; }
+        public double[] CXStation { get; set; }
 
-        /// <summary>
-        ///测向站位置纬度
-        /// </summary>
-        public double CXLat { get; set; }
 
         /// <summary>
         /// 时差误差(单位us)

+ 3 - 0
XdCxRhDW.App/UserControl/X1D1GDOPParam.resx

@@ -117,4 +117,7 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="dxErrorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
 </root>

+ 9 - 0
XdCxRhDW.App/UserControl/X2D1GDOPParam.Designer.cs

@@ -28,6 +28,7 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             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();
@@ -62,6 +63,7 @@
             this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.dxErrorProvider = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components);
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.txtCapTime.Properties)).BeginInit();
@@ -83,6 +85,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
@@ -391,6 +394,10 @@
             this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem2.TextVisible = false;
             // 
+            // dxErrorProvider
+            // 
+            this.dxErrorProvider.ContainerControl = this;
+            // 
             // X2D1GDOPParam
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
@@ -420,6 +427,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -449,5 +457,6 @@
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
         private DevExpress.XtraEditors.SimpleButton btnEphCalc;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
+        private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider;
     }
 }

+ 31 - 48
XdCxRhDW.App/UserControl/X2D1GDOPParam.cs

@@ -10,6 +10,7 @@ using XdCxRhDW.Entity;
 using XdCxRhDW.Api;
 using System.Drawing;
 using DevExpress.Utils.About;
+using DevExpress.XtraEditors.DXErrorProvider;
 
 namespace XdCxRhDW.App.UserControl
 {
@@ -21,10 +22,8 @@ namespace XdCxRhDW.App.UserControl
             EphMain = ucEphXYZMain.EphParam(),
             EphAdja = ucEphXYZAdja.EphParam(),
             CapTime = txtCapTime.DateTime,
-            StationLon = Convert.ToDouble(txtStationLocation1.Text.Replace(",", ",").Split(',')[0].Trim()),
-            StationLat = Convert.ToDouble(txtStationLocation1.Text.Replace(",", ",").Split(',')[1].Trim()),
-            RefLon = PosResType == EnumPosResType.X2D1NoRef ? 0 : Convert.ToDouble(txtRefLocation1.Text.Replace(",", ",").Split(',')[0].Trim()),
-            RefLat = PosResType == EnumPosResType.X2D1NoRef ? 0 : Convert.ToDouble(txtRefLocation1.Text.Replace(",", ",").Split(',')[1].Trim()),
+            CDBStation = txtStationLocation1.GetLonLat(),
+            RefStation = PosResType == EnumPosResType.X2D1NoRef ? new double[3] { 0, 0, 0 } : txtRefLocation1.GetLonLat(),
             DtousErr = Convert.ToDouble(txtDtousErr1.Text),
             SatLocErr = Convert.ToDouble(txtSatLocErr1.Text),
         };
@@ -70,51 +69,45 @@ namespace XdCxRhDW.App.UserControl
         }
 
 
-        private (bool, string) ParamValidate()
+        private bool ParamValidate()
         {
-            var mainparam = ucEphXYZMain.ValidateParam();
-            if (!mainparam.Item1)
+            dxErrorProvider.ClearErrors();
+            if (!ucEphXYZMain.CheckEph(dxErrorProvider))
             {
-                return (false, mainparam.Item2);
+                return false;
             }
-            var adjaparam = ucEphXYZAdja.ValidateParam();
-            if (!adjaparam.Item1)
+            if (!ucEphXYZAdja.CheckEph(dxErrorProvider))
             {
-                return (false, adjaparam.Item2);
+                return false;
             }
-
-
-            var txtstat = txtStationLocation1.CheckLonLat("超短波");
-            if (!txtstat.Item1)
+            if (!txtStationLocation1.CheckLonLat(dxErrorProvider, "超短波"))
             {
-                return txtstat;
+                return false;
             }
-
-            var refsta = txtRefLocation1.CheckLonLat("参考站");
-            if (PosResType == EnumPosResType.X2D1 && !refsta.Item1)
+            if (PosResType == EnumPosResType.X2D1&&!txtRefLocation1.CheckLonLat(dxErrorProvider, "参考站"))
+            {
+                return false;
+            }
+            if (!txtDtousErr1.CheckDouble(dxErrorProvider, "时差误差"))
             {
-                return refsta;
+                return false;
             }
-            return (true, "");
+            if (!txtSatLocErr1.CheckDouble(dxErrorProvider, "星历位置误差"))
+            {
+                return false;
+            }
+            return true;
         }
+
         private void btnOK_Click(object sender, EventArgs e)
         {
-            var pv = ParamValidate();
-            if (!pv.Item1)
-            {
-                DxHelper.MsgBoxHelper.ShowWarning($"{pv.Item2}");
-                return;
-            }
+            if (!ParamValidate()) { return; }
             try
             {
 
                 mapControl1.ClearMap();
-
-                var cdb = new double[] { Model.StationLon, Model.StationLat, 0 };
-                var refstation = new double[] { Model.RefLon, Model.RefLat, 0 };
-
-                var data = GdopHelper.Gdop2Sat1DByXyz(Model.EphMain, Model.EphAdja, cdb
-                         , Model.DtousErr, Model.SatLocErr, PosResType == EnumPosResType.X2D1NoRef ? null : refstation);
+                var data = GdopHelper.Gdop2Sat1DByXyz(Model.EphMain, Model.EphAdja, Model.CDBStation
+                         , Model.DtousErr, Model.SatLocErr, PosResType == EnumPosResType.X2D1NoRef ? null : Model.RefStation);
                 if (data == null)
                 {
                     return;
@@ -136,6 +129,7 @@ namespace XdCxRhDW.App.UserControl
         }
         private async void btnEphCalc_Click(object sender, EventArgs e)
         {
+            dxErrorProvider.ClearErrors();
             if (txtCapTime.DateTime == DateTime.MinValue)
             {
                 DxHelper.MsgBoxHelper.ShowWarning("信号时间不能为空!");
@@ -196,25 +190,14 @@ namespace XdCxRhDW.App.UserControl
         public DateTime CapTime { get; set; }
 
         /// <summary>
-        /// 超短接收站-经度
-        /// </summary>
-        public double StationLon { get; set; }
-
-        /// <summary>
-        /// 超短接收站-纬度
-        /// </summary>
-        public double StationLat { get; set; }
-
-
-        /// <summary>
-        /// 参考站位置经度
+        /// 超短接收站-经度 纬度 高度
         /// </summary>
-        public double RefLon { get; set; }
+        public double[] CDBStation { get; set; }
 
         /// <summary>
-        /// 参考站位置纬度
+        /// 参考站位置-经度 纬度 高度
         /// </summary>
-        public double RefLat { get; set; }
+        public double[] RefStation { get; set; }
 
         /// <summary>
         /// 时差误差(单位us)

+ 3 - 0
XdCxRhDW.App/UserControl/X2D1GDOPParam.resx

@@ -117,4 +117,7 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="dxErrorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
 </root>

+ 2 - 0
XdCxRhDW.App/XdCxRhDW.App.csproj

@@ -592,6 +592,7 @@
     </EmbeddedResource>
     <EmbeddedResource Include="UserControl\X1D1GDOPParam.resx">
       <DependentUpon>X1D1GDOPParam.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="UserControl\X2DFGDOPParam.resx">
       <DependentUpon>X2DFGDOPParam.cs</DependentUpon>
@@ -601,6 +602,7 @@
     </EmbeddedResource>
     <EmbeddedResource Include="UserControl\X2D1GDOPParam.resx">
       <DependentUpon>X2D1GDOPParam.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="UserControl\X3DFGDOPParam .resx">
       <DependentUpon>X3DFGDOPParam .cs</DependentUpon>

+ 0 - 1
XdCxRhDW.Sender/XdCxRhDW.Sender.csproj

@@ -91,7 +91,6 @@
     <EmbeddedResource Include="Form1.resx">
       <DependentUpon>Form1.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="Properties\licenses.licx" />
     <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>