zoulei 1 vuosi sitten
vanhempi
commit
268b32c3c5

BIN
XdCxRhDW.Api/AddIns/GDOP误差椭圆/GDOP_Draw_11.dll


BIN
XdCxRhDW.Api/AddIns/GDOP误差椭圆/Tle2XYZ.dll


BIN
XdCxRhDW.Api/AddIns/GPU参估/XcorrGpu.exe


BIN
XdCxRhDW.Api/AddIns/变采样/ReSample.exe


BIN
XdCxRhDW.Api/AddIns/时差线/Positioning.dll


+ 1 - 1
XdCxRhDW.Api/AddIns/星历推算/EphHelper.cs

@@ -16,7 +16,7 @@ namespace XdCxRhDW.Api
     public static class EphHelper
     {
         private static readonly DateTime dtZero = new DateTime(1970, 1, 1, 0, 0, 0, 0);
-        private const string dll = @"AddIns\Tle2XYZ.dll";//此dll已加密
+        private const string dll = @"AddIns\星历推算\Tle2XYZ.dll";//此dll已加密
 
         #region cpp dll Interop 
         [DllImport(dll, EntryPoint = "GenerateXYZByPeriod", CallingConvention = CallingConvention.Cdecl)]

BIN
XdCxRhDW.Api/AddIns/星历推算/Tle2XYZ.dll


BIN
XdCxRhDW.Api/AddIns/检测Cpu参估/XcorrCpu.exe


+ 39 - 13
XdCxRhDW.App/CorTools/DetectToolForm.cs

@@ -27,13 +27,14 @@ namespace XdCxRhDW.App.CorTools
         public DetectToolForm()
         {
             InitializeComponent();
+            this.gcCheckCgRes.Init<CafResult>();
             txtFileTime.UseDefault().UseDoubleClickToSelectAll();
         }
 
         private async void MainForm_Load(object sender, EventArgs e)
         {
             layoutControl1.BestFit();
-            this.gcCheckCgRes.Init<CafResult>().UseExportXlsx().UseRowNumber().UseFilter()
+            this.gcCheckCgRes.UseExportXlsx().UseRowNumber().UseFilter()
                 .UseExportCsv()
                 .AddMenu("时隙参估", SvgHelper.CreateSlotCg(), async () =>
                 {
@@ -93,19 +94,26 @@ namespace XdCxRhDW.App.CorTools
                             break;
                         }
 
-                        var result = await HttpHelper.PostRequestAsync<CpuCgResDto>(baseUrl + "DetectCg/CpuCgCalc", xItem);
-                        if (result.code == 200)
+                        try
                         {
-                            item.dt = result.data.Dt;
-                            item.df = result.data.Df;
-                            item.snr = result.data.Snr;
-                            item.tm = result.data.TimeMs;
-                            this.gridView1.RefreshData();
+                            var result = await HttpHelper.PostRequestAsync<CpuCgResDto>(baseUrl + "DetectCg/CpuCgCalc", xItem);
+                            if (result.code == 200)
+                            {
+                                item.dt = result.data.Dt;
+                                item.df = result.data.Df;
+                                item.snr = result.data.Snr;
+                                item.tm = result.data.TimeMs;
+                                this.gridView1.RefreshData();
+                            }
+                            else
+                            {
+                                Serilog.Log.Error(result.msg);
+                                continue;
+                            }
                         }
-                        else
+                        catch
                         {
-                            Serilog.Log.Error(result.msg);
-                            continue;
+                            break;
                         }
                     }
                     layoutControl1.Enabled = true;
@@ -157,7 +165,7 @@ namespace XdCxRhDW.App.CorTools
             }
             else
             {
-                dmcType= dmcType & ~DmcType.DAMA;
+                dmcType = dmcType & ~DmcType.DAMA;
             }
             DetectDto dto = new DetectDto();
             dto.dmcType = dmcType;
@@ -465,6 +473,24 @@ namespace XdCxRhDW.App.CorTools
             System.IO.File.WriteAllLines(inifile, lines);
         }
 
-
+        private void gridView1_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
+        {
+            if (e.Column.FieldName == nameof(CafResult.dt)
+                || e.Column.FieldName == nameof(CafResult.df)
+                || e.Column.FieldName == nameof(CafResult.snr))
+            {
+                var val = gridView1.GetRowCellValue(e.ListSourceRowIndex, gridView1.Columns[nameof(CafResult.snr)]);
+                if (val != null && (double)val == 0)
+                {
+                    e.DisplayText = "--";
+                }
+            }
+            else if (e.Column.FieldName == nameof(CafResult.ModType)
+                || e.Column.FieldName == nameof(CafResult.ModRate))
+            {
+                if (e.Value == null||e.Value.ToString()=="")
+                    e.DisplayText = "--";
+            }
+        }
     }
 }

+ 21 - 20
XdCxRhDW.App/CorTools/DetectToolForm.designer.cs

@@ -28,11 +28,6 @@
         /// </summary>
         private void InitializeComponent()
         {
-            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions7 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject25 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject26 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject27 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject28 = 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();
@@ -58,6 +53,11 @@
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject18 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject19 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject20 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions6 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject21 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject22 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject23 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject24 = new DevExpress.Utils.SerializableAppearanceObject();
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
             this.txtFileTime = new DevExpress.XtraEditors.DateEdit();
             this.btnCalc = new DevExpress.XtraEditors.SimpleButton();
@@ -75,6 +75,7 @@
             this.tm = new DevExpress.XtraGrid.Columns.GridColumn();
             this.file1 = new DevExpress.XtraGrid.Columns.GridColumn();
             this.file2 = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.DemType = new DevExpress.XtraGrid.Columns.GridColumn();
             this.modType = new DevExpress.XtraGrid.Columns.GridColumn();
             this.modRate = new DevExpress.XtraGrid.Columns.GridColumn();
             this.tePos = new DevExpress.XtraEditors.TextEdit();
@@ -109,7 +110,6 @@
             this.layoutItemDrawImage = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem();
             this.itemBand = new DevExpress.XtraLayout.LayoutControlItem();
-            this.DemType = new DevExpress.XtraGrid.Columns.GridColumn();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.txtFileTime.Properties)).BeginInit();
@@ -273,6 +273,7 @@
             this.gridView1.OptionsView.ShowVerticalLines = DevExpress.Utils.DefaultBoolean.False;
             this.gridView1.RowHeight = 0;
             this.gridView1.ViewCaptionHeight = 0;
+            this.gridView1.CustomColumnDisplayText += new DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventHandler(this.gridView1_CustomColumnDisplayText);
             // 
             // UserName
             // 
@@ -370,6 +371,14 @@
             this.file2.VisibleIndex = 1;
             this.file2.Width = 127;
             // 
+            // DemType
+            // 
+            this.DemType.Caption = "检测类型";
+            this.DemType.FieldName = "DmcType";
+            this.DemType.Name = "DemType";
+            this.DemType.Visible = true;
+            this.DemType.VisibleIndex = 10;
+            // 
             // modType
             // 
             this.modType.Caption = "调制类型";
@@ -475,7 +484,7 @@
             this.tefs.Name = "tefs";
             this.tefs.Properties.AutoHeight = false;
             this.tefs.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -1, false, true, false, editorButtonImageOptions7, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject25, serializableAppearanceObject26, serializableAppearanceObject27, serializableAppearanceObject28, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "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.tefs.Size = new System.Drawing.Size(72, 20);
             this.tefs.StyleController = this.layoutControl1;
             this.tefs.TabIndex = 6;
@@ -488,7 +497,7 @@
             this.teCenter.Name = "teCenter";
             this.teCenter.Properties.AutoHeight = false;
             this.teCenter.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "us", -1, false, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "us", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.teCenter.Size = new System.Drawing.Size(54, 20);
             this.teCenter.StyleController = this.layoutControl1;
             this.teCenter.TabIndex = 7;
@@ -501,7 +510,7 @@
             this.teRange.Name = "teRange";
             this.teRange.Properties.AutoHeight = false;
             this.teRange.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "us", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "us", -1, false, true, false, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.teRange.Size = new System.Drawing.Size(50, 20);
             this.teRange.StyleController = this.layoutControl1;
             this.teRange.TabIndex = 8;
@@ -514,7 +523,7 @@
             this.teDfRange.Name = "teDfRange";
             this.teDfRange.Properties.AutoHeight = false;
             this.teDfRange.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions4, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject13, serializableAppearanceObject14, serializableAppearanceObject15, serializableAppearanceObject16, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.teDfRange.Size = new System.Drawing.Size(51, 20);
             this.teDfRange.StyleController = this.layoutControl1;
             this.teDfRange.TabIndex = 11;
@@ -527,7 +536,7 @@
             this.teSnr.Name = "teSnr";
             this.teSnr.Properties.AutoHeight = false;
             this.teSnr.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "dB", -1, false, true, false, editorButtonImageOptions4, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject13, serializableAppearanceObject14, serializableAppearanceObject15, serializableAppearanceObject16, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "dB", -1, false, true, false, editorButtonImageOptions5, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject17, serializableAppearanceObject18, serializableAppearanceObject19, serializableAppearanceObject20, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.teSnr.Size = new System.Drawing.Size(52, 20);
             this.teSnr.StyleController = this.layoutControl1;
             this.teSnr.TabIndex = 14;
@@ -540,7 +549,7 @@
             this.txtBand.Name = "txtBand";
             this.txtBand.Properties.AutoHeight = false;
             this.txtBand.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "KHz", -1, false, true, false, editorButtonImageOptions5, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject17, serializableAppearanceObject18, serializableAppearanceObject19, serializableAppearanceObject20, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "KHz", -1, false, true, false, editorButtonImageOptions6, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject21, serializableAppearanceObject22, serializableAppearanceObject23, serializableAppearanceObject24, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.txtBand.Size = new System.Drawing.Size(61, 21);
             this.txtBand.StyleController = this.layoutControl1;
             this.txtBand.TabIndex = 6;
@@ -813,14 +822,6 @@
             this.itemBand.TextToControlDistance = 5;
             this.itemBand.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
             // 
-            // DemType
-            // 
-            this.DemType.Caption = "检测类型";
-            this.DemType.FieldName = "DmcType";
-            this.DemType.Name = "DemType";
-            this.DemType.Visible = true;
-            this.DemType.VisibleIndex = 10;
-            // 
             // DetectToolForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);

+ 30 - 33
XdCxRhDW.App/CorTools/XlCalculateForm.Designer.cs

@@ -47,17 +47,17 @@
             this.txtStartTime = new DevExpress.XtraEditors.DateEdit();
             this.txtTle = new DevExpress.XtraEditors.SearchLookUpEdit();
             this.searchLookUpEdit1View = new DevExpress.XtraGrid.Views.Grid.GridView();
+            this.txtTimeout = new DevExpress.XtraEditors.ButtonEdit();
             this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
             this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
+            this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
             this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.txtTimeout = new DevExpress.XtraEditors.ButtonEdit();
             this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.gridControl)).BeginInit();
@@ -69,17 +69,17 @@
             ((System.ComponentModel.ISupportInitialize)(this.txtStartTime.Properties.CalendarTimeProperties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtTle.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtTimeout.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtTimeout.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
@@ -131,8 +131,6 @@
             this.txtSpanSeconds.Properties.AutoHeight = false;
             this.txtSpanSeconds.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "秒", -1, false, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
-            this.txtSpanSeconds.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
-            this.txtSpanSeconds.Properties.MaskSettings.Set("mask", "f0");
             this.txtSpanSeconds.Size = new System.Drawing.Size(113, 22);
             this.txtSpanSeconds.StyleController = this.layoutControl1;
             this.txtSpanSeconds.TabIndex = 8;
@@ -195,6 +193,18 @@
             this.searchLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = false;
             this.searchLookUpEdit1View.OptionsView.ShowGroupPanel = false;
             // 
+            // txtTimeout
+            // 
+            this.txtTimeout.EditValue = "30";
+            this.txtTimeout.Location = new System.Drawing.Point(575, 38);
+            this.txtTimeout.Name = "txtTimeout";
+            this.txtTimeout.Properties.AutoHeight = false;
+            this.txtTimeout.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "秒", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            this.txtTimeout.Size = new System.Drawing.Size(113, 22);
+            this.txtTimeout.StyleController = this.layoutControl1;
+            this.txtTimeout.TabIndex = 8;
+            // 
             // Root
             // 
             this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
@@ -254,6 +264,18 @@
             this.layoutControlGroup1.ShowInCustomizationForm = false;
             this.layoutControlGroup1.Size = new System.Drawing.Size(680, 26);
             // 
+            // layoutControlGroup2
+            // 
+            this.layoutControlGroup2.GroupBordersVisible = false;
+            this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
+            this.layoutControlItem1,
+            this.layoutControlItem3,
+            this.layoutControlItem4,
+            this.layoutControlItem7});
+            this.layoutControlGroup2.Location = new System.Drawing.Point(0, 0);
+            this.layoutControlGroup2.Name = "layoutControlGroup2";
+            this.layoutControlGroup2.Size = new System.Drawing.Size(680, 26);
+            // 
             // layoutControlItem1
             // 
             this.layoutControlItem1.Control = this.txtStartTime;
@@ -296,19 +318,6 @@
             this.layoutControlItem4.TextSize = new System.Drawing.Size(48, 14);
             this.layoutControlItem4.TextToControlDistance = 5;
             // 
-            // txtTimeout
-            // 
-            this.txtTimeout.Location = new System.Drawing.Point(575, 38);
-            this.txtTimeout.Name = "txtTimeout";
-            this.txtTimeout.Properties.AutoHeight = false;
-            this.txtTimeout.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "秒", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
-            this.txtTimeout.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
-            this.txtTimeout.Properties.MaskSettings.Set("mask", "f0");
-            this.txtTimeout.Size = new System.Drawing.Size(113, 22);
-            this.txtTimeout.StyleController = this.layoutControl1;
-            this.txtTimeout.TabIndex = 8;
-            // 
             // layoutControlItem7
             // 
             this.layoutControlItem7.Control = this.txtTimeout;
@@ -325,18 +334,6 @@
             this.layoutControlItem7.TextSize = new System.Drawing.Size(48, 14);
             this.layoutControlItem7.TextToControlDistance = 5;
             // 
-            // layoutControlGroup2
-            // 
-            this.layoutControlGroup2.GroupBordersVisible = false;
-            this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
-            this.layoutControlItem1,
-            this.layoutControlItem3,
-            this.layoutControlItem4,
-            this.layoutControlItem7});
-            this.layoutControlGroup2.Location = new System.Drawing.Point(0, 0);
-            this.layoutControlGroup2.Name = "layoutControlGroup2";
-            this.layoutControlGroup2.Size = new System.Drawing.Size(680, 26);
-            // 
             // XlCalculateForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
@@ -357,17 +354,17 @@
             ((System.ComponentModel.ISupportInitialize)(this.txtStartTime.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtTle.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtTimeout.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtTimeout.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit();
             this.ResumeLayout(false);
 
         }

+ 26 - 14
XdCxRhDW.App/CorTools/XlCalculateForm.cs

@@ -44,11 +44,21 @@ namespace XdCxRhDW.App.CorTools
                 DxHelper.MsgBoxHelper.ShowError("请填写开始时间");
                 return;
             }
-            if (!string.IsNullOrEmpty(txtEndTime.Text) && string.IsNullOrEmpty(txtSpanSeconds.Text))
+            int timeout, spanSeconds = 1;
+            if (txtEndTime.DateTime != txtStartTime.DateTime)
             {
-                DxHelper.MsgBoxHelper.ShowError("请填写推算间隔");
+                if (!string.IsNullOrEmpty(txtEndTime.Text) && !int.TryParse(txtSpanSeconds.Text, out spanSeconds))
+                {
+                    DxHelper.MsgBoxHelper.ShowError("推算间隔非数字");
+                    return;
+                }
+            }
+            if (!int.TryParse(txtTimeout.Text, out timeout))
+            {
+                DxHelper.MsgBoxHelper.ShowError("超时时间非数字");
                 return;
             }
+
             var startTime = Convert.ToDateTime(txtStartTime.EditValue);
             var endTime = Convert.ToDateTime(txtEndTime.EditValue);
             if (!string.IsNullOrEmpty(txtStartTime.Text) && !string.IsNullOrEmpty(txtEndTime.Text))
@@ -64,11 +74,6 @@ namespace XdCxRhDW.App.CorTools
                     return;
                 }
             }
-            if (!double.TryParse(txtTimeout.Text, out double timeout))
-            {
-                DxHelper.MsgBoxHelper.ShowError("超时时间非数字");
-                return;
-            }
             if (timeout <= 0) timeout = 30;
             listEph.Clear();
             var settings = new SysSetings();
@@ -86,15 +91,19 @@ namespace XdCxRhDW.App.CorTools
                         tleStr = txtTle.Text,
                         start = startTime,
                         end = endTime,
-                        spanSeconds = (int)txtSpanSeconds.EditValue,
-                        TimeoutSeconds = (int)timeout
+                        spanSeconds = spanSeconds,
+                        TimeoutSeconds = timeout
                     };
-                    var ephRes = await HttpHelper.PostRequestAsync<List<ModelSatEphRes>>(url, XlCalcMultDto, (int)timeout);
+                    var ephRes = await HttpHelper.PostRequestAsync<List<ModelSatEphRes>>(url, XlCalcMultDto, timeout);
                     if (ephRes.code == 200)
                     {
                         listEph.AddRange(ephRes.data);
                         gridView.RefreshData();
                     }
+                    else
+                    {
+                        DxHelper.MsgBoxHelper.ShowError(ephRes.msg);
+                    }
                 }
                 else
                 {
@@ -102,16 +111,19 @@ namespace XdCxRhDW.App.CorTools
                     var XlCalcDto = new XlCalcDto()
                     {
                         tleStr = txtTle.Text,
-                        dt = Convert.ToDateTime(txtStartTime.EditValue),
-                        TimeoutSeconds = (int)timeout
+                        dt = txtStartTime.DateTime,
+                        TimeoutSeconds = timeout
                     };
-                    var ephRes = await HttpHelper.PostRequestAsync<ModelSatEphRes>(url, XlCalcDto, (int)timeout);
+                    var ephRes = await HttpHelper.PostRequestAsync<ModelSatEphRes>(url, XlCalcDto, timeout);
                     if (ephRes.code == 200)
                     {
                         listEph.Add(ephRes.data);
                         gridView.RefreshData();
                     }
-
+                    else
+                    {
+                        DxHelper.MsgBoxHelper.ShowError(ephRes.msg);
+                    }
                 }
             }
             catch (TaskCanceledException)

+ 193 - 175
XdCxRhDW.App/EditForms/TaskEditor.Designer.cs

@@ -29,17 +29,18 @@
         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.txtDetectionWay = new DevExpress.XtraEditors.CheckedComboBoxEdit();
             this.btnSave = new DevExpress.XtraEditors.SimpleButton();
             this.txtTaskName = new DevExpress.XtraEditors.TextEdit();
             this.txtPosType = new DevExpress.XtraEditors.RadioGroup();
@@ -53,27 +54,28 @@
             this.txtTaskType = new DevExpress.XtraEditors.RadioGroup();
             this.txtCapDir = new DevExpress.XtraEditors.TextEdit();
             this.txtDoFreqUp = new DevExpress.XtraEditors.ButtonEdit();
+            this.txtSignalType = new DevExpress.XtraEditors.ImageComboBoxEdit();
+            this.txtCapDirFormat = new DevExpress.XtraEditors.TextEdit();
             this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
             this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
             this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
             this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItemAdja1 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItemAdja2 = new DevExpress.XtraLayout.LayoutControlItem();
             this.itemFreqUp = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
             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();
+            this.layoutControlItemAdja1 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItemAdja2 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.itemDetectionWay = new DevExpress.XtraLayout.LayoutControlItem();
+            this.itemDoFreqUp = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.dxErrorProvider = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components);
+            this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.txtDetectionWay.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtTaskName.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtPosType.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtFreq.Properties)).BeginInit();
@@ -86,25 +88,25 @@
             ((System.ComponentModel.ISupportInitialize)(this.txtTaskType.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtCapDir.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtDoFreqUp.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtSignalType.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtCapDirFormat.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAdja1)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAdja2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.itemFreqUp)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
             ((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();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAdja1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAdja2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.itemDetectionWay)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.itemDoFreqUp)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
@@ -127,13 +129,23 @@
             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(434, 633);
+            this.layoutControl1.Size = new System.Drawing.Size(501, 388);
             this.layoutControl1.TabIndex = 0;
             this.layoutControl1.Text = "layoutControl1";
             // 
+            // txtDetectionWay
+            // 
+            this.txtDetectionWay.Location = new System.Drawing.Point(252, 226);
+            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(237, 20);
+            this.txtDetectionWay.StyleController = this.layoutControl1;
+            this.txtDetectionWay.TabIndex = 12;
+            // 
             // btnSave
             // 
-            this.btnSave.Location = new System.Drawing.Point(306, 588);
+            this.btnSave.Location = new System.Drawing.Point(373, 342);
             this.btnSave.Name = "btnSave";
             this.btnSave.Size = new System.Drawing.Size(116, 26);
             this.btnSave.StyleController = this.layoutControl1;
@@ -143,45 +155,47 @@
             // 
             // txtTaskName
             // 
-            this.txtTaskName.Location = new System.Drawing.Point(12, 29);
+            this.txtTaskName.Location = new System.Drawing.Point(12, 39);
             this.txtTaskName.Name = "txtTaskName";
             this.txtTaskName.Properties.AutoHeight = false;
-            this.txtTaskName.Size = new System.Drawing.Size(410, 20);
+            this.txtTaskName.Size = new System.Drawing.Size(317, 20);
             this.txtTaskName.StyleController = this.layoutControl1;
             this.txtTaskName.TabIndex = 4;
             // 
             // txtPosType
             // 
             this.txtPosType.EditValue = 0;
-            this.txtPosType.Location = new System.Drawing.Point(12, 134);
+            this.txtPosType.Location = new System.Drawing.Point(12, 85);
             this.txtPosType.Name = "txtPosType";
-            this.txtPosType.Properties.Columns = 2;
-            this.txtPosType.Size = new System.Drawing.Size(410, 71);
+            this.txtPosType.Properties.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244)))));
+            this.txtPosType.Properties.Appearance.Options.UseBackColor = true;
+            this.txtPosType.Properties.Columns = 3;
+            this.txtPosType.Size = new System.Drawing.Size(477, 79);
             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, 431);
+            this.txtFreq.Location = new System.Drawing.Point(12, 267);
             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, 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);
+            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(236, 20);
             this.txtFreq.StyleController = this.layoutControl1;
             this.txtFreq.TabIndex = 10;
             // 
             // txtMainSat
             // 
-            this.txtMainSat.Location = new System.Drawing.Point(12, 226);
+            this.txtMainSat.Location = new System.Drawing.Point(12, 185);
             this.txtMainSat.Name = "txtMainSat";
             this.txtMainSat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
             this.txtMainSat.Properties.NullText = "";
             this.txtMainSat.Properties.PopupSizeable = false;
             this.txtMainSat.Properties.PopupView = this.searchLookUpEdit1View;
-            this.txtMainSat.Size = new System.Drawing.Size(410, 20);
+            this.txtMainSat.Size = new System.Drawing.Size(156, 20);
             this.txtMainSat.StyleController = this.layoutControl1;
             this.txtMainSat.TabIndex = 7;
             // 
@@ -194,14 +208,14 @@
             // 
             // txtAdja1Sat
             // 
-            this.txtAdja1Sat.Location = new System.Drawing.Point(12, 267);
+            this.txtAdja1Sat.Location = new System.Drawing.Point(172, 185);
             this.txtAdja1Sat.Name = "txtAdja1Sat";
             this.txtAdja1Sat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
             this.txtAdja1Sat.Properties.NullText = "";
             this.txtAdja1Sat.Properties.PopupSizeable = false;
             this.txtAdja1Sat.Properties.PopupView = this.gridView1;
-            this.txtAdja1Sat.Size = new System.Drawing.Size(410, 20);
+            this.txtAdja1Sat.Size = new System.Drawing.Size(156, 20);
             this.txtAdja1Sat.StyleController = this.layoutControl1;
             this.txtAdja1Sat.TabIndex = 8;
             // 
@@ -214,14 +228,14 @@
             // 
             // txtAdja2Sat
             // 
-            this.txtAdja2Sat.Location = new System.Drawing.Point(12, 308);
+            this.txtAdja2Sat.Location = new System.Drawing.Point(332, 185);
             this.txtAdja2Sat.Name = "txtAdja2Sat";
             this.txtAdja2Sat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
             this.txtAdja2Sat.Properties.NullText = "";
             this.txtAdja2Sat.Properties.PopupSizeable = false;
             this.txtAdja2Sat.Properties.PopupView = this.gridView2;
-            this.txtAdja2Sat.Size = new System.Drawing.Size(410, 20);
+            this.txtAdja2Sat.Size = new System.Drawing.Size(157, 20);
             this.txtAdja2Sat.StyleController = this.layoutControl1;
             this.txtAdja2Sat.TabIndex = 9;
             // 
@@ -235,66 +249,90 @@
             // txtTaskType
             // 
             this.txtTaskType.EditValue = 0;
-            this.txtTaskType.Location = new System.Drawing.Point(12, 78);
+            this.txtTaskType.Location = new System.Drawing.Point(333, 37);
             this.txtTaskType.Name = "txtTaskType";
+            this.txtTaskType.Properties.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244)))));
+            this.txtTaskType.Properties.Appearance.Options.UseBackColor = true;
+            this.txtTaskType.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
             this.txtTaskType.Properties.Columns = 2;
-            this.txtTaskType.Size = new System.Drawing.Size(410, 27);
+            this.txtTaskType.Size = new System.Drawing.Size(156, 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, 472);
+            this.txtCapDir.Location = new System.Drawing.Point(12, 308);
             this.txtCapDir.Name = "txtCapDir";
             this.txtCapDir.Properties.AutoHeight = false;
-            this.txtCapDir.Size = new System.Drawing.Size(410, 20);
+            this.txtCapDir.Size = new System.Drawing.Size(236, 20);
             this.txtCapDir.StyleController = this.layoutControl1;
             this.txtCapDir.TabIndex = 4;
             // 
             // txtDoFreqUp
             // 
-            this.txtDoFreqUp.Location = new System.Drawing.Point(12, 554);
+            this.txtDoFreqUp.Location = new System.Drawing.Point(252, 267);
             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, 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);
+            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(237, 20);
             this.txtDoFreqUp.StyleController = this.layoutControl1;
             this.txtDoFreqUp.TabIndex = 10;
             this.txtDoFreqUp.ToolTip = "多个频点用逗号或分号隔开";
             // 
+            // txtSignalType
+            // 
+            this.txtSignalType.Location = new System.Drawing.Point(12, 226);
+            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(236, 20);
+            this.txtSignalType.StyleController = this.layoutControl1;
+            this.txtSignalType.TabIndex = 11;
+            this.txtSignalType.SelectedIndexChanged += new System.EventHandler(this.txtSignalType_SelectedIndexChanged);
+            // 
+            // txtCapDirFormat
+            // 
+            this.txtCapDirFormat.EditValue = "yyyyMMdd_HH";
+            this.txtCapDirFormat.Location = new System.Drawing.Point(252, 308);
+            this.txtCapDirFormat.Name = "txtCapDirFormat";
+            this.txtCapDirFormat.Properties.NullValuePrompt = "yyyyMMdd_HH";
+            this.txtCapDirFormat.Size = new System.Drawing.Size(237, 20);
+            this.txtCapDirFormat.StyleController = this.layoutControl1;
+            this.txtCapDirFormat.TabIndex = 13;
+            // 
             // Root
             // 
             this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
             this.Root.GroupBordersVisible = false;
             this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
-            this.layoutControlItem1,
             this.emptySpaceItem1,
             this.layoutControlItem2,
             this.layoutControlItem3,
             this.layoutControlItem4,
-            this.layoutControlItemAdja1,
-            this.layoutControlItemAdja2,
             this.itemFreqUp,
-            this.layoutControlItem5,
             this.itemCapDir,
-            this.itemDoFreqUp,
             this.layoutControlItem6,
+            this.itemCapDirFormat,
+            this.layoutControlItemAdja1,
+            this.layoutControlItemAdja2,
             this.itemDetectionWay,
-            this.itemCapDirFormat});
+            this.itemDoFreqUp,
+            this.layoutControlGroup1});
             this.Root.Name = "Root";
-            this.Root.Size = new System.Drawing.Size(434, 633);
+            this.Root.Size = new System.Drawing.Size(501, 388);
             this.Root.TextVisible = false;
             // 
             // layoutControlItem1
             // 
             this.layoutControlItem1.Control = this.txtTaskName;
             this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
-            this.layoutControlItem1.MaxSize = new System.Drawing.Size(0, 41);
-            this.layoutControlItem1.MinSize = new System.Drawing.Size(118, 41);
+            this.layoutControlItem1.MaxSize = new System.Drawing.Size(0, 56);
+            this.layoutControlItem1.MinSize = new System.Drawing.Size(118, 56);
             this.layoutControlItem1.Name = "layoutControlItem1";
-            this.layoutControlItem1.Size = new System.Drawing.Size(414, 41);
+            this.layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 7);
+            this.layoutControlItem1.Size = new System.Drawing.Size(321, 56);
             this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem1.Text = "任务名称";
             this.layoutControlItem1.TextLocation = DevExpress.Utils.Locations.Top;
@@ -303,20 +341,19 @@
             // emptySpaceItem1
             // 
             this.emptySpaceItem1.AllowHotTrack = false;
-            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 566);
+            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 320);
             this.emptySpaceItem1.Name = "emptySpaceItem1";
-            this.emptySpaceItem1.Size = new System.Drawing.Size(294, 47);
+            this.emptySpaceItem1.Size = new System.Drawing.Size(361, 48);
             this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
             // 
             // layoutControlItem2
             // 
             this.layoutControlItem2.Control = this.txtPosType;
-            this.layoutControlItem2.Location = new System.Drawing.Point(0, 97);
+            this.layoutControlItem2.Location = new System.Drawing.Point(0, 56);
             this.layoutControlItem2.MaxSize = new System.Drawing.Size(0, 100);
             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(414, 100);
+            this.layoutControlItem2.Size = new System.Drawing.Size(481, 100);
             this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem2.Text = "定位模式";
             this.layoutControlItem2.TextLocation = DevExpress.Utils.Locations.Top;
@@ -325,12 +362,12 @@
             // layoutControlItem3
             // 
             this.layoutControlItem3.Control = this.btnSave;
-            this.layoutControlItem3.Location = new System.Drawing.Point(294, 566);
+            this.layoutControlItem3.Location = new System.Drawing.Point(361, 320);
             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, 47);
+            this.layoutControlItem3.Size = new System.Drawing.Size(120, 48);
             this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem3.TextVisible = false;
@@ -338,165 +375,144 @@
             // layoutControlItem4
             // 
             this.layoutControlItem4.Control = this.txtMainSat;
-            this.layoutControlItem4.Location = new System.Drawing.Point(0, 197);
+            this.layoutControlItem4.Location = new System.Drawing.Point(0, 156);
             this.layoutControlItem4.Name = "layoutControlItem4";
-            this.layoutControlItem4.Size = new System.Drawing.Size(414, 41);
+            this.layoutControlItem4.Size = new System.Drawing.Size(160, 41);
             this.layoutControlItem4.Text = "主星";
             this.layoutControlItem4.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem4.TextSize = new System.Drawing.Size(72, 14);
             // 
-            // layoutControlItemAdja1
-            // 
-            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(414, 41);
-            this.layoutControlItemAdja1.Text = "邻星1";
-            this.layoutControlItemAdja1.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItemAdja1.TextSize = new System.Drawing.Size(72, 14);
-            this.layoutControlItemAdja1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
-            // 
-            // layoutControlItemAdja2
-            // 
-            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(414, 41);
-            this.layoutControlItemAdja2.Text = "邻星2";
-            this.layoutControlItemAdja2.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItemAdja2.TextSize = new System.Drawing.Size(72, 14);
-            this.layoutControlItemAdja2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
-            // 
             // itemFreqUp
             // 
             this.itemFreqUp.Control = this.txtFreq;
-            this.itemFreqUp.Location = new System.Drawing.Point(0, 402);
+            this.itemFreqUp.Location = new System.Drawing.Point(0, 238);
             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(414, 41);
+            this.itemFreqUp.Size = new System.Drawing.Size(240, 41);
             this.itemFreqUp.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.itemFreqUp.Text = "上行频点";
             this.itemFreqUp.TextLocation = DevExpress.Utils.Locations.Top;
             this.itemFreqUp.TextSize = new System.Drawing.Size(72, 14);
             // 
-            // layoutControlItem5
-            // 
-            this.layoutControlItem5.Control = this.txtTaskType;
-            this.layoutControlItem5.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem5.CustomizationFormText = "定位模式";
-            this.layoutControlItem5.Location = new System.Drawing.Point(0, 41);
-            this.layoutControlItem5.MaxSize = new System.Drawing.Size(0, 56);
-            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(414, 56);
-            this.layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.layoutControlItem5.Text = "任务类型";
-            this.layoutControlItem5.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem5.TextSize = new System.Drawing.Size(72, 14);
-            // 
             // itemCapDir
             // 
             this.itemCapDir.Control = this.txtCapDir;
             this.itemCapDir.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.itemCapDir.CustomizationFormText = "任务名称";
-            this.itemCapDir.Location = new System.Drawing.Point(0, 443);
+            this.itemCapDir.Location = new System.Drawing.Point(0, 279);
             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(414, 41);
+            this.itemCapDir.Size = new System.Drawing.Size(240, 41);
             this.itemCapDir.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.itemCapDir.Text = "采集文件目录";
             this.itemCapDir.TextLocation = DevExpress.Utils.Locations.Top;
             this.itemCapDir.TextSize = new System.Drawing.Size(72, 14);
             // 
-            // itemDoFreqUp
-            // 
-            this.itemDoFreqUp.Control = this.txtDoFreqUp;
-            this.itemDoFreqUp.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.itemDoFreqUp.CustomizationFormText = "上行频点";
-            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(414, 41);
-            this.itemDoFreqUp.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.itemDoFreqUp.Text = "处理上行频点";
-            this.itemDoFreqUp.TextLocation = DevExpress.Utils.Locations.Top;
-            this.itemDoFreqUp.TextSize = new System.Drawing.Size(72, 14);
-            // 
-            // dxErrorProvider
-            // 
-            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.Location = new System.Drawing.Point(0, 197);
             this.layoutControlItem6.Name = "layoutControlItem6";
-            this.layoutControlItem6.Size = new System.Drawing.Size(414, 41);
+            this.layoutControlItem6.Size = new System.Drawing.Size(240, 41);
             this.layoutControlItem6.Text = "信号类型";
             this.layoutControlItem6.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem6.TextSize = new System.Drawing.Size(72, 14);
             // 
-            // txtDetectionWay
+            // itemCapDirFormat
             // 
-            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);
+            this.itemCapDirFormat.Control = this.txtCapDirFormat;
+            this.itemCapDirFormat.Location = new System.Drawing.Point(240, 279);
+            this.itemCapDirFormat.Name = "itemCapDirFormat";
+            this.itemCapDirFormat.Size = new System.Drawing.Size(241, 41);
+            this.itemCapDirFormat.Text = "目录日期格式";
+            this.itemCapDirFormat.TextLocation = DevExpress.Utils.Locations.Top;
+            this.itemCapDirFormat.TextSize = new System.Drawing.Size(72, 14);
+            // 
+            // layoutControlItemAdja1
+            // 
+            this.layoutControlItemAdja1.Control = this.txtAdja1Sat;
+            this.layoutControlItemAdja1.Location = new System.Drawing.Point(160, 156);
+            this.layoutControlItemAdja1.Name = "layoutControlItemAdja1";
+            this.layoutControlItemAdja1.Size = new System.Drawing.Size(160, 41);
+            this.layoutControlItemAdja1.Text = "邻星1";
+            this.layoutControlItemAdja1.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItemAdja1.TextSize = new System.Drawing.Size(72, 14);
+            this.layoutControlItemAdja1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+            // 
+            // layoutControlItemAdja2
+            // 
+            this.layoutControlItemAdja2.Control = this.txtAdja2Sat;
+            this.layoutControlItemAdja2.Location = new System.Drawing.Point(320, 156);
+            this.layoutControlItemAdja2.Name = "layoutControlItemAdja2";
+            this.layoutControlItemAdja2.Size = new System.Drawing.Size(161, 41);
+            this.layoutControlItemAdja2.Text = "邻星2";
+            this.layoutControlItemAdja2.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItemAdja2.TextSize = new System.Drawing.Size(72, 14);
+            this.layoutControlItemAdja2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
             // 
             // itemDetectionWay
             // 
             this.itemDetectionWay.Control = this.txtDetectionWay;
-            this.itemDetectionWay.Location = new System.Drawing.Point(0, 361);
+            this.itemDetectionWay.Location = new System.Drawing.Point(240, 197);
             this.itemDetectionWay.Name = "itemDetectionWay";
-            this.itemDetectionWay.Size = new System.Drawing.Size(414, 41);
+            this.itemDetectionWay.Size = new System.Drawing.Size(241, 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
+            // itemDoFreqUp
             // 
-            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;
+            this.itemDoFreqUp.Control = this.txtDoFreqUp;
+            this.itemDoFreqUp.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
+            this.itemDoFreqUp.CustomizationFormText = "上行频点";
+            this.itemDoFreqUp.Location = new System.Drawing.Point(240, 238);
+            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(241, 41);
+            this.itemDoFreqUp.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.itemDoFreqUp.Text = "处理上行频点";
+            this.itemDoFreqUp.TextLocation = DevExpress.Utils.Locations.Top;
+            this.itemDoFreqUp.TextSize = new System.Drawing.Size(72, 14);
             // 
-            // itemCapDirFormat
+            // layoutControlItem5
             // 
-            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);
+            this.layoutControlItem5.Control = this.txtTaskType;
+            this.layoutControlItem5.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
+            this.layoutControlItem5.CustomizationFormText = "定位模式";
+            this.layoutControlItem5.Location = new System.Drawing.Point(321, 0);
+            this.layoutControlItem5.MaxSize = new System.Drawing.Size(160, 56);
+            this.layoutControlItem5.MinSize = new System.Drawing.Size(160, 56);
+            this.layoutControlItem5.Name = "layoutControlItem5";
+            this.layoutControlItem5.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 10, 2);
+            this.layoutControlItem5.Size = new System.Drawing.Size(160, 56);
+            this.layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.layoutControlItem5.Text = " ";
+            this.layoutControlItem5.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItem5.TextSize = new System.Drawing.Size(72, 14);
+            // 
+            // dxErrorProvider
+            // 
+            this.dxErrorProvider.ContainerControl = this;
+            // 
+            // layoutControlGroup1
+            // 
+            this.layoutControlGroup1.GroupBordersVisible = false;
+            this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
+            this.layoutControlItem1,
+            this.layoutControlItem5});
+            this.layoutControlGroup1.Location = new System.Drawing.Point(0, 0);
+            this.layoutControlGroup1.Name = "layoutControlGroup1";
+            this.layoutControlGroup1.Size = new System.Drawing.Size(481, 56);
             // 
             // TaskEditor
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(434, 633);
+            this.ClientSize = new System.Drawing.Size(501, 388);
             this.Controls.Add(this.layoutControl1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
             this.Name = "TaskEditor";
@@ -504,6 +520,7 @@
             this.Load += new System.EventHandler(this.TaskEditor_Load);
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
             this.layoutControl1.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.txtDetectionWay.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtTaskName.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtPosType.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtFreq.Properties)).EndInit();
@@ -516,25 +533,25 @@
             ((System.ComponentModel.ISupportInitialize)(this.txtTaskType.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtCapDir.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtDoFreqUp.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtSignalType.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtCapDirFormat.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAdja1)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAdja2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.itemFreqUp)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
             ((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();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAdja1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAdja2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.itemDetectionWay)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.itemDoFreqUp)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -574,5 +591,6 @@
         private DevExpress.XtraLayout.LayoutControlItem itemDetectionWay;
         private DevExpress.XtraEditors.TextEdit txtCapDirFormat;
         private DevExpress.XtraLayout.LayoutControlItem itemCapDirFormat;
+        private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
     }
 }

+ 42 - 38
XdCxRhDW.App/EditForms/TaskEditor.cs

@@ -53,11 +53,10 @@ namespace XdCxRhDW.App.EditForms
             this.txtTaskType_SelectedIndexChanged(this, EventArgs.Empty);
         }
 
-
         public TaskEditor(TaskInfo info)
            : this()
         {
-            this.Text = "编辑任务";
+            this.Text = $"编辑任务[{info.TaskName}]";
             this.info = info;
         }
 
@@ -82,20 +81,23 @@ namespace XdCxRhDW.App.EditForms
                     this.txtPosType.SelectedIndex = (int)info.PosType;
                     this.txtTaskType.SelectedIndex = (int)info.TaskType;
                     this.txtSignalType.EditValue = info.SigType;
-                    List<EnumDetectionWay> deWay = new List<EnumDetectionWay>();
-                    if (info.DetectionWay.Value.HasFlag(EnumDetectionWay.DAMA))
-                    {
-                        deWay.Add( EnumDetectionWay.DAMA);
-                    }
-                    if (info.DetectionWay.Value.HasFlag(EnumDetectionWay.IBS))
+                    if (info.DetectionWay != null)
                     {
-                        deWay.Add(EnumDetectionWay.IBS);
-                    }
-                    if (info.DetectionWay.Value.HasFlag(EnumDetectionWay.Ky5758))
-                    {
-                        deWay.Add(EnumDetectionWay.Ky5758);
+                        List<EnumDetectionWay> deWay = new List<EnumDetectionWay>();
+                        if (info.DetectionWay.Value.HasFlag(EnumDetectionWay.DAMA))
+                        {
+                            deWay.Add(EnumDetectionWay.DAMA);
+                        }
+                        if (info.DetectionWay.Value.HasFlag(EnumDetectionWay.IBS))
+                        {
+                            deWay.Add(EnumDetectionWay.IBS);
+                        }
+                        if (info.DetectionWay.Value.HasFlag(EnumDetectionWay.Ky5758))
+                        {
+                            deWay.Add(EnumDetectionWay.Ky5758);
+                        }
+                        this.txtDetectionWay.EditValue = string.Join(",", deWay);
                     }
-                    this.txtDetectionWay.EditValue =string.Join(",", deWay);
                     this.txtDetectionWay.RefreshEditValue();
                     this.txtMainSat.EditValue = satMain;
                     this.txtAdja1Sat.EditValue = satAdja1;
@@ -122,10 +124,10 @@ namespace XdCxRhDW.App.EditForms
                 {
                     dxErrorProvider.SetError(txtSignalType, "请选择信号类型");
                     return;
-                }                
+                }
                 if ((EnumSigType)txtSignalType.EditValue == EnumSigType.SX)
                 {
-                    if (txtDetectionWay.EditValue == null)
+                    if (string.IsNullOrWhiteSpace(txtDetectionWay.Text))
                     {
                         dxErrorProvider.SetError(txtDetectionWay, "请选择检测方式");
                         return;
@@ -251,11 +253,11 @@ namespace XdCxRhDW.App.EditForms
                     var res = txtDetectionWay.EditValue.ToString().Split(new string[] { "," }, System.StringSplitOptions.RemoveEmptyEntries).ToList();
                     if (res.Count() == 2)
                     {
-                        info.DetectionWay = (EnumDetectionWay)Enum.Parse(typeof(EnumDetectionWay), res[0])| (EnumDetectionWay)Enum.Parse(typeof(EnumDetectionWay), res[1]);
+                        info.DetectionWay = (EnumDetectionWay)Enum.Parse(typeof(EnumDetectionWay), res[0]) | (EnumDetectionWay)Enum.Parse(typeof(EnumDetectionWay), res[1]);
                     }
-                   else if (res.Count() == 3)
+                    else if (res.Count() == 3)
                     {
-                        info.DetectionWay = (EnumDetectionWay)Enum.Parse(typeof(EnumDetectionWay), res[0])| (EnumDetectionWay)Enum.Parse(typeof(EnumDetectionWay), res[1])| (EnumDetectionWay)Enum.Parse(typeof(EnumDetectionWay), res[2]);
+                        info.DetectionWay = (EnumDetectionWay)Enum.Parse(typeof(EnumDetectionWay), res[0]) | (EnumDetectionWay)Enum.Parse(typeof(EnumDetectionWay), res[1]) | (EnumDetectionWay)Enum.Parse(typeof(EnumDetectionWay), res[2]);
                     }
                     else
                     {
@@ -270,7 +272,7 @@ namespace XdCxRhDW.App.EditForms
                 info.TaskType = (EnumTaskType)txtTaskType.SelectedIndex;
                 if (info.TaskType == EnumTaskType.Real)
                 {
-                    info.Freq = (long)(Math.Round(Convert.ToDouble(txtFreq.EditValue),3) * 1e6);
+                    info.Freq = (long)(Math.Round(Convert.ToDouble(txtFreq.EditValue), 3) * 1e6);
                     info.CapDir = null;
                     info.CapDirFormat = null;
                     info.HistoryFrequpMHz = null;
@@ -279,7 +281,7 @@ namespace XdCxRhDW.App.EditForms
                 {
                     info.Freq = 0;
                     info.CapDir = txtCapDir.Text.Trim();
-                    info.CapDirFormat= txtCapDirFormat.Text.Trim(); 
+                    info.CapDirFormat = txtCapDirFormat.Text.Trim();
                     info.HistoryFrequpMHz = txtDoFreqUp.Text.Replace(",", ",").Replace(";", ",").Replace(";", ",").Trim();
                 }
                 this.DialogResult = DialogResult.OK;
@@ -295,7 +297,6 @@ namespace XdCxRhDW.App.EditForms
         {
             RadioGroup posTypeRadioGroup = sender as RadioGroup;
             var posType = (EnumPosType)posTypeRadioGroup.Properties.Items[posTypeRadioGroup.SelectedIndex].Value;
-            //var description = (EnumPosType)posType.Properties.Items[posType.SelectedIndex].Description;
             if (posType == EnumPosType.X1D1CX)
             {
                 layoutControlItemAdja1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
@@ -331,10 +332,7 @@ namespace XdCxRhDW.App.EditForms
                 layoutControlItemAdja2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
                 this.layoutControlItemAdja1.Text = "邻星";
             }
-            else
-            {
-                return;
-            }
+            this.layoutControl1.BestFit();
         }
 
         private void txtTaskType_SelectedIndexChanged(object sender, EventArgs e)
@@ -349,6 +347,7 @@ namespace XdCxRhDW.App.EditForms
                 itemCapDir.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
                 itemCapDirFormat.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
                 itemDoFreqUp.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+                this.Height -= 55;
             }
             else
             {
@@ -356,9 +355,11 @@ namespace XdCxRhDW.App.EditForms
                 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);
+                var normal = txtSignalType.Properties.Items.FirstOrDefault(f => f.Description.Contains("常规"));
+                //txtSignalType.Properties.Items.Remove(normal);//不要移除了
+                this.Height += 55;
             }
+            this.layoutControl1.BestFit();
         }
 
         private void txtSignalType_SelectedIndexChanged(object sender, EventArgs e)
@@ -366,19 +367,22 @@ namespace XdCxRhDW.App.EditForms
             if (txtSignalType.SelectedIndex == 0)
             {
                 itemDetectionWay.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
-                return;
             }
-            var selectedEnum = (EnumSigType)Enum.Parse(typeof(EnumSigType), txtSignalType.EditValue.ToString());
-            if (selectedEnum == EnumSigType.SX)
-            {
-                txtDetectionWay.Properties.Items.Clear();
-                txtDetectionWay.Properties.Items.AddEnum<EnumDetectionWay>();
-                itemDetectionWay.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
-            }
-            else 
+            else
             {
-                itemDetectionWay.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+                var selectedEnum = (EnumSigType)Enum.Parse(typeof(EnumSigType), txtSignalType.EditValue.ToString());
+                if (selectedEnum == EnumSigType.SX)
+                {
+                    txtDetectionWay.Properties.Items.Clear();
+                    txtDetectionWay.Properties.Items.AddEnum<EnumDetectionWay>();
+                    itemDetectionWay.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
+                }
+                else
+                {
+                    itemDetectionWay.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+                }
             }
+            this.layoutControl1.BestFit();
         }
     }
 }

+ 11 - 2
XdCxRhDW.App/ExtensionsDev/GridControlEx.cs

@@ -101,7 +101,7 @@ public static class GridControlEx
                 return $"{ctrl.Name}_{grid.Name}_{md5}";
         }
         string name = GetLayoutName();
-        grid.Load += (sender, e) =>
+        void SaveLayoutAction()
         {
             Form frm = null;
             if (searchLookUpEdit == null)
@@ -117,7 +117,16 @@ public static class GridControlEx
                     grid.MainView?.SaveLayoutToXml($"Layout\\{name}.xml", OptionsLayoutBase.FullLayout);
                 };
             }
-        };
+        }
+        if (grid.IsLoaded)
+        {
+            SaveLayoutAction();
+        }
+        else
+        {
+            grid.Load += (sender, e) => SaveLayoutAction();
+        }
+
         if (name != null && File.Exists($"Layout\\{name}.xml"))
         {
             view.RestoreLayoutFromXml($"Layout\\{name}.xml", OptionsLayoutBase.FullLayout);

+ 1 - 0
XdCxRhDW.App/Program.cs

@@ -13,6 +13,7 @@ using System.Security.Principal;
 using System.Threading;
 using System.Threading.Tasks;
 using System.Windows.Forms;
+using XdCxRhDW.Dto;
 
 namespace XdCxRhDW
 {

+ 3 - 4
XdCxRhDW.App/UserControl/CtrlHome.cs

@@ -45,7 +45,7 @@ namespace XdCxRhDW.App.UserControl
         public CtrlHome()
         {
             InitializeComponent();
-
+            layoutControl1.UseDefault();
         }
 
         private void PosSubEvent(PosRes posRes)
@@ -104,7 +104,6 @@ namespace XdCxRhDW.App.UserControl
                         DxHelper.MsgBoxHelper.ShowError("删除定位点异常!");
                     }
                 }, popupMenu2).DataSource = new List<PosRes>();
-            layoutControl1.UseDefault();
             txtStartTime.UseDefault();
             txtEndTime.UseDefault();
             btnDrawDto.ImageOptions.SvgImage = SvgHelper.LoadFromFile("Image\\DtoLine.svg");
@@ -738,7 +737,7 @@ namespace XdCxRhDW.App.UserControl
                             addItem.Adja2Sat = null;
                         }
                         var taskInfo = db.TaskInfos.Add(addItem);
-                        
+
                         await db.SaveChangesAsync();
                     }
                     list.Insert(0, addItem);
@@ -848,7 +847,7 @@ namespace XdCxRhDW.App.UserControl
                         var endTime = frm.end;
                         HistoryTaskProcessingDto dto = new HistoryTaskProcessingDto();
                         dto.ID = tsk.ID;
-                        dto.StartTime=startTime;
+                        dto.StartTime = startTime;
                         dto.EndTime = endTime;
                         dto.TaskName = tsk.TaskName;
                         dto.PosType = (EnumPosTypeDto)(int)tsk.PosType;

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

@@ -578,7 +578,6 @@ del BouncyCastle*.xml
 copy $(SolutionDir)tips.txt tips.txt
 copy $(SolutionDir)geo.txt geo.txt
 
-
 if not exist "AddIns" md AddIns
 move /Y *.dll AddIns
 move /Y *.pdb AddIns

+ 3 - 7
XdCxRhDW.Entity/ModelEnum.cs

@@ -146,15 +146,11 @@ namespace XdCxRhDW.Entity
         /// </summary>
         [Display(Name = "常规信号")]
         Normal,
-        ///// <summary>
-        ///// DAMA信号
-        ///// </summary>
-        //[Display(Name = "DAMA信号")]
-        //DAMA,
+
         /// <summary>
-        /// 时隙信号
+        /// 突发信号
         /// </summary>
-        [Display(Name = "时隙信号")]
+        [Display(Name = "突发信号")]
         SX,
     }
 

+ 2 - 1
XdCxRhDW.Repostory/XlRepository.cs

@@ -45,7 +45,8 @@ namespace XdCxRhDW.Repostory
             {
                 using (RHDWContext db = new RHDWContext())
                 {
-                    var res= await db.XlInfos.Where(p => p.SatCode == satCode).OrderBy(p => (p.TimeBJ - timeBj).Duration()).FirstOrDefaultAsync();
+                  var res= await db.XlInfos.SqlQuery($"SELECT min(abs(JULIANDAY(timebj)-JULIANDAY('{timeBj:yyyy-MM-dd HH:mm:ss}')))" +
+                        " as NearDaySpan,* FROM XlInfo where satcode=23467").FirstOrDefaultAsync();
                     return res;
                 }
             }

+ 32 - 2
XdCxRhDW.TaskServer/Controllers/HistoryTaskProcessingController.cs

@@ -4,6 +4,7 @@ using System.Configuration;
 using System.IO;
 using System.Web.Http;
 using XdCxRhDW.Dto;
+using XdCxRhDW.TaskServer.Service;
 using XdCxRhDW.TaskServer.Task;
 using XdCxRhDW.WebApi;
 
@@ -14,8 +15,19 @@ namespace XdCxRhDW.TaskServer.Controllers
     /// </summary>
     public class HistoryTaskProcessingController : BaseController
     {
-
+        /*******************
+         * !!!不要在Controller中放业务逻辑的全局变量
+         * !!!不要在Controller写太复杂的业务逻辑
+         * Controller主要就是调用Service层的东西。Service层执行业务逻辑和调用Repository层操作数据库
+         * ********************/
         public List<HistoryTaskI> allTask = new List<HistoryTaskI>();
+        private readonly TestService _testService;
+        public HistoryTaskProcessingController(TestService testService)
+        {
+            _testService = testService;
+        }
+
+
         /// <summary>
         /// 执行离线任务
         /// </summary>
@@ -26,11 +38,20 @@ namespace XdCxRhDW.TaskServer.Controllers
         {
             try
             {
+                //方式1:从构造函数注入
+                var service1 = _testService;
+
+                //方式2:从容器中主动获取
+                var service2 = AutofacUtil.GetService<TestService>();
+
+
+                //选一种简单的方式就行
+
                 LogHelper.Info($"接收到历史任务编号:{dto.ID}");
                 dto.StartTime = new DateTime(2024, 03, 24, 12, 00, 00);
                 dto.DateDirFormat = "yyyyMMddHH";
                 dto.CapDir = @"D:\\data";
-                dto.SigType = EnumSigTypeDto.DAMA;
+                dto.SigType = EnumSigTypeDto.SX;
                 dto.PosType = EnumPosTypeDto.X2D1;
                 dto.DmcType = DmcTypeDto.DAMA;
                 if (!Directory.Exists(dto.CapDir))
@@ -70,6 +91,15 @@ namespace XdCxRhDW.TaskServer.Controllers
         {
             try
             {
+                //方式1:从构造函数注入
+                var service1 = _testService;
+
+                //方式2:从容器中主动获取
+                var service2 = AutofacUtil.GetService<TestService>();
+
+
+                //选一种简单的方式就行
+
                 LogHelper.Info($"接收停止历史任务编号:{TaskId}");
                 var history = allTask.Find(t => t.TaskDto.ID == TaskId);
                 if (history != null)

+ 12 - 0
XdCxRhDW.TaskServer/Service/TestService.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace XdCxRhDW.TaskServer.Service
+{
+    public class TestService
+    {
+    }
+}

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

@@ -158,6 +158,7 @@
     <Compile Include="MainForm.Designer.cs">
       <DependentUpon>MainForm.cs</DependentUpon>
     </Compile>
+    <Compile Include="Service\TestService.cs" />
     <Compile Include="Task\HistoryFile.cs" />
     <Compile Include="Task\HistoryTaskI.cs" />
     <Compile Include="Task\TxInfo.cs" />

+ 2 - 3
XdCxRhDW.WebApi/05.XdCxRhDW.WebApi.csproj

@@ -171,6 +171,7 @@
     </Reference>
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="AutofacUtil.cs" />
     <Compile Include="BaseController.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Startup.cs" />
@@ -182,9 +183,7 @@
     <None Include="app.config" />
     <None Include="packages.config" />
   </ItemGroup>
-  <ItemGroup>
-    <Folder Include="Service\" />
-  </ItemGroup>
+  <ItemGroup />
   <ItemGroup>
     <ProjectReference Include="..\XdCxRhDW.Framework\01.XdCxRhDW.Framework.csproj">
       <Project>{cd41cedf-e0b8-41cc-867b-3b57f476b450}</Project>

+ 19 - 0
XdCxRhDW.WebApi/AutofacUtil.cs

@@ -0,0 +1,19 @@
+using Autofac;
+
+public class AutofacUtil
+{
+    /// <summary>
+    /// Autofac依赖注入静态服务
+    /// </summary>
+    public static ILifetimeScope Container {private get; set; }
+
+    /// <summary>
+    /// 获取服务(Single)
+    /// </summary>
+    /// <typeparam name="T">接口类型</typeparam>         
+    /// <returns></returns>
+    public static T GetService<T>() where T : class
+    {
+        return Container.Resolve<T>();
+    }
+}

+ 16 - 10
XdCxRhDW.WebApi/Startup.cs

@@ -61,7 +61,7 @@ namespace XdCxRhDW.WebApi
         /// <param name="port"></param>
         /// <param name="controllerXmlName">controller所在程序集xml文件名称</param>
         /// <param name="dtoXmlName">dto所在程序集xml文件名称</param>
-        public static void Start(int port,string controllerXmlName,string dtoXmlName)
+        public static void Start(int port, string controllerXmlName, string dtoXmlName)
         {
             //不要删除这句代码,VS引用优化检测到没有使用Microsoft.Owin.Host.HttpListener.dll则可能不会将此dll复制到本地导致http服务启动失败
             Console.WriteLine(typeof(Microsoft.Owin.Host.HttpListener.OwinHttpListener));
@@ -145,24 +145,26 @@ namespace XdCxRhDW.WebApi
             config.MapHttpAttributeRoutes();
 
             var builder = new ContainerBuilder();
-            builder.RegisterApiControllers(Assembly.GetExecutingAssembly());
-
-            //将程序集中的所有Service注入到容器
-            var serviceTypes = Assembly.GetExecutingAssembly().GetTypes().Where(p => p.Namespace != null && p.Namespace.EndsWith(".Service")).ToList();
+            var controllerAssemblys = AppDomain.CurrentDomain.GetAssemblies().Where(p =>
+                p.GetTypes().Any(t => t.BaseType == typeof(BaseController))).ToArray();
+            builder.RegisterApiControllers(controllerAssemblys);
+            
+            var serviceTypes = AppDomain.CurrentDomain.GetAssemblies().SelectMany(p => p.GetTypes())
+                .Where(p => p.Namespace != null && p.Namespace.EndsWith(".Service")).ToList();
             foreach (var serviceType in serviceTypes)
             {
                 //单例模式注入Service
-                builder.RegisterTypes(serviceType).SingleInstance();
+                builder.RegisterType(serviceType).SingleInstance();
             }
             var container = builder.Build();
             config.DependencyResolver = new AutofacWebApiDependencyResolver(container);
+            GlobalConfiguration.Configuration.DependencyResolver = config.DependencyResolver;
+            AutofacUtil.Container = container;
 
-            app.UseAutofacLifetimeScopeInjector(container);
+            //app.UseAutofacLifetimeScopeInjector(container);
             app.UseAutofacMiddleware(container);
             app.UseAutofacWebApi(config);
-
             app.UseCors(CorsOptions.AllowAll);
-
             app.UseWebApi(config);
         }
 
@@ -185,7 +187,7 @@ namespace XdCxRhDW.WebApi
                  c.IncludeXmlComments(webApiXmlPath3);//返回值描述
 
                  //控制器本身描述
-                 string controllerXmlPath= $"{AppDomain.CurrentDomain.BaseDirectory}{Path.GetFileNameWithoutExtension(_controllerXmlName)}.xml";
+                 string controllerXmlPath = $"{AppDomain.CurrentDomain.BaseDirectory}{Path.GetFileNameWithoutExtension(_controllerXmlName)}.xml";
                  c.CustomProvider(defaultProvider => new SwaggerControllerDescProvider(defaultProvider, controllerXmlPath));
                  c.OperationFilter<FileUploadOperation>();
                  c.SchemaFilter<SwaggerEnumFilter>();
@@ -500,6 +502,10 @@ namespace XdCxRhDW.WebApi
                 var value = field.GetValue(null);
                 list.Add($"{description}={(int)value}");
             }
+            if (enumType.GetCustomAttribute<FlagsAttribute>() != null)//支持按位与的枚举
+            {
+                list.Add("(多个类型请将对应数字相加)");
+            }
             return string.Join(",", list);
         }
     }

+ 20 - 2
XdCxRhDw.Dto/DetectDto.cs

@@ -12,7 +12,7 @@ namespace XdCxRhDW.Dto
     /// <summary>
     /// 检测计算模型
     /// </summary>
-    public class DetectDto
+    public class DetectDto : IValidatableObject
     {
         /// <summary>
         /// 调用Upload接口上传文件后返回的文件名
@@ -23,7 +23,6 @@ namespace XdCxRhDW.Dto
         /// <summary>
         /// 检测类型
         /// </summary>
-        [RangeInt(1, 4, IncludeMin = true)]
         public DmcType dmcType { get; set; }
 
         /// <summary>
@@ -37,6 +36,25 @@ namespace XdCxRhDW.Dto
         /// </summary>
         [RangeDouble(0, 100)]
         public double? band { get; set; } = 25;
+
+        public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
+        {
+            var fields = typeof(DmcType).GetFields().Where(p => p.FieldType.IsEnum);
+            bool hasError = true;
+            foreach (var field in fields)
+            {
+                var value = field.GetValue(null);
+                if (this.dmcType.HasFlag((Enum)value))
+                {
+                    hasError = false;
+                    break;
+                }
+            }
+            if (hasError)
+                yield return new ValidationResult("检测类型错误", new[] { nameof(this.dmcType) });
+            else
+                yield return null;
+        }
     }
     /// <summary>
     /// 检测类型

+ 3 - 7
XdCxRhDw.Dto/EnumPosResTypeDto.cs

@@ -155,15 +155,11 @@ namespace XdCxRhDW.Dto
         /// </summary>
         [Display(Name = "常规信号")]
         Normal,
+
         /// <summary>
-        /// DAMA信号
-        /// </summary>
-        [Display(Name = "DAMA信号")]
-        DAMA,
-        /// <summary>
-        /// 时隙信号
+        /// 突发信号
         /// </summary>
-        [Display(Name = "时隙信号")]
+        [Display(Name = "突发信号")]
         SX,
     }
     /// <summary>