gongqiuhong 1 year ago
parent
commit
490c4989fe

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

@@ -69,6 +69,7 @@
     <Compile Include="AddIns\频差线\DrawDfoLineHelper.cs" />
   </ItemGroup>
   <ItemGroup>
+    <None Include="app.config" />
     <None Include="packages.config" />
     <None Include="AddIns\检测Cpu参估\enc-test.dat">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

+ 11 - 0
XdCxRhDW.Api/app.config

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>
+</configuration>

+ 132 - 40
XdCxRhDW.App/EditForms/TaskEditor.Designer.cs

@@ -29,16 +29,16 @@
         private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
+            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();
             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();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject();
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
             this.btnSave = new DevExpress.XtraEditors.SimpleButton();
             this.txtTaskName = new DevExpress.XtraEditors.TextEdit();
@@ -66,6 +66,12 @@
             this.itemCapDir = new DevExpress.XtraLayout.LayoutControlItem();
             this.itemDoFreqUp = new DevExpress.XtraLayout.LayoutControlItem();
             this.dxErrorProvider = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components);
+            this.txtSignalType = new DevExpress.XtraEditors.ImageComboBoxEdit();
+            this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.txtDetectionWay = new DevExpress.XtraEditors.CheckedComboBoxEdit();
+            this.itemDetectionWay = new DevExpress.XtraLayout.LayoutControlItem();
+            this.txtCapDirFormat = new DevExpress.XtraEditors.TextEdit();
+            this.itemCapDirFormat = new DevExpress.XtraLayout.LayoutControlItem();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.txtTaskName.Properties)).BeginInit();
@@ -93,10 +99,17 @@
             ((System.ComponentModel.ISupportInitialize)(this.itemCapDir)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.itemDoFreqUp)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtSignalType.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtDetectionWay.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.itemDetectionWay)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtCapDirFormat.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.itemCapDirFormat)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
             // 
+            this.layoutControl1.Controls.Add(this.txtDetectionWay);
             this.layoutControl1.Controls.Add(this.btnSave);
             this.layoutControl1.Controls.Add(this.txtTaskName);
             this.layoutControl1.Controls.Add(this.txtPosType);
@@ -107,18 +120,20 @@
             this.layoutControl1.Controls.Add(this.txtTaskType);
             this.layoutControl1.Controls.Add(this.txtCapDir);
             this.layoutControl1.Controls.Add(this.txtDoFreqUp);
+            this.layoutControl1.Controls.Add(this.txtSignalType);
+            this.layoutControl1.Controls.Add(this.txtCapDirFormat);
             this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.layoutControl1.Location = new System.Drawing.Point(0, 0);
             this.layoutControl1.Name = "layoutControl1";
             this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(784, 215, 650, 400);
             this.layoutControl1.Root = this.Root;
-            this.layoutControl1.Size = new System.Drawing.Size(437, 504);
+            this.layoutControl1.Size = new System.Drawing.Size(434, 633);
             this.layoutControl1.TabIndex = 0;
             this.layoutControl1.Text = "layoutControl1";
             // 
             // btnSave
             // 
-            this.btnSave.Location = new System.Drawing.Point(309, 465);
+            this.btnSave.Location = new System.Drawing.Point(306, 588);
             this.btnSave.Name = "btnSave";
             this.btnSave.Size = new System.Drawing.Size(116, 26);
             this.btnSave.StyleController = this.layoutControl1;
@@ -131,7 +146,7 @@
             this.txtTaskName.Location = new System.Drawing.Point(12, 29);
             this.txtTaskName.Name = "txtTaskName";
             this.txtTaskName.Properties.AutoHeight = false;
-            this.txtTaskName.Size = new System.Drawing.Size(413, 20);
+            this.txtTaskName.Size = new System.Drawing.Size(410, 20);
             this.txtTaskName.StyleController = this.layoutControl1;
             this.txtTaskName.TabIndex = 4;
             // 
@@ -141,19 +156,19 @@
             this.txtPosType.Location = new System.Drawing.Point(12, 134);
             this.txtPosType.Name = "txtPosType";
             this.txtPosType.Properties.Columns = 2;
-            this.txtPosType.Size = new System.Drawing.Size(413, 71);
+            this.txtPosType.Size = new System.Drawing.Size(410, 71);
             this.txtPosType.StyleController = this.layoutControl1;
             this.txtPosType.TabIndex = 5;
             this.txtPosType.EditValueChanged += new System.EventHandler(this.txtPosType_EditValueChanged);
             // 
             // txtFreq
             // 
-            this.txtFreq.Location = new System.Drawing.Point(12, 349);
+            this.txtFreq.Location = new System.Drawing.Point(12, 431);
             this.txtFreq.Name = "txtFreq";
             this.txtFreq.Properties.AutoHeight = false;
             this.txtFreq.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -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.txtFreq.Size = new System.Drawing.Size(413, 20);
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -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.txtFreq.Size = new System.Drawing.Size(410, 20);
             this.txtFreq.StyleController = this.layoutControl1;
             this.txtFreq.TabIndex = 10;
             // 
@@ -166,7 +181,7 @@
             this.txtMainSat.Properties.NullText = "";
             this.txtMainSat.Properties.PopupSizeable = false;
             this.txtMainSat.Properties.PopupView = this.searchLookUpEdit1View;
-            this.txtMainSat.Size = new System.Drawing.Size(413, 20);
+            this.txtMainSat.Size = new System.Drawing.Size(410, 20);
             this.txtMainSat.StyleController = this.layoutControl1;
             this.txtMainSat.TabIndex = 7;
             // 
@@ -186,7 +201,7 @@
             this.txtAdja1Sat.Properties.NullText = "";
             this.txtAdja1Sat.Properties.PopupSizeable = false;
             this.txtAdja1Sat.Properties.PopupView = this.gridView1;
-            this.txtAdja1Sat.Size = new System.Drawing.Size(413, 20);
+            this.txtAdja1Sat.Size = new System.Drawing.Size(410, 20);
             this.txtAdja1Sat.StyleController = this.layoutControl1;
             this.txtAdja1Sat.TabIndex = 8;
             // 
@@ -206,7 +221,7 @@
             this.txtAdja2Sat.Properties.NullText = "";
             this.txtAdja2Sat.Properties.PopupSizeable = false;
             this.txtAdja2Sat.Properties.PopupView = this.gridView2;
-            this.txtAdja2Sat.Size = new System.Drawing.Size(413, 20);
+            this.txtAdja2Sat.Size = new System.Drawing.Size(410, 20);
             this.txtAdja2Sat.StyleController = this.layoutControl1;
             this.txtAdja2Sat.TabIndex = 9;
             // 
@@ -223,28 +238,28 @@
             this.txtTaskType.Location = new System.Drawing.Point(12, 78);
             this.txtTaskType.Name = "txtTaskType";
             this.txtTaskType.Properties.Columns = 2;
-            this.txtTaskType.Size = new System.Drawing.Size(413, 27);
+            this.txtTaskType.Size = new System.Drawing.Size(410, 27);
             this.txtTaskType.StyleController = this.layoutControl1;
             this.txtTaskType.TabIndex = 5;
             this.txtTaskType.SelectedIndexChanged += new System.EventHandler(this.txtTaskType_SelectedIndexChanged);
             // 
             // txtCapDir
             // 
-            this.txtCapDir.Location = new System.Drawing.Point(12, 390);
+            this.txtCapDir.Location = new System.Drawing.Point(12, 472);
             this.txtCapDir.Name = "txtCapDir";
             this.txtCapDir.Properties.AutoHeight = false;
-            this.txtCapDir.Size = new System.Drawing.Size(413, 20);
+            this.txtCapDir.Size = new System.Drawing.Size(410, 20);
             this.txtCapDir.StyleController = this.layoutControl1;
             this.txtCapDir.TabIndex = 4;
             // 
             // txtDoFreqUp
             // 
-            this.txtDoFreqUp.Location = new System.Drawing.Point(12, 431);
+            this.txtDoFreqUp.Location = new System.Drawing.Point(12, 554);
             this.txtDoFreqUp.Name = "txtDoFreqUp";
             this.txtDoFreqUp.Properties.AutoHeight = false;
             this.txtDoFreqUp.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -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.txtDoFreqUp.Size = new System.Drawing.Size(413, 20);
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -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.txtDoFreqUp.Size = new System.Drawing.Size(410, 20);
             this.txtDoFreqUp.StyleController = this.layoutControl1;
             this.txtDoFreqUp.TabIndex = 10;
             this.txtDoFreqUp.ToolTip = "多个频点用逗号或分号隔开";
@@ -264,9 +279,12 @@
             this.itemFreqUp,
             this.layoutControlItem5,
             this.itemCapDir,
-            this.itemDoFreqUp});
+            this.itemDoFreqUp,
+            this.layoutControlItem6,
+            this.itemDetectionWay,
+            this.itemCapDirFormat});
             this.Root.Name = "Root";
-            this.Root.Size = new System.Drawing.Size(437, 504);
+            this.Root.Size = new System.Drawing.Size(434, 633);
             this.Root.TextVisible = false;
             // 
             // layoutControlItem1
@@ -276,7 +294,7 @@
             this.layoutControlItem1.MaxSize = new System.Drawing.Size(0, 41);
             this.layoutControlItem1.MinSize = new System.Drawing.Size(118, 41);
             this.layoutControlItem1.Name = "layoutControlItem1";
-            this.layoutControlItem1.Size = new System.Drawing.Size(417, 41);
+            this.layoutControlItem1.Size = new System.Drawing.Size(414, 41);
             this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem1.Text = "任务名称";
             this.layoutControlItem1.TextLocation = DevExpress.Utils.Locations.Top;
@@ -285,9 +303,9 @@
             // emptySpaceItem1
             // 
             this.emptySpaceItem1.AllowHotTrack = false;
-            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 443);
+            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 566);
             this.emptySpaceItem1.Name = "emptySpaceItem1";
-            this.emptySpaceItem1.Size = new System.Drawing.Size(297, 41);
+            this.emptySpaceItem1.Size = new System.Drawing.Size(294, 47);
             this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
             // 
             // layoutControlItem2
@@ -298,7 +316,7 @@
             this.layoutControlItem2.MinSize = new System.Drawing.Size(54, 100);
             this.layoutControlItem2.Name = "layoutControlItem2";
             this.layoutControlItem2.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 10, 2);
-            this.layoutControlItem2.Size = new System.Drawing.Size(417, 100);
+            this.layoutControlItem2.Size = new System.Drawing.Size(414, 100);
             this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem2.Text = "定位模式";
             this.layoutControlItem2.TextLocation = DevExpress.Utils.Locations.Top;
@@ -307,12 +325,12 @@
             // layoutControlItem3
             // 
             this.layoutControlItem3.Control = this.btnSave;
-            this.layoutControlItem3.Location = new System.Drawing.Point(297, 443);
+            this.layoutControlItem3.Location = new System.Drawing.Point(294, 566);
             this.layoutControlItem3.MaxSize = new System.Drawing.Size(120, 40);
             this.layoutControlItem3.MinSize = new System.Drawing.Size(120, 40);
             this.layoutControlItem3.Name = "layoutControlItem3";
             this.layoutControlItem3.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.layoutControlItem3.Size = new System.Drawing.Size(120, 41);
+            this.layoutControlItem3.Size = new System.Drawing.Size(120, 47);
             this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem3.TextVisible = false;
@@ -322,7 +340,7 @@
             this.layoutControlItem4.Control = this.txtMainSat;
             this.layoutControlItem4.Location = new System.Drawing.Point(0, 197);
             this.layoutControlItem4.Name = "layoutControlItem4";
-            this.layoutControlItem4.Size = new System.Drawing.Size(417, 41);
+            this.layoutControlItem4.Size = new System.Drawing.Size(414, 41);
             this.layoutControlItem4.Text = "主星";
             this.layoutControlItem4.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem4.TextSize = new System.Drawing.Size(72, 14);
@@ -332,7 +350,7 @@
             this.layoutControlItemAdja1.Control = this.txtAdja1Sat;
             this.layoutControlItemAdja1.Location = new System.Drawing.Point(0, 238);
             this.layoutControlItemAdja1.Name = "layoutControlItemAdja1";
-            this.layoutControlItemAdja1.Size = new System.Drawing.Size(417, 41);
+            this.layoutControlItemAdja1.Size = new System.Drawing.Size(414, 41);
             this.layoutControlItemAdja1.Text = "邻星1";
             this.layoutControlItemAdja1.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItemAdja1.TextSize = new System.Drawing.Size(72, 14);
@@ -343,7 +361,7 @@
             this.layoutControlItemAdja2.Control = this.txtAdja2Sat;
             this.layoutControlItemAdja2.Location = new System.Drawing.Point(0, 279);
             this.layoutControlItemAdja2.Name = "layoutControlItemAdja2";
-            this.layoutControlItemAdja2.Size = new System.Drawing.Size(417, 41);
+            this.layoutControlItemAdja2.Size = new System.Drawing.Size(414, 41);
             this.layoutControlItemAdja2.Text = "邻星2";
             this.layoutControlItemAdja2.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItemAdja2.TextSize = new System.Drawing.Size(72, 14);
@@ -352,11 +370,11 @@
             // itemFreqUp
             // 
             this.itemFreqUp.Control = this.txtFreq;
-            this.itemFreqUp.Location = new System.Drawing.Point(0, 320);
+            this.itemFreqUp.Location = new System.Drawing.Point(0, 402);
             this.itemFreqUp.MaxSize = new System.Drawing.Size(0, 41);
             this.itemFreqUp.MinSize = new System.Drawing.Size(64, 41);
             this.itemFreqUp.Name = "itemFreqUp";
-            this.itemFreqUp.Size = new System.Drawing.Size(417, 41);
+            this.itemFreqUp.Size = new System.Drawing.Size(414, 41);
             this.itemFreqUp.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.itemFreqUp.Text = "上行频点";
             this.itemFreqUp.TextLocation = DevExpress.Utils.Locations.Top;
@@ -372,7 +390,7 @@
             this.layoutControlItem5.MinSize = new System.Drawing.Size(54, 56);
             this.layoutControlItem5.Name = "layoutControlItem5";
             this.layoutControlItem5.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 10, 2);
-            this.layoutControlItem5.Size = new System.Drawing.Size(417, 56);
+            this.layoutControlItem5.Size = new System.Drawing.Size(414, 56);
             this.layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem5.Text = "任务类型";
             this.layoutControlItem5.TextLocation = DevExpress.Utils.Locations.Top;
@@ -383,11 +401,11 @@
             this.itemCapDir.Control = this.txtCapDir;
             this.itemCapDir.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.itemCapDir.CustomizationFormText = "任务名称";
-            this.itemCapDir.Location = new System.Drawing.Point(0, 361);
+            this.itemCapDir.Location = new System.Drawing.Point(0, 443);
             this.itemCapDir.MaxSize = new System.Drawing.Size(0, 41);
             this.itemCapDir.MinSize = new System.Drawing.Size(118, 41);
             this.itemCapDir.Name = "itemCapDir";
-            this.itemCapDir.Size = new System.Drawing.Size(417, 41);
+            this.itemCapDir.Size = new System.Drawing.Size(414, 41);
             this.itemCapDir.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.itemCapDir.Text = "采集文件目录";
             this.itemCapDir.TextLocation = DevExpress.Utils.Locations.Top;
@@ -398,11 +416,11 @@
             this.itemDoFreqUp.Control = this.txtDoFreqUp;
             this.itemDoFreqUp.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.itemDoFreqUp.CustomizationFormText = "上行频点";
-            this.itemDoFreqUp.Location = new System.Drawing.Point(0, 402);
+            this.itemDoFreqUp.Location = new System.Drawing.Point(0, 525);
             this.itemDoFreqUp.MaxSize = new System.Drawing.Size(0, 41);
             this.itemDoFreqUp.MinSize = new System.Drawing.Size(64, 41);
             this.itemDoFreqUp.Name = "itemDoFreqUp";
-            this.itemDoFreqUp.Size = new System.Drawing.Size(417, 41);
+            this.itemDoFreqUp.Size = new System.Drawing.Size(414, 41);
             this.itemDoFreqUp.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.itemDoFreqUp.Text = "处理上行频点";
             this.itemDoFreqUp.TextLocation = DevExpress.Utils.Locations.Top;
@@ -412,11 +430,73 @@
             // 
             this.dxErrorProvider.ContainerControl = this;
             // 
+            // txtSignalType
+            // 
+            this.txtSignalType.Location = new System.Drawing.Point(12, 349);
+            this.txtSignalType.Name = "txtSignalType";
+            this.txtSignalType.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.txtSignalType.Size = new System.Drawing.Size(410, 20);
+            this.txtSignalType.StyleController = this.layoutControl1;
+            this.txtSignalType.TabIndex = 11;
+            this.txtSignalType.SelectedIndexChanged += new System.EventHandler(this.txtSignalType_SelectedIndexChanged);
+            // 
+            // layoutControlItem6
+            // 
+            this.layoutControlItem6.Control = this.txtSignalType;
+            this.layoutControlItem6.Location = new System.Drawing.Point(0, 320);
+            this.layoutControlItem6.Name = "layoutControlItem6";
+            this.layoutControlItem6.Size = new System.Drawing.Size(414, 41);
+            this.layoutControlItem6.Text = "信号类型";
+            this.layoutControlItem6.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItem6.TextSize = new System.Drawing.Size(72, 14);
+            // 
+            // txtDetectionWay
+            // 
+            this.txtDetectionWay.Location = new System.Drawing.Point(12, 390);
+            this.txtDetectionWay.Name = "txtDetectionWay";
+            this.txtDetectionWay.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.txtDetectionWay.Size = new System.Drawing.Size(410, 20);
+            this.txtDetectionWay.StyleController = this.layoutControl1;
+            this.txtDetectionWay.TabIndex = 12;
+            //this.txtDetectionWay.CustomDisplayText += new DevExpress.XtraEditors.Controls.CustomDisplayTextEventHandler(this.txtDetectionWay_CustomDisplayText);
+            // 
+            // itemDetectionWay
+            // 
+            this.itemDetectionWay.Control = this.txtDetectionWay;
+            this.itemDetectionWay.Location = new System.Drawing.Point(0, 361);
+            this.itemDetectionWay.Name = "itemDetectionWay";
+            this.itemDetectionWay.Size = new System.Drawing.Size(414, 41);
+            this.itemDetectionWay.Text = "检测方式";
+            this.itemDetectionWay.TextLocation = DevExpress.Utils.Locations.Top;
+            this.itemDetectionWay.TextSize = new System.Drawing.Size(72, 14);
+            this.itemDetectionWay.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+            // 
+            // txtCapDirFormat
+            // 
+            this.txtCapDirFormat.Location = new System.Drawing.Point(12, 513);
+            this.txtCapDirFormat.Name = "txtCapDirFormat";
+            this.txtCapDirFormat.Properties.NullText = "yyyyMMdd HH";
+            this.txtCapDirFormat.Size = new System.Drawing.Size(410, 20);
+            this.txtCapDirFormat.StyleController = this.layoutControl1;
+            this.txtCapDirFormat.TabIndex = 13;
+            // 
+            // itemCapDirFormat
+            // 
+            this.itemCapDirFormat.Control = this.txtCapDirFormat;
+            this.itemCapDirFormat.Location = new System.Drawing.Point(0, 484);
+            this.itemCapDirFormat.Name = "itemCapDirFormat";
+            this.itemCapDirFormat.Size = new System.Drawing.Size(414, 41);
+            this.itemCapDirFormat.Text = "目录日期格式";
+            this.itemCapDirFormat.TextLocation = DevExpress.Utils.Locations.Top;
+            this.itemCapDirFormat.TextSize = new System.Drawing.Size(72, 14);
+            // 
             // TaskEditor
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(437, 504);
+            this.ClientSize = new System.Drawing.Size(434, 633);
             this.Controls.Add(this.layoutControl1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
             this.Name = "TaskEditor";
@@ -449,6 +529,12 @@
             ((System.ComponentModel.ISupportInitialize)(this.itemCapDir)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.itemDoFreqUp)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtSignalType.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtDetectionWay.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.itemDetectionWay)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtCapDirFormat.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.itemCapDirFormat)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -482,5 +568,11 @@
         private DevExpress.XtraLayout.LayoutControlItem itemCapDir;
         private DevExpress.XtraEditors.ButtonEdit txtDoFreqUp;
         private DevExpress.XtraLayout.LayoutControlItem itemDoFreqUp;
+        private DevExpress.XtraEditors.ImageComboBoxEdit txtSignalType;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
+        private DevExpress.XtraEditors.CheckedComboBoxEdit txtDetectionWay;
+        private DevExpress.XtraLayout.LayoutControlItem itemDetectionWay;
+        private DevExpress.XtraEditors.TextEdit txtCapDirFormat;
+        private DevExpress.XtraLayout.LayoutControlItem itemCapDirFormat;
     }
 }

+ 75 - 3
XdCxRhDW.App/EditForms/TaskEditor.cs

@@ -1,8 +1,10 @@
 using DevExpress.Utils.About;
+using DevExpress.Utils.Extensions;
 using DevExpress.XtraBars.Customization;
 using DevExpress.XtraEditors;
 using DevExpress.XtraEditors.Controls;
 using DevExpress.XtraEditors.DXErrorProvider;
+using DPP_YH_Core.Extensions;
 using DxHelper;
 using ExtensionsDev;
 using System;
@@ -19,6 +21,7 @@ using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Documents;
 using System.Windows.Forms;
+using XdCxRhDW.Dto;
 using XdCxRhDW.Entity;
 using XdCxRhDW.Repostory;
 
@@ -27,6 +30,7 @@ namespace XdCxRhDW.App.EditForms
     public partial class TaskEditor : DevExpress.XtraEditors.XtraForm
     {
         public TaskInfo info;
+        public List<EnumDetectionWay> taskDetectionWayList;
         public TaskEditor()
         {
             InitializeComponent();
@@ -47,15 +51,15 @@ namespace XdCxRhDW.App.EditForms
             }
             this.txtTaskType.SelectedIndex = 0;
             this.txtTaskType_SelectedIndexChanged(this, EventArgs.Empty);
-
         }
 
 
-        public TaskEditor(TaskInfo info)
+        public TaskEditor(TaskInfo info,List<EnumDetectionWay> taskDetectionWayList)
            : this()
         {
             this.Text = "编辑任务";
             this.info = info;
+            this.taskDetectionWayList = taskDetectionWayList;
         }
 
         private async void TaskEditor_Load(object sender, EventArgs e)
@@ -78,11 +82,15 @@ namespace XdCxRhDW.App.EditForms
                     this.txtTaskName.Text = info.TaskName;
                     this.txtPosType.SelectedIndex = (int)info.PosType;
                     this.txtTaskType.SelectedIndex = (int)info.TaskType;
+                    this.txtSignalType.EditValue = info.SigType;
+                    this.txtDetectionWay.EditValue = string.Join(",", taskDetectionWayList);
+                    this.txtDetectionWay.RefreshEditValue();
                     this.txtMainSat.EditValue = satMain;
                     this.txtAdja1Sat.EditValue = satAdja1;
                     this.txtAdja2Sat.EditValue = satAdja2;
                     this.txtFreq.EditValue = info.Freq * (decimal)1e-6;
                     txtCapDir.Text = info.CapDir;
+                    txtCapDirFormat.Text = info.CapDirFormat;
                     txtDoFreqUp.Text = info.HistoryFrequpMHz;
                 }
             }
@@ -98,6 +106,19 @@ namespace XdCxRhDW.App.EditForms
                     dxErrorProvider.SetError(txtTaskName, "请填写任务名");
                     return;
                 }
+                if (txtSignalType.EditValue == null)
+                {
+                    dxErrorProvider.SetError(txtSignalType, "请选择信号类型");
+                    return;
+                }                
+                if ((EnumSigType)txtSignalType.EditValue == EnumSigType.SX)
+                {
+                    if (txtDetectionWay.EditValue == null)
+                    {
+                        dxErrorProvider.SetError(txtDetectionWay, "请选择检测方式");
+                        return;
+                    }
+                }
                 if (this.Text == "添加任务")
                 {
                     using (RHDWContext db = new RHDWContext())
@@ -176,6 +197,11 @@ namespace XdCxRhDW.App.EditForms
                         dxErrorProvider.SetError(txtCapDir, "请填写采集文件目录");
                         return;
                     }
+                    if (string.IsNullOrWhiteSpace(txtCapDirFormat.Text))
+                    {
+                        dxErrorProvider.SetError(txtCapDirFormat, "请填写目录日期格式");
+                        return;
+                    }
                     if (string.IsNullOrWhiteSpace(txtDoFreqUp.Text))
                     {
                         dxErrorProvider.SetError(txtDoFreqUp, "请填写要处理的频点");
@@ -207,17 +233,33 @@ namespace XdCxRhDW.App.EditForms
                     info.Adja1Sat = ((SatInfo)txtAdja1Sat.EditValue).SatCode;
                 if (txtAdja2Sat.EditValue != null)
                     info.Adja2Sat = ((SatInfo)txtAdja2Sat.EditValue).SatCode;
+                info.SigType = (EnumSigType)txtSignalType.EditValue;
+                if (info.SigType == EnumSigType.SX)
+                {
+                    taskDetectionWayList = new List<EnumDetectionWay>();
+                    var res = txtDetectionWay.EditValue.ToString().Split(new string[] { ","}, System.StringSplitOptions.RemoveEmptyEntries).ToList();
+                    foreach (var s in res)
+                    {
+                        taskDetectionWayList.Add((EnumDetectionWay)Enum.Parse(typeof(EnumDetectionWay), s));
+                    }
+                }
+                else
+                {
+                    taskDetectionWayList = null;
+                }
                 info.TaskType = (EnumTaskType)txtTaskType.SelectedIndex;
                 if (info.TaskType == EnumTaskType.Real)
                 {
                     info.Freq = (long)(Math.Round(Convert.ToDouble(txtFreq.EditValue),3) * 1e6);
                     info.CapDir = null;
+                    info.CapDirFormat = null;
                     info.HistoryFrequpMHz = null;
                 }
                 else
                 {
                     info.Freq = 0;
                     info.CapDir = txtCapDir.Text.Trim();
+                    info.CapDirFormat= txtCapDirFormat.Text.Trim(); 
                     info.HistoryFrequpMHz = txtDoFreqUp.Text.Replace(",", ",").Replace(";", ",").Replace(";", ",").Trim();
                 }
                 this.DialogResult = DialogResult.OK;
@@ -229,7 +271,6 @@ namespace XdCxRhDW.App.EditForms
             }
         }
 
-
         private void txtPosType_EditValueChanged(object sender, EventArgs e)
         {
             RadioGroup posTypeRadioGroup = sender as RadioGroup;
@@ -278,17 +319,48 @@ namespace XdCxRhDW.App.EditForms
 
         private void txtTaskType_SelectedIndexChanged(object sender, EventArgs e)
         {
+            //加载信号类型
+            txtSignalType.Properties.Items.Clear();
+            txtSignalType.Properties.Items.Add(new ImageComboBoxItem("请选择", null, -1));
+            txtSignalType.Properties.Items.AddEnum<EnumSigType>();
             if (txtTaskType.SelectedIndex == 0)
             {
                 itemFreqUp.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
                 itemCapDir.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+                itemCapDirFormat.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
                 itemDoFreqUp.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
             }
             else
             {
                 itemFreqUp.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
                 itemCapDir.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
+                itemCapDirFormat.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
                 itemDoFreqUp.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
+                var normal=txtSignalType.Properties.Items.FirstOrDefault(f =>f.Description.Contains("常规"));
+                txtSignalType.Properties.Items.Remove(normal);
+            }
+        }
+
+        private void txtSignalType_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            if (txtSignalType.SelectedIndex == 0) return;//请选择项不处理
+            var selectedEnum = (EnumSigType)Enum.Parse(typeof(EnumSigType), txtSignalType.EditValue.ToString());
+            if (selectedEnum == EnumSigType.SX)
+            {
+                txtDetectionWay.Properties.Items.AddEnum<EnumDetectionWay>();
+                itemDetectionWay.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
+            }
+            else {
+                itemDetectionWay.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+            }
+        }
+
+        private void txtDetectionWay_CustomDisplayText(object sender, CustomDisplayTextEventArgs e)
+        {
+            if (e.Value == null) return;
+            if (e.Value.ToString() == EnumDetectionWay.ISignal.ToString())
+            {
+                e.DisplayText = $"{(long)e.Value / 1e6}MHz";
             }
         }
     }

+ 3 - 0
XdCxRhDW.App/EditForms/TaskEditor.resx

@@ -120,4 +120,7 @@
   <metadata name="dxErrorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>40</value>
+  </metadata>
 </root>

+ 12 - 72
XdCxRhDW.App/ExtensionsDev/MapControlEx.cs

@@ -17,6 +17,7 @@ using System.Collections.Generic;
 using System.ComponentModel.DataAnnotations;
 using System.Configuration;
 using System.Data.Common;
+using System.Data.Entity.Core.Metadata.Edm;
 using System.Data.SQLite;
 using System.Drawing;
 using System.Drawing.Imaging;
@@ -799,7 +800,7 @@ public static class MapControlEx
         if (wmsType == EnumWmsType.ZKXT)//中科星图
         {
             var provider = new WmsDataProvider();//地图瓦片提供者
-            provider.ServerUri =$"http://{wmsIp}/tilecache/service/wms";
+            provider.ServerUri = $"http://{wmsIp}/tilecache/service/wms";
             if (!string.IsNullOrWhiteSpace(layerName))
                 provider.ActiveLayerName = layerName;
             provider.CustomParameters.Add("format", "image/JPEG");
@@ -813,21 +814,16 @@ public static class MapControlEx
             };
             ctrl.GetImageLayer().DataProvider = provider;
         }
-        if (wmsType == EnumWmsType.DataCenter)//数据中心
+        else//数据中心、路网
         {
             var provider = new HttpMapDataProvider();
             var tileSource = provider.TileSource as HttpTileSource;
             tileSource.HttpServerAddr = wmsIp;
             ctrl.GetImageLayer().DataProvider = provider;
-            ctrl.MinZoomLevel=3; 
-            ctrl.MaxZoomLevel=20;
-        }
-        if (wmsType == EnumWmsType.LW)//路网
-        {
             ctrl.MinZoomLevel = 3;
             ctrl.MaxZoomLevel = 20;
         }
-       
+
         return ctrl;
     }
 
@@ -2491,7 +2487,8 @@ public static class MapControlEx
         public const int maxZoomLevel = 14;
 
         public string HttpServerAddr { get; set; }
-
+        public EnumWmsType WmsType { get; set; }
+        public string layerName { get; set; }
         public GoogleMapType MapType { get; set; } = GoogleMapType.Normal;
 
         internal static double CalculateTotalImageSize(double zoomLevel)
@@ -2513,7 +2510,12 @@ public static class MapControlEx
             {
                 if (zoomLevel <= maxZoomLevel)
                 {
-                    string imgUrl = $"{HttpServerAddr}/{(int)MapType}/{zoomLevel}/{tilePositionX}/{tilePositionY}";
+                    string imgUrl = string.Empty;
+                    // imgUrl = $"{HttpServerAddr}/{(int)MapType}/{zoomLevel}/{tilePositionX}/{tilePositionY}";
+                    if (WmsType == EnumWmsType.DataCenter)
+                        imgUrl = $"{HttpServerAddr}/MapServer?lyr={layerName}&x={tilePositionX}&y={tilePositionY}&z={zoomLevel}";
+                    else
+                        imgUrl = $"{HttpServerAddr}/static/Source/Assets/Textures/overlay-final/{zoomLevel}/{tilePositionX}/{-tilePositionY}.png";
                     //string imgUrl = string.Format("http://192.168.0.214:58089/{0}/{1}/{2}/{3}", (int)GoogleMapType.Normal, zoomLevel, tilePositionX, tilePositionY);
                     Uri u = new Uri(imgUrl);
                     return u;
@@ -2527,68 +2529,6 @@ public static class MapControlEx
             }
         }
     }
-
-    //class WMSMapDataProvider : WmsDataProvider
-    //{
-    //    public WMSMapDataProvider()
-    //    {
-    //       // TileSource = new wmsTileSource(this);
-    //    }
-
-    //    public override MapSize GetMapSizeInPixels(double zoomLevel)
-    //    {
-    //        double imageSize;
-    //        imageSize = wmsTileSource.CalculateTotalImageSize(zoomLevel);
-    //        return new MapSize(imageSize, imageSize);
-    //    }
-
-    //    protected override Size BaseSizeInPixels
-    //    {
-    //        get { return new Size(Convert.ToInt32(wmsTileSource.tileSize * 2), Convert.ToInt32(wmsTileSource.tileSize * 2)); }
-    //    }
-    //}
-    //class wmsTileSource : MapTileSourceBase
-    //{
-    //    public const int tileSize = 256;
-    //    public const int maxZoomLevel = 14;
-
-    //    public string HttpServerAddr { get; set; }
-
-    //    public GoogleMapType MapType { get; set; } = GoogleMapType.Normal;
-
-    //    internal static double CalculateTotalImageSize(double zoomLevel)
-    //    {
-    //        if (zoomLevel < 1.0)
-    //            return zoomLevel * tileSize * 2;
-    //        return Math.Pow(2.0, zoomLevel) * tileSize;
-    //    }
-
-    //    public wmsTileSource(ICacheOptionsProvider cacheOptionsProvider) :
-    //        base((int)CalculateTotalImageSize(maxZoomLevel), (int)CalculateTotalImageSize(maxZoomLevel), tileSize, tileSize, cacheOptionsProvider)
-    //    {
-    //    }
-
-    //    public override Uri GetTileByZoomLevel(int zoomLevel, int tilePositionX, int tilePositionY)
-    //    {
-    //        if (string.IsNullOrWhiteSpace(HttpServerAddr)) return null;
-    //        try
-    //        {
-    //            if (zoomLevel <= maxZoomLevel)
-    //            {
-    //                string imgUrl = $"{HttpServerAddr}/{(int)MapType}/{zoomLevel}/{tilePositionX}/{tilePositionY}";
-    //                //string imgUrl = string.Format("http://192.168.0.214:58089/{0}/{1}/{2}/{3}", (int)GoogleMapType.Normal, zoomLevel, tilePositionX, tilePositionY);
-    //                Uri u = new Uri(imgUrl);
-    //                return u;
-    //            }
-    //            return null;
-    //        }
-    //        catch
-    //        {
-    //            Console.WriteLine($"加载地图数据出错,无法连接到{HttpServerAddr}");
-    //            return null;
-    //        }
-    //    }
-    //}
     #endregion
 
     //定位点聚合器

+ 42 - 5
XdCxRhDW.App/UserControl/CtrlHome.cs

@@ -33,6 +33,7 @@ using XdCxRhDW.Api;
 using XdCxRhDW.App.Controllers;
 using DevExpress.XtraPrinting.Native.Properties;
 using DevExpress.Utils.Drawing.Helpers;
+using DevExpress.Office.Crypto;
 
 namespace XdCxRhDW.App.UserControl
 {
@@ -725,6 +726,7 @@ namespace XdCxRhDW.App.UserControl
                     TaskEditor frm = new TaskEditor();
                     if (frm.ShowDialog() != DialogResult.OK) return;
                     var addItem = frm.info;
+                    var taskDetectionWayList = frm.taskDetectionWayList;
                     using (RHDWContext db = new RHDWContext())
                     {
                         if (addItem.PosType == EnumPosType.X1D1CX)
@@ -736,7 +738,20 @@ namespace XdCxRhDW.App.UserControl
                         {
                             addItem.Adja2Sat = null;
                         }
-                        db.TaskInfos.Add(addItem);
+                        var taskInfo = db.TaskInfos.Add(addItem);
+                        await db.SaveChangesAsync();
+                        if (taskDetectionWayList != null)
+                        {
+                            List<TaskDetectionWay> resList = new List<TaskDetectionWay>();
+                            foreach (var item in taskDetectionWayList)
+                            {
+                                TaskDetectionWay res = new TaskDetectionWay();
+                                res.TaskId = taskInfo.ID;
+                                res.DetectionWay = item;
+                                resList.Add(res);
+                            }
+                            db.TaskDetectionWays.AddRange(resList);
+                        }
                         await db.SaveChangesAsync();
                     }
                     list.Insert(0, addItem);
@@ -753,12 +768,15 @@ namespace XdCxRhDW.App.UserControl
             {
                 try
                 {
-                    var editItem = gridView1.GetFocusedRow() as TaskInfo;
-                    TaskEditor frm = new TaskEditor(editItem);
-                    if (frm.ShowDialog() != DialogResult.OK) return;
-                    editItem = frm.info;
                     using (RHDWContext db = new RHDWContext())
                     {
+                        var editItem = gridView1.GetFocusedRow() as TaskInfo;
+                        var taskDetectionWay = db.TaskDetectionWays.Where(w => w.TaskId == editItem.ID);
+                        var detectionWay = taskDetectionWay.Select(s=>s.DetectionWay).ToList();
+                        TaskEditor frm = new TaskEditor(editItem, detectionWay);
+                        if (frm.ShowDialog() != DialogResult.OK) return;
+                        editItem = frm.info;
+                        detectionWay = frm.taskDetectionWayList;
                         if (await db.TaskInfos.AnyAsync(p => p.ID != editItem.ID && p.TaskName == editItem.TaskName))
                         {
                             DxHelper.MsgBoxHelper.ShowWarning("任务名称重复");
@@ -767,10 +785,29 @@ namespace XdCxRhDW.App.UserControl
                         var find = await db.TaskInfos.Where(p => p.ID == editItem.ID).FirstOrDefaultAsync();
                         find.TaskName = editItem.TaskName;
                         find.PosType = editItem.PosType;
+                        find.SigType = editItem.SigType;
+                        if (taskDetectionWay != null)
+                            db.TaskDetectionWays.RemoveRange(taskDetectionWay);
+                        if (find.SigType == EnumSigType.SX )
+                        {
+                            if (detectionWay != null)
+                            {
+                                List<TaskDetectionWay> resList = new List<TaskDetectionWay>();
+                                foreach (var item in detectionWay)
+                                {
+                                    TaskDetectionWay res = new TaskDetectionWay();
+                                    res.TaskId = editItem.ID;
+                                    res.DetectionWay = item;
+                                    resList.Add(res);
+                                }
+                                db.TaskDetectionWays.AddRange(resList);
+                            }
+                        }
                         find.UpdateTime = DateTime.Now;
                         find.Freq = editItem.Freq;
                         find.MainSat = editItem.MainSat;
                         find.CapDir = editItem.CapDir;
+                        find.CapDirFormat = editItem.CapDirFormat;
                         find.HistoryFrequpMHz = editItem.HistoryFrequpMHz;
                         if (find.PosType == EnumPosType.X1D1CX)
                         {

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

@@ -437,6 +437,7 @@
     <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>

+ 1 - 0
XdCxRhDW.Entity/03.XdCxRhDW.Entity.csproj

@@ -55,6 +55,7 @@
     <Compile Include="SysSetings.cs" />
     <Compile Include="TargetInfo.cs" />
     <Compile Include="TaskInfo.cs" />
+    <Compile Include="TaskDetectionWay.cs" />
     <Compile Include="TxInfo.cs" />
     <Compile Include="XlInfo.cs" />
   </ItemGroup>

+ 27 - 3
XdCxRhDW.Entity/ModelEnum.cs

@@ -146,10 +146,34 @@ namespace XdCxRhDW.Entity
         /// </summary>
         [Display(Name = "常规信号")]
         Normal,
+        ///// <summary>
+        ///// DAMA信号
+        ///// </summary>
+        //[Display(Name = "DAMA信号")]
+        //DAMA,
         /// <summary>
-        /// DAMA信号
+        /// 时隙信号
         /// </summary>
-        [Display(Name = "DAMA信号")]
-        DAMA,
+        [Display(Name = "时隙信号")]
+        SX,
+    }
+
+    public enum EnumDetectionWay
+    {
+        /// <summary>
+        /// D信号(脱密)
+        /// </summary>
+        [Display(Name = "D信号(脱密)")]
+        DSignal,
+        /// <summary>
+        /// I信号(脱密
+        /// </summary>
+        [Display(Name = "I信号(脱密)")]
+        ISignal,
+        /// <summary>
+        /// 能量检测
+        /// </summary>
+        [Display(Name = "能量检测")]
+        EnergyDetection,
     }
 }

+ 21 - 0
XdCxRhDW.Entity/TaskDetectionWay.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace XdCxRhDW.Entity
+{
+    [Table("TaskDetectionWay")]
+    public class TaskDetectionWay : BaseEntity
+    {
+        public long TaskId { get; set; }
+
+        /// <summary>
+        /// 检测方式
+        /// </summary>
+        public EnumDetectionWay DetectionWay { get; set; }
+    }
+}

+ 10 - 2
XdCxRhDW.Entity/TaskInfo.cs

@@ -29,6 +29,9 @@ namespace XdCxRhDW.Entity
         [Display(Name = "定位类型")]
         public EnumPosType PosType { get; set; }
 
+        [Display(Name = "信号类型")]
+        public EnumSigType SigType { get; set; }
+
         [Display(Name = "主星", AutoGenerateField = false)]
         public int MainSat { get; set; }
 
@@ -41,8 +44,7 @@ namespace XdCxRhDW.Entity
         [Display(Name = "上行频点")]
         public long Freq { get; set; }
 
-        [Display(Name = "信号类型")]
-        public EnumSigType SigType { get; set; }
+  
 
         /// <summary>
         /// 历史任务采集文件的目录
@@ -50,6 +52,12 @@ namespace XdCxRhDW.Entity
         [Display(AutoGenerateField = false)]
         public string CapDir { get; set; }
 
+        /// <summary>
+        /// 历史任务采集文件的目录日期格式
+        /// </summary>
+        [Display(AutoGenerateField = false)]
+        public string CapDirFormat { get; set; }
+
         /// <summary>
         /// 历史任务要处理的上行频点MHz
         /// </summary>

+ 30 - 0
XdCxRhDW.Framework/01.XdCxRhDW.Framework.csproj

@@ -32,14 +32,42 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
+    </Reference>
     <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
       <HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
     </Reference>
     <Reference Include="System" />
+    <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
+    </Reference>
     <Reference Include="System.ComponentModel.DataAnnotations" />
     <Reference Include="System.Configuration" />
     <Reference Include="System.Core" />
     <Reference Include="System.Drawing" />
+    <Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Numerics" />
+    <Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Text.Json, Version=8.0.0.3, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Text.Json.8.0.3\lib\net462\System.Text.Json.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
+    </Reference>
     <Reference Include="System.Xml.Linq" />
     <Reference Include="System.Data.DataSetExtensions" />
     <Reference Include="Microsoft.CSharp" />
@@ -56,10 +84,12 @@
     <Compile Include="IpHelper.cs" />
     <Compile Include="MD5Helper.cs" />
     <Compile Include="Messenger.cs" />
+    <Compile Include="ObjectExtension.cs" />
     <Compile Include="PhysicsHelper.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
   <ItemGroup>
+    <None Include="app.config" />
     <None Include="packages.config" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 226 - 0
XdCxRhDW.Framework/ObjectExtension.cs

@@ -0,0 +1,226 @@
+using System;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Text.Encodings.Web;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using System.Text.Unicode;
+
+namespace DPP_YH_Core.Extensions
+{
+    public static class ObjectExtension
+    {
+        private class DateTimeConverter : JsonConverter<DateTime>
+        {
+            public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+            {
+                return DateTime.Parse(reader.GetString());
+            }
+
+            public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options)
+            {
+                writer.WriteStringValue(value.ToString("yyyy-MM-dd HH:mm:ss"));
+            }
+        }
+        /// <summary>
+        /// <para>对象转JsonString</para>
+        /// <para>如果对象本身是String类型则直接返回</para>
+        /// </summary>
+        /// <param name="obj">对象</param>
+        /// <param name="formarting">是否开启格式化,格式化会多占用一些字节,默认不格式化</param>
+        /// <returns></returns>
+        public static string ToJsonStr(this object obj, bool formarting = false)
+        {
+            if (obj == null) return "";
+            if (obj.GetType() == typeof(string)) return obj as string;
+            if (obj.GetType() == typeof(StringBuilder)) return ((StringBuilder)obj).ToString();
+            var options = new JsonSerializerOptions
+            {
+                WriteIndented = formarting,
+                IncludeFields = true,
+                DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
+            };
+            options.Converters.Add(new DateTimeConverter());//yyyy-MM-dd HH:mm:ss
+                                                            //不加这句非ASCII字符会被序列化为Unicode编号,类似于\u8C03
+            options.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All);
+            options.GetConverter(obj.GetType());
+            var res = JsonSerializer.Serialize(obj, options);
+            return res;
+        }
+
+        public static string ToNewtonJsonStr(this object obj)
+        {
+            return Newtonsoft.Json.JsonConvert.SerializeObject(obj);
+        }
+
+        public static T ToJson<T>(this string obj)
+        {
+            return Newtonsoft.Json.JsonConvert.DeserializeObject<T>(obj);
+        }
+        public static T To<T>(this Object @this)
+        {
+            if (@this != null)
+            {
+                Type targetType = typeof(T);
+
+                if (@this.GetType() == targetType)
+                {
+                    return (T)@this;
+                }
+
+                TypeConverter converter = TypeDescriptor.GetConverter(@this);
+                if (converter != null)
+                {
+                    if (converter.CanConvertTo(targetType))
+                    {
+                        return (T)converter.ConvertTo(@this, targetType);
+                    }
+                }
+
+                converter = TypeDescriptor.GetConverter(targetType);
+                if (converter != null)
+                {
+                    if (converter.CanConvertFrom(@this.GetType()))
+                    {
+                        return (T)converter.ConvertFrom(@this);
+                    }
+                }
+
+                if (@this == DBNull.Value)
+                {
+                    return (T)(object)null;
+                }
+            }
+
+            return (T)@this;
+        }
+
+        public static object To(this Object @this, Type type)
+        {
+            if (@this != null)
+            {
+                Type targetType = type;
+
+                if (@this.GetType() == targetType)
+                {
+                    return @this;
+                }
+
+                TypeConverter converter = TypeDescriptor.GetConverter(@this);
+                if (converter != null)
+                {
+                    if (converter.CanConvertTo(targetType))
+                    {
+                        return converter.ConvertTo(@this, targetType);
+                    }
+                }
+
+                converter = TypeDescriptor.GetConverter(targetType);
+                if (converter != null)
+                {
+                    if (converter.CanConvertFrom(@this.GetType()))
+                    {
+                        return converter.ConvertFrom(@this);
+                    }
+                }
+
+                if (@this == DBNull.Value)
+                {
+                    return null;
+                }
+            }
+
+            return @this;
+        }
+
+
+        /// <summary>
+        /// <para>将源对象的属性值映射到target对象上,(target==null时直接返回)</para>
+        /// <para>该方法使用反射</para>
+        /// <para>源对象和目标对象可以是不同对象,只要属性名称一致即可,如Model1映射到Model2</para>
+        /// </summary>
+        /// <typeparam name="T">target泛型类</typeparam>
+        /// <param name="obj">源对象</param>
+        /// <param name="target">目标对象</param>
+        public static void MapTo<T>(this object obj, T target) where T : class, new()
+        {
+            if (obj == null || target == null) return;
+            var objProps = obj.GetType().GetProperties();
+            if (objProps == null || objProps.Length == 0) return;
+            var listObjProps = objProps.ToList();
+            //var str = JsonConvert.SerializeObject(obj);
+            //var foo = JsonConvert.DeserializeObject<T>(str);
+            var props = typeof(T).GetProperties();
+            foreach (var item in props)
+            {
+                if (!item.CanWrite) continue;
+                var find = listObjProps.Find(p => p.Name == item.Name);
+                if (find == null) continue;
+
+
+                var value = find.GetValue(obj);
+                if (value == null) continue;
+                if (item.PropertyType != value.GetType() && !item.PropertyType.Name.Contains("Nullable"))
+                {
+                    value = Convert.ChangeType(value, item.PropertyType);
+                }
+                item.SetValue(target, value);
+            }
+        }
+        /// <summary>
+        /// <para>将源对象的映射为一个新对象</para>
+        /// <para>该方法使用json序列化,对象嵌套深度不能超过8层</para>
+        /// <para>源对象和目标对象可以是不同对象,只要属性名称一致即可,如Model1映射到Model2</para>
+        /// </summary>
+        /// <typeparam name="T">返回对象泛型类型</typeparam>
+        /// <param name="obj">源对象</param>
+        /// <returns></returns>
+        public static T MapTo<T>(this object obj)
+        {
+            string str;
+            JsonSerializerOptions options = null;
+            if (obj == null)
+                str = "";
+            else if (obj.GetType() == typeof(string))
+                str = obj.ToString();
+            else if (obj.GetType() == typeof(StringBuilder))
+                str = ((StringBuilder)obj).ToString();
+            else
+            {
+                options = new JsonSerializerOptions
+                {
+                    WriteIndented = false,
+                    IncludeFields = true,
+                    DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
+                };
+                options.Converters.Add(new DateTimeConverter());//yyyy-MM-dd HH:mm:ss
+                options.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All);
+                str = JsonSerializer.Serialize(obj, options);
+            }
+            if (options == null)
+            {
+                options = new JsonSerializerOptions
+                {
+                    WriteIndented = false,
+                    IncludeFields = true,
+                    DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
+                };
+                options.Converters.Add(new DateTimeConverter());//yyyy-MM-dd HH:mm:ss
+                options.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All);
+            }
+            if (string.IsNullOrWhiteSpace(str)) return default;
+            var res = JsonSerializer.Deserialize<T>(str, options);
+            return res;
+        }
+        //public static T MapTo<T>(this object obj) where T: class,new()
+        //{
+        //    if (obj == null) return null;
+        //    var objProps = obj.GetType().GetProperties();
+        //    if (objProps == null || objProps.Length == 0) return null;
+        //    T t = new T();
+        //    obj.MapTo(t);
+        //    return t;
+        //}
+    }
+}

+ 11 - 0
XdCxRhDW.Framework/app.config

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>
+</configuration>

+ 9 - 0
XdCxRhDW.Framework/packages.config

@@ -1,4 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
+  <package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net472" />
   <package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
+  <package id="System.Buffers" version="4.5.1" targetFramework="net472" />
+  <package id="System.Memory" version="4.5.5" targetFramework="net472" />
+  <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
+  <package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net472" />
+  <package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net472" />
+  <package id="System.Text.Json" version="8.0.3" targetFramework="net472" />
+  <package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
+  <package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
 </packages>

+ 2 - 0
XdCxRhDW.Repostory/EFContext/RHDWContext.cs

@@ -48,6 +48,8 @@ namespace XdCxRhDW.Repostory
 
         public DbSet<TaskInfo> TaskInfos { set; get; }
 
+        public DbSet<TaskDetectionWay> TaskDetectionWays { set; get; }
+
         public DbSet<TxInfo> TxInfos { get; set; }
 
         public DbSet<SatInfo> SatInfos { get; set; }

+ 8 - 0
XdCxRhDW.Sender/App.config

@@ -18,4 +18,12 @@
   <startup>
     <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
   </startup>
+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>
 </configuration>

+ 0 - 1
XdCxRhDW.TaskServer/Controllers/HistoryTaskProcessingController.cs

@@ -61,7 +61,6 @@ namespace XdCxRhDW.TaskServer.Controllers
             {
                 Serilog.Log.Error(ex, "离线任务处理出错!");
                 return Error("离线任务处理出错");
-
             }
         }
 

+ 5 - 0
XdCxRhDw.Dto/EnumPosResTypeDto.cs

@@ -160,5 +160,10 @@ namespace XdCxRhDW.Dto
         /// </summary>
         [Display(Name = "DAMA信号")]
         DAMA,
+        /// <summary>
+        /// 时隙信号
+        /// </summary>
+        [Display(Name = "时隙信号")]
+        SX,
     }
 }