Forráskód Böngészése

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

wyq 1 éve
szülő
commit
1e0412269b

+ 0 - 37
XdCxRhDW.App/ObServer/PosObServer.cs

@@ -1,37 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using XdCxRhDW.Repostory.Model;
-using XdCxRhDW.App.UserControl;
-
-namespace XdCxRhDW.App.ObServer
-{
-    public  class PosObServer
-    {
-        private static PosObServer _ins =new PosObServer();
-        private PosObServer()
-        { 
-        }
-        public static PosObServer Instance => _ins;
-        /// <summary>
-        /// 定位推送事件
-        /// </summary>
-        public  event Action<PosRes> OnPosChanged;
-
-        public void Sub(Action<PosRes> action)
-        {
-            OnPosChanged += action;
-        }
-        public void DisposeSub(Action<PosRes> action)
-        {
-            OnPosChanged -= action;
-        }
-
-        public void Pub(PosRes data)
-        {
-            OnPosChanged?.Invoke(data);
-        }
-    }
-}

+ 4 - 0
XdCxRhDW.App/Properties/licenses.licx

@@ -0,0 +1,4 @@
+DevExpress.XtraBars.BarManager, DevExpress.XtraBars.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraMap.MapControl, DevExpress.XtraMap.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

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

@@ -21,10 +21,10 @@ using XdCxRhDW.App.Api;
 using XdCxRhDW.App.EditForms;
 using XdCxRhDW.Repostory.Model;
 using System.Windows.Documents;
-using XdCxRhDW.App.ObServer;
 using XdCxRhDW.Repostory.EFContext;
 using XdCxRhDW.Core.Api;
 using XdCxRhDW.WebApi;
+using XdCxRhDW.Core.ObServer;
 namespace XdCxRhDW.App.UserControl
 {
     public partial class CtrlHome : DevExpress.XtraEditors.XtraUserControl

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

@@ -413,7 +413,6 @@
     <Compile Include="UserControl\X2D1GDOPParam.Designer.cs">
       <DependentUpon>X2D1GDOPParam.cs</DependentUpon>
     </Compile>
-    <Compile Include="ObServer\PosObServer.cs" />
     <EmbeddedResource Include="CorTools\DetectToolForm.resx">
       <DependentUpon>DetectToolForm.cs</DependentUpon>
     </EmbeddedResource>
@@ -448,6 +447,7 @@
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     <None Include="packages.config" />
+    <None Include="Properties\licenses.licx" />
     <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>

+ 34 - 0
XdCxRhDW.Sender/Form1.cs

@@ -86,6 +86,12 @@ namespace XdCxRhDW.Sender
                             }
                             if (tskType == "X2D1")//两星一地定位
                             {
+                                //url += "PosX2D1Async";
+                                //var res = X2D1();
+                                //var content = new StringContent(JsonConvert.SerializeObject(res), System.Text.Encoding.UTF8, "application/json");
+                                //var response = await client.PostAsync(url, content);
+                                //Log($"已向[{txtAddr1.Text}]发送两星一地定位仿真结果");
+
                                 var lines = File.ReadAllLines("Simulation_Data2023.dat");
                                 int idx = 1;
                                 url += "PosX2D1Async";
@@ -361,6 +367,34 @@ namespace XdCxRhDW.Sender
                 cts1?.Cancel();
             }
         }
+
+        /// <summary>
+        /// 两星一地定位
+        /// </summary>
+        /// <returns></returns>
+        private X2D1PosDto X2D1()
+        {
+            X2D1PosDto X2D1PosDto = new X2D1PosDto();
+            X2D1PosDto.SigTime = DateTime.Now;
+            X2D1PosDto.SxDto = 5507.5653;
+            X2D1PosDto.XdDto = 240292.558;
+            X2D1PosDto.MainYbDto = 0;
+            X2D1PosDto.AdjaYbDto = 0;
+            X2D1PosDto.MainX = 0;
+            X2D1PosDto.MainY = 0;
+            X2D1PosDto.MainZ = 0;
+            X2D1PosDto.AdjaX = 0;
+            X2D1PosDto.AdjaY = 0;
+            X2D1PosDto.AdjaZ = 0;
+            X2D1PosDto.SatTxLon = IniFiles.ReadValue<double>("Station_Data2023", "卫星接收天线", "Lon");
+            X2D1PosDto.SatTxLat = IniFiles.ReadValue<double>("Station_Data2023", "卫星接收天线", "Lat");
+            X2D1PosDto.CdbTxLon = IniFiles.ReadValue<double>("Station_Data2023", "超短波接收天线", "Lon");
+            X2D1PosDto.CdbTxLat = IniFiles.ReadValue<double>("Station_Data2023", "超短波接收天线", "Lat");
+            X2D1PosDto.RefLon = IniFiles.ReadValue<double>("Station_Data2023", "参考站", "Lon");
+            X2D1PosDto.RefLat = IniFiles.ReadValue<double>("Station_Data2023", "参考站", "Lat");
+            return X2D1PosDto;
+        }
+
         /// <summary>
         /// 两星一地定位无参
         /// </summary>

+ 1 - 0
XdCxRhDW.WebApi/Startup.cs

@@ -51,6 +51,7 @@ namespace XdCxRhDW.WebApi
         public void Configuration(IAppBuilder app)
         {
             app.UseStaticFiles("/wwwroot");
+            Directory.CreateDirectory("wwwroot");
             //启用静态目录浏览
             //string root = AppDomain.CurrentDomain.BaseDirectory;
             //var physicalFileSystem = new PhysicalFileSystem(Path.Combine(root, "wwwroot"));