소스 검색

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

zoulei 1 년 전
부모
커밋
72cfb157a3

+ 4 - 4
XdCxRhDW.Api/AddIns/频差线/DrawDfoLineHelper.cs

@@ -61,10 +61,10 @@ namespace XdCxRhDW.Api
             p.Start();
             p.BeginOutputReadLine();
             p.WaitForExit();
-            if (string.IsNullOrWhiteSpace(sb.ToString()))
-            {
-                throw new Exception("计算频差线出现未知错误!");
-            }
+            //if (string.IsNullOrWhiteSpace(sb.ToString()))
+            //{
+            //    throw new Exception("计算频差线出现未知错误!");
+            //}
             var array = sb.ToString().Split(";".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
 
             foreach (var item in array)

+ 1 - 21
XdCxRhDW.App/EditForms/RHDTOParamEditor.cs

@@ -34,26 +34,6 @@ namespace XdCxRhDW.App.EditForms
             this.Text = $"{info.PosResType.GetEnumDisplayName()}时差参数";
             this.listSat = new List<SatInfo>();
             this.mapControl1 = mapControl;
-            txtsatStation.EditValueChanged += TxtsatStation_EditValueChanged;
-            txtcdbStation.EditValueChanged += TxtcdbStation_EditValueChanged;
-            txtRefLocation.EditValueChanged += TxtRefLocation_EditValueChanged;
-        }
-
-
-        private void TxtRefLocation_EditValueChanged(object sender, EventArgs e)
-        {
-            txtRefLocation.CheckLonLat(dxErrorProvider, "参考站");
-
-        }
-
-        private void TxtcdbStation_EditValueChanged(object sender, EventArgs e)
-        {
-            txtcdbStation.CheckLonLat(dxErrorProvider, "超短波");
-        }
-
-        private void TxtsatStation_EditValueChanged(object sender, EventArgs e)
-        {
-            txtsatStation.CheckLonLat(dxErrorProvider, "接收站");
         }
 
         private async void X2D1DTOParamEditor_Load(object sender, EventArgs e)
@@ -251,7 +231,7 @@ namespace XdCxRhDW.App.EditForms
             dxErrorProvider.ClearErrors();
             if (this.txtSigTime.DateTime == DateTime.MinValue)
             {
-                DxHelper.MsgBoxHelper.ShowWarning("信号时间不能为空!");
+                dxErrorProvider.SetError(txtSigTime, "信号时间不能为空!");
                 return;
             }
             var sigTime = this.txtSigTime.DateTime;

+ 1 - 21
XdCxRhDW.App/EditForms/X1D1DTOParamEditor.cs

@@ -35,27 +35,7 @@ namespace XdCxRhDW.App.EditForms
             this.Text = $"{info.PosResType.GetEnumDisplayName()}时差参数";
             this.listSat = new List<SatInfo>();
             this.mapControl1 = mapControl;
-            txtsatStation.EditValueChanged += TxtsatStation_EditValueChanged;
-            txtcdbStation.EditValueChanged += TxtcdbStation_EditValueChanged;
-            txtRefLocation.EditValueChanged += TxtRefLocation_EditValueChanged;
         }
-
-        private void TxtRefLocation_EditValueChanged(object sender, EventArgs e)
-        {
-            txtRefLocation.CheckLonLat(dxErrorProvider, "参考站");
-
-        }
-
-        private void TxtcdbStation_EditValueChanged(object sender, EventArgs e)
-        {
-            txtcdbStation.CheckLonLat(dxErrorProvider, "超短波");
-        }
-
-        private void TxtsatStation_EditValueChanged(object sender, EventArgs e)
-        {
-            txtsatStation.CheckLonLat(dxErrorProvider, "接收站");
-        }
-
         private async void X1D1DTOParamEditor_Load(object sender, EventArgs e)
         {
 
@@ -215,7 +195,7 @@ namespace XdCxRhDW.App.EditForms
             dxErrorProvider.ClearErrors();
             if (this.sigTime.DateTime == DateTime.MinValue)
             {
-                DxHelper.MsgBoxHelper.ShowWarning("信号时间不能为空!");
+                dxErrorProvider.SetError(this.sigTime, "信号时间不能为空!");
                 return;
             }
             var sigTime = this.sigTime.DateTime;

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

@@ -34,26 +34,8 @@ namespace XdCxRhDW.App.EditForms
             this.Text = $"{info.PosResType.GetEnumDisplayName()}时差参数";
             this.listSat = new List<SatInfo>();
             this.mapControl1 = mapControl;
-            txtsatStation.EditValueChanged += TxtsatStation_EditValueChanged;
-            txtcdbStation.EditValueChanged += TxtcdbStation_EditValueChanged;
-            txtRefLocation.EditValueChanged += TxtRefLocation_EditValueChanged;
         }
 
-        private void TxtRefLocation_EditValueChanged(object sender, EventArgs e)
-        {
-            txtRefLocation.CheckLonLat(dxErrorProvider, "参考站");
-
-        }
-
-        private void TxtcdbStation_EditValueChanged(object sender, EventArgs e)
-        {
-            txtcdbStation.CheckLonLat(dxErrorProvider, "超短波");
-        }
-
-        private void TxtsatStation_EditValueChanged(object sender, EventArgs e)
-        {
-            txtsatStation.CheckLonLat(dxErrorProvider, "接收站");
-        }
 
         private async void X2D1DTOParamEditor_Load(object sender, EventArgs e)
         {
@@ -107,50 +89,8 @@ namespace XdCxRhDW.App.EditForms
             //var dto2 = (dt1 - dt3) * 1e6;
         }
 
-        public bool CheckDtoLineParam()
-        {
-            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;
-        }
-
-        public bool CheckPosParam()
+      
+        public bool CheckParam()
         {
             dxErrorProvider.ClearErrors();
             if (!txtsatStation.CheckLonLat(dxErrorProvider, "接收站"))
@@ -195,7 +135,7 @@ namespace XdCxRhDW.App.EditForms
 
         private void btnDtoLine_Click(object sender, EventArgs e)
         {
-            if (!CheckDtoLineParam()) { return; }
+            if (!CheckParam()) { return; }
             try
             {
 
@@ -265,7 +205,7 @@ namespace XdCxRhDW.App.EditForms
             dxErrorProvider.ClearErrors();
             if (this.txtSigTime.DateTime == DateTime.MinValue)
             {
-                DxHelper.MsgBoxHelper.ShowWarning("信号时间不能为空!");
+                dxErrorProvider.SetError(txtSigTime, "信号时间不能为空!");
                 return;
             }
             var sigTime = this.txtSigTime.DateTime;
@@ -303,7 +243,7 @@ namespace XdCxRhDW.App.EditForms
 
         private void btnPos_Click(object sender, EventArgs e)
         {
-            if (!CheckPosParam()) { return; }
+            if (!CheckParam()) { return; }
             txtPosRes.Text = " ";
             try
             {

+ 4 - 33
XdCxRhDW.App/EditForms/X2DTOParamEditor.cs

@@ -1,29 +1,14 @@
-using DevExpress.Mvvm.ModuleInjection.Native;
-using DevExpress.XtraEditors;
-using DevExpress.XtraEditors.DXErrorProvider;
-using DevExpress.XtraLayout;
-using DevExpress.XtraMap;
-using DevExpress.XtraTreeList.Data;
-using DxHelper;
+using DevExpress.XtraMap;
 using ExtensionsDev;
 using System;
-using System.CodeDom;
 using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
 using System.Data.Entity;
-using System.Data.Entity.Migrations;
 using System.Drawing;
 using System.Linq;
-using System.Security.Policy;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Documents;
-using System.Windows.Forms;
+using XdCxRhDW.Api;
 using XdCxRhDW.Dto;
-using XdCxRhDW.Repostory;
 using XdCxRhDW.Entity;
-using XdCxRhDW.Api;
+using XdCxRhDW.Repostory;
 
 namespace XdCxRhDW.App.EditForms
 {
@@ -43,21 +28,7 @@ namespace XdCxRhDW.App.EditForms
             this.layoutControl1.UseDefault();
             txtSigTime.UseDefault();
             this.Text = $"{info.PosResType.GetEnumDisplayName()}手动定位";
-            txtsatStation.EditValueChanged += TxtsatStation_EditValueChanged;
-            txtRefLocation.EditValueChanged += TxtRefLocation_EditValueChanged;
-        }
-
-        private void TxtRefLocation_EditValueChanged(object sender, EventArgs e)
-        {
-            txtRefLocation.CheckLonLat(dxErrorProvider, "参考站");
-
-        }
-
-        private void TxtsatStation_EditValueChanged(object sender, EventArgs e)
-        {
-            txtsatStation.CheckLonLat(dxErrorProvider, "接收站");
         }
-
         private async void X2DTOParamEditor_Load(object sender, EventArgs e)
         {
             using (RHDWContext db = new RHDWContext())
@@ -363,7 +334,7 @@ namespace XdCxRhDW.App.EditForms
             dxErrorProvider.ClearErrors();
             if (txtSigTime.DateTime == DateTime.MinValue)
             {
-                DxHelper.MsgBoxHelper.ShowWarning("信号时间不能为空!");
+                dxErrorProvider.SetError(txtSigTime, "信号时间不能为空!");
                 return;
             }
             var sigTime = txtSigTime.DateTime;

+ 1 - 21
XdCxRhDW.App/EditForms/X3DTOParamEditor.cs

@@ -1,16 +1,10 @@
 using DevExpress.XtraMap;
-using DxHelper;
 using ExtensionsDev;
 using System;
-using System.CodeDom;
 using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
 using System.Data.Entity;
 using System.Drawing;
 using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using XdCxRhDW.Api;
 using XdCxRhDW.Entity;
 using XdCxRhDW.Repostory;
@@ -32,21 +26,7 @@ namespace XdCxRhDW.App.EditForms
             sigTime.UseDefault();
             this.Text = $"{info.PosResType.GetEnumDisplayName()}时差参数";
             this.mapControl1 = mapControl;
-            txtsatStation.EditValueChanged += TxtsatStation_EditValueChanged;
-            txtRefLocation.EditValueChanged += TxtRefLocation_EditValueChanged;
         }
-
-        private void TxtRefLocation_EditValueChanged(object sender, EventArgs e)
-        {
-            txtRefLocation.CheckLonLat(dxErrorProvider, "参考站");
-
-        }
-
-        private void TxtsatStation_EditValueChanged(object sender, EventArgs e)
-        {
-            txtsatStation.CheckLonLat(dxErrorProvider, "接收站");
-        }
-
         private async void X3DTOParamEditor_Load(object sender, EventArgs e)
         {
 
@@ -215,7 +195,7 @@ namespace XdCxRhDW.App.EditForms
             dxErrorProvider.ClearErrors();
             if (this.sigTime.DateTime == DateTime.MinValue)
             {
-                DxHelper.MsgBoxHelper.ShowWarning("信号时间不能为空!");
+                dxErrorProvider.SetError(this.sigTime, "信号时间不能为空!");
                 return;
             }
             var sigTime = this.sigTime.DateTime;

+ 1 - 25
XdCxRhDW.App/EditForms/X3DfoParamEditor.cs

@@ -1,20 +1,10 @@
 using DevExpress.XtraMap;
-using DevExpress.XtraTreeList.Data;
-using DxHelper;
 using ExtensionsDev;
 using System;
-using System.CodeDom;
 using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
 using System.Data.Entity;
-using System.Data.Entity.Migrations;
 using System.Drawing;
 using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Documents;
-using System.Windows.Forms;
 using XdCxRhDW.Api;
 using XdCxRhDW.Entity;
 using XdCxRhDW.Repostory;
@@ -37,21 +27,7 @@ namespace XdCxRhDW.App.EditForms
             this.layoutControl1.UseDefault();
             sigTime.UseDefault();
             this.simpleLabelItem1.Text = $" ";
-            txtsatStation.EditValueChanged += TxtsatStation_EditValueChanged;
-            txtRefLocation.EditValueChanged += TxtRefLocation_EditValueChanged;
         }
-
-        private void TxtRefLocation_EditValueChanged(object sender, EventArgs e)
-        {
-            txtRefLocation.CheckLonLat(dxErrorProvider, "参考站");
-
-        }
-
-        private void TxtsatStation_EditValueChanged(object sender, EventArgs e)
-        {
-            txtsatStation.CheckLonLat(dxErrorProvider, "接收站");
-        }
-
         private async void X3DTOParamEditor_Load(object sender, EventArgs e)
         {
             using (RHDWContext db = new RHDWContext())
@@ -298,7 +274,7 @@ namespace XdCxRhDW.App.EditForms
             dxErrorProvider.ClearErrors();
             if (this.sigTime.DateTime == DateTime.MinValue)
             {
-                DxHelper.MsgBoxHelper.ShowWarning("信号时间不能为空!");
+                dxErrorProvider.SetError(this.sigTime, "信号时间不能为空!");
                 return;
             }
             var sigTime = this.sigTime.DateTime;

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

@@ -131,7 +131,7 @@ namespace XdCxRhDW.App.UserControl
             dxErrorProvider.ClearErrors();
             if (txtCapTime.DateTime == DateTime.MinValue)
             {
-                DxHelper.MsgBoxHelper.ShowWarning("信号时间不能为空!");
+                dxErrorProvider.SetError(txtCapTime, "信号时间不能为空!");
                 return;
             }
             var sigTime = txtCapTime.DateTime;

+ 1 - 1
XdCxRhDW.App/UserControl/X2D1GDOPParam.cs

@@ -133,7 +133,7 @@ namespace XdCxRhDW.App.UserControl
             dxErrorProvider.ClearErrors();
             if (txtCapTime.DateTime == DateTime.MinValue)
             {
-                DxHelper.MsgBoxHelper.ShowWarning("信号时间不能为空!");
+                dxErrorProvider.SetError(txtCapTime, "信号时间不能为空!");
                 return;
             }
             var sigTime = txtCapTime.DateTime;

+ 9 - 0
XdCxRhDW.App/UserControl/X2DFGDOPParam.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();
@@ -88,6 +89,7 @@
             this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem1 = 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();
@@ -115,6 +117,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
@@ -493,6 +496,10 @@
             this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem1.TextVisible = false;
             // 
+            // dxErrorProvider
+            // 
+            this.dxErrorProvider.ContainerControl = this;
+            // 
             // X2DFGDOPParam
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
@@ -528,6 +535,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -563,5 +571,6 @@
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13;
         private DevExpress.XtraEditors.SimpleButton btnEphCalc;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
+        private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider;
     }
 }

+ 42 - 29
XdCxRhDW.App/UserControl/X2DFGDOPParam.cs

@@ -1,4 +1,5 @@
 
+using DevExpress.XtraEditors.DXErrorProvider;
 using DevExpress.XtraMap;
 using DxHelper;
 using ExtensionsDev;
@@ -20,8 +21,7 @@ namespace XdCxRhDW.App.UserControl
             EphMain = ucEphXYZMain.EphParam(),
             EphAdja = ucEphXYZAdja.EphParam(),
             CapTime = txtCapTime.DateTime,
-            RefLon = Convert.ToDouble(txtRefLocation1.Text.Replace(",", ",").Split(',')[0].Trim()),
-            RefLat = Convert.ToDouble(txtRefLocation1.Text.Replace(",", ",").Split(',')[1].Trim()),
+            RefStation =txtRefLocation1.GetLonLat(),
             DfoErr = Convert.ToDouble(txtDfoErr1.Text),
             DtousErr = Convert.ToDouble(txtDtousErr1.Text),
             SatLocErr = Convert.ToDouble(txtSatLocErr1.Text),
@@ -65,40 +65,56 @@ 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 refsta = txtRefLocation1.CheckLonLat("参考站");
-            if (!refsta.Item1)
+            if (!txtRefLocation1.CheckLonLat(dxErrorProvider, "参考站"))
             {
-                return refsta;
+                return false;
             }
-            return (true, "");
+            if (!txtDtousErr1.CheckDouble(dxErrorProvider, "时差误差"))
+            {
+                return false;
+            }
+            if (!txtDfoErr1.CheckDouble(dxErrorProvider, "频差误差"))
+            {
+                return false;
+            }
+            if (!txtSatLocErr1.CheckDouble(dxErrorProvider, "星历位置误差"))
+            {
+                return false;
+            }
+            if (!txtEphVelErr1.CheckDouble(dxErrorProvider, "星历速度误差"))
+            {
+                return false;
+            }
+            if (!txtFu1.CheckDouble(dxErrorProvider, "目标上行频点"))
+            {
+                return false;
+            }
+            if (!txtFu2.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 refs = new double[] { Model.RefLon, Model.RefLat, 0 };
-                var data = GdopHelper.Gdop2SatDRefByXyz(Model.EphMain, Model.EphAdja, Model.fu1, Model.fu2, Model.DtousErr, Model.DfoErr, Model.SatLocErr, Model.EphVelErr, refs);
+                var data = GdopHelper.Gdop2SatDRefByXyz(Model.EphMain, Model.EphAdja, Model.fu1, Model.fu2, Model.DtousErr, Model.DfoErr, Model.SatLocErr, Model.EphVelErr, Model.RefStation);
 
                 if (data == null)
                 {
@@ -124,9 +140,11 @@ namespace XdCxRhDW.App.UserControl
 
         private async void btnEphCalc_Click(object sender, EventArgs e)
         {
+
+            dxErrorProvider.ClearErrors();
             if (txtCapTime.DateTime == DateTime.MinValue)
             {
-                DxHelper.MsgBoxHelper.ShowWarning("信号时间不能为空!");
+                dxErrorProvider.SetError(txtCapTime, "信号时间不能为空!");
                 return;
             }
             var sigTime = txtCapTime.DateTime;
@@ -184,14 +202,9 @@ namespace XdCxRhDW.App.UserControl
         public DateTime CapTime { get; set; }
 
         /// <summary>
-        /// 参考站位置经度
-        /// </summary>
-        public double RefLon { get; set; }
-
-        /// <summary>
-        /// 参考站位置纬度
+        /// 参考站位置-经度 纬度 高度
         /// </summary>
-        public double RefLat { get; set; }
+        public double[] RefStation { get; set; }
 
         /// <summary>
         /// 时差误差(单位us)

+ 3 - 0
XdCxRhDW.App/UserControl/X2DFGDOPParam.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/X3DFGDOPParam .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();
@@ -83,6 +84,7 @@
             this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem1 = 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();
@@ -109,6 +111,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
@@ -480,6 +483,10 @@
             this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem2.TextVisible = false;
             // 
+            // dxErrorProvider
+            // 
+            this.dxErrorProvider.ContainerControl = this;
+            // 
             // X3DFGDOPParam
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
@@ -514,6 +521,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -549,5 +557,6 @@
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15;
         private DevExpress.XtraEditors.SimpleButton btnEphCalc;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
+        private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider;
     }
 }

+ 37 - 33
XdCxRhDW.App/UserControl/X3DFGDOPParam .cs

@@ -21,8 +21,7 @@ namespace XdCxRhDW.App.UserControl
             EphAdja1 = ucEphXYZAdja1.EphParam(),
             EphAdja2 = ucEphXYZAdja2.EphParam(),
             CapTime = txtCapTime.DateTime,
-            RefLon = Convert.ToDouble(txtRefLocation1.Text.Replace(",", ",").Split(',')[0].Trim()),
-            RefLat = Convert.ToDouble(txtRefLocation1.Text.Replace(",", ",").Split(',')[1].Trim()),
+            RefStation = txtRefLocation1.GetLonLat(),
             DfoErr = Convert.ToDouble(txtDfoErr1.Text),
             SatLocErr = Convert.ToDouble(txtSatLocErr1.Text),
             EphVelErr = Convert.ToDouble(txtEphVelErr1.Text),
@@ -66,49 +65,58 @@ namespace XdCxRhDW.App.UserControl
             }
         }
 
-        private (bool, string) ParamValidate()
+        private bool ParamValidate()
         {
-            var mainparam = ucEphXYZMain.ValidateParam();
-            if (!mainparam.Item1)
+            if (!ucEphXYZMain.CheckEph(dxErrorProvider))
             {
-                return (false, mainparam.Item2);
+                return false;
             }
-            var adja1param = ucEphXYZAdja1.ValidateParam();
-            if (!adja1param.Item1)
+            if (!ucEphXYZAdja1.CheckEph(dxErrorProvider))
             {
-                return (false, adja1param.Item2);
+                return false;
             }
-            var adja2param = ucEphXYZAdja2.ValidateParam();
-            if (!adja2param.Item1)
+            if (!ucEphXYZAdja2.CheckEph(dxErrorProvider))
             {
-                return (false, adja2param.Item2);
+                return false;
             }
-            var refsta = txtRefLocation1.CheckLonLat("参考站");
-            if (!refsta.Item1)
+            if (!txtRefLocation1.CheckLonLat(dxErrorProvider, "参考站"))
             {
-                return refsta;
+                return false;
             }
-            return (true, "");
+            if (!txtDfoErr1.CheckDouble(dxErrorProvider, "频差误差"))
+            {
+                return false;
+            }
+            if (!txtSatLocErr1.CheckDouble(dxErrorProvider, "星历位置误差"))
+            {
+                return false;
+            }
+            if (!txtEphVelErr1.CheckDouble(dxErrorProvider, "星历速度误差"))
+            {
+                return false;
+            }
+            if (!txtFu1.CheckDouble(dxErrorProvider, "目标上行频点"))
+            {
+                return false;
+            }
+            if (!txtFu2.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 refs = new double[] { Model.RefLon, Model.RefLat, 0 };
-                var data = GdopHelper.Gdop3SatDFByXyz(Model.EphMain, Model.EphAdja1, Model.EphAdja2, Model.fu1, Model.fu2, Model.DfoErr, Model.SatLocErr, Model.EphVelErr, refs);
+                var data = GdopHelper.Gdop3SatDFByXyz(Model.EphMain, Model.EphAdja1, Model.EphAdja2, Model.fu1, Model.fu2, Model.DfoErr, Model.SatLocErr, Model.EphVelErr, Model.RefStation);
 
                 if (data == null)
                 {
                     return;
                 }
-
                 foreach (var errLins in data)//画GDOP
                 {
                     var mapDots = errLins.MapDots.Select(p => p).Select(p => (p.Lon, p.Lat));
@@ -128,9 +136,10 @@ namespace XdCxRhDW.App.UserControl
 
         private async void btnEphCalc_Click(object sender, EventArgs e)
         {
+            dxErrorProvider.ClearErrors();
             if (txtCapTime.DateTime == DateTime.MinValue)
             {
-                DxHelper.MsgBoxHelper.ShowWarning("信号时间不能为空!");
+                dxErrorProvider.SetError(txtCapTime, "信号时间不能为空!");
                 return;
             }
             var sigTime = txtCapTime.DateTime;
@@ -202,14 +211,9 @@ namespace XdCxRhDW.App.UserControl
         public DateTime CapTime { get; set; }
 
         /// <summary>
-        /// 参考站位置经度
-        /// </summary>
-        public double RefLon { get; set; }
-
-        /// <summary>
-        /// 参考站位置纬度
+        /// 参考站位置-经度 纬度 高度
         /// </summary>
-        public double RefLat { get; set; }
+        public double[] RefStation { get; set; }
 
         /// <summary>
         /// 频差误差(Hz)

+ 3 - 0
XdCxRhDW.App/UserControl/X3DFGDOPParam .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/X3GDOPParam.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.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();
@@ -82,6 +84,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
@@ -386,6 +389,10 @@
             this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem8.TextVisible = false;
             // 
+            // dxErrorProvider
+            // 
+            this.dxErrorProvider.ContainerControl = this;
+            // 
             // X3GDOPParam
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
@@ -414,6 +421,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -443,5 +451,6 @@
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
         private DevExpress.XtraEditors.SimpleButton btnEphCalc;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
+        private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider;
     }
 }

+ 27 - 33
XdCxRhDW.App/UserControl/X3GDOPParam.cs

@@ -9,6 +9,7 @@ using XdCxRhDW.Repostory;
 using XdCxRhDW.Entity;
 using XdCxRhDW.Api;
 using System.Drawing;
+using DevExpress.XtraEditors.DXErrorProvider;
 namespace XdCxRhDW.App.UserControl
 {
     public partial class X3GDOPParam : DevExpress.XtraEditors.XtraUserControl
@@ -20,8 +21,7 @@ namespace XdCxRhDW.App.UserControl
             EphAdja1 = ucEphXYZAdja1.EphParam(),
             EphAdja2 = ucEphXYZAdja2.EphParam(),
             CapTime = txtCapTime.DateTime,
-            RefLon = PosResType == EnumPosResType.X3NoRef ? 0 : Convert.ToDouble(txtRefLocation1.Text.Replace(",", ",").Split(',')[0].Trim()),
-            RefLat = PosResType == EnumPosResType.X3NoRef ? 0 : Convert.ToDouble(txtRefLocation1.Text.Replace(",", ",").Split(',')[1].Trim()),
+            RefStation = PosResType == EnumPosResType.X3NoRef ? new double[3] { 0,0,0} : txtRefLocation1.GetLonLat(),
             DtousErr = Convert.ToDouble(txtDtousErr1.Text),
             SatLocErr = Convert.ToDouble(txtSatLocErr1.Text),
         };
@@ -68,44 +68,43 @@ namespace XdCxRhDW.App.UserControl
         {
             DxHelper.PopupHelper.HidePopup(this);
         }
-        private (bool, string) ParamValidate()
+        private bool ParamValidate()
         {
-            var mainparam = ucEphXYZMain.ValidateParam();
-            if (!mainparam.Item1)
+            if (!ucEphXYZMain.CheckEph(dxErrorProvider))
             {
-                return (false, mainparam.Item2);
+                return false;
             }
-            var adja1param = ucEphXYZAdja1.ValidateParam();
-            if (!adja1param.Item1)
+            if (!ucEphXYZAdja1.CheckEph(dxErrorProvider))
             {
-                return (false, adja1param.Item2);
+                return false;
             }
-            var adja2param = ucEphXYZAdja2.ValidateParam();
-            if (!adja2param.Item1)
+            if (!ucEphXYZAdja2.CheckEph(dxErrorProvider))
             {
-                return (false, adja2param.Item2);
+                return false;
             }
-            var refsta = txtRefLocation1.CheckLonLat("参考站");
-            if (PosResType == EnumPosResType.X3 && !refsta.Item1)
+            if (PosResType == EnumPosResType.X3 && !txtRefLocation1.CheckLonLat(dxErrorProvider, "参考站"))
             {
-                return refsta;
+                return false;
             }
-            return (true, "");
+            if (!txtDtousErr1.CheckDouble(dxErrorProvider, "时差误差"))
+            {
+                return false;
+            }
+            if (!txtSatLocErr1.CheckDouble(dxErrorProvider, "星历位置误差"))
+            {
+                return false;
+            }
+            return true;
         }
         private void btnX1D2_Click(object sender, EventArgs e)
         {
-            var pv = ParamValidate();
-            if (!pv.Item1)
-            {
-                DxHelper.MsgBoxHelper.ShowWarning($"{pv.Item2}");
-                return;
-            }
+            if (!ParamValidate()) { return; }
             try
             {
                 mapControl1.ClearMap();
-                var refs = new double[] { Model.RefLon, Model.RefLat, 0 };
+
                 var data = GdopHelper.Gdop3SatByXyz(Model.EphMain, Model.EphAdja1, Model.EphAdja2
-                                  , Model.DtousErr, Model.SatLocErr, PosResType == EnumPosResType.X3NoRef ? null : refs);
+                                  , Model.DtousErr, Model.SatLocErr, PosResType == EnumPosResType.X3NoRef ? null : Model.RefStation);
                 if (data == null)
                 {
                     return;
@@ -124,9 +123,10 @@ namespace XdCxRhDW.App.UserControl
 
         private async void btnEphCalc_Click(object sender, EventArgs e)
         {
+            dxErrorProvider.ClearErrors();
             if (txtCapTime.DateTime == DateTime.MinValue)
             {
-                DxHelper.MsgBoxHelper.ShowWarning("信号时间不能为空!");
+                dxErrorProvider.SetError(txtCapTime, "信号时间不能为空!");
                 return;
             }
             var sigTime = txtCapTime.DateTime;
@@ -198,15 +198,9 @@ namespace XdCxRhDW.App.UserControl
         public DateTime CapTime { get; set; }
 
         /// <summary>
-        /// 参考站位置经度
-        /// </summary>
-        public double RefLon { get; set; }
-
-        /// <summary>
-        /// 参考站位置纬度
+        /// 参考站位置-经度 纬度 高度
         /// </summary>
-        public double RefLat { get; set; }
-
+        public double[] RefStation { get; set; }
         /// <summary>
         /// 时差误差(单位us)
         /// </summary>

+ 3 - 0
XdCxRhDW.App/UserControl/X3GDOPParam.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>

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

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