gongqiuhong há 1 ano atrás
pai
commit
430f92e163

+ 12 - 12
XdCxRhDW.App/Controllers/PosController.cs

@@ -95,7 +95,7 @@ namespace XdCxRhDW.App.Controllers
                     MainX = dto.MainX,
                     MainY = dto.MainY,
                     MainZ = dto.MainZ,
-                    TarFreqUp = dto.FreqUp == null ? runTask.Freq : dto.FreqUp,
+                    TarFreqUp = dto.FreqUp,
                     TarFreqDown = dto.FreqDown,
                 });
 
@@ -215,7 +215,7 @@ namespace XdCxRhDW.App.Controllers
                     MainVx = ephMain.data.VX,
                     MainVy = ephMain.data.VY,
                     MainVz = ephMain.data.VZ,
-                    TarFreqUp = dto.FreqUp == null ? runTask.Freq : dto.FreqUp,
+                    TarFreqUp = dto.FreqUp,
                     TarFreqDown = dto.FreqDown,
                 });
 
@@ -331,7 +331,7 @@ namespace XdCxRhDW.App.Controllers
                     Adja1Vx = dto.AdjaVX,
                     Adja1Vy = dto.AdjaVY,
                     Adja1Vz = dto.AdjaVZ,
-                    TarFreqUp = dto.FreqUp == null ? runTask.Freq : dto.FreqUp,
+                    TarFreqUp = dto.FreqUp,
                     TarFreqDown = dto.FreqDown,
                 });
 
@@ -471,7 +471,7 @@ namespace XdCxRhDW.App.Controllers
                     Adja1X = ephAdja.data.X,
                     Adja1Y = ephAdja.data.Y,
                     Adja1Z = ephAdja.data.Z,
-                    TarFreqUp = dto.FreqUp == null ? runTask.Freq : dto.FreqUp,
+                    TarFreqUp = dto.FreqUp,
                     TarFreqDown = dto.FreqDown,
                 });
 
@@ -577,7 +577,7 @@ namespace XdCxRhDW.App.Controllers
                     Adja1Vx = dto.AdjaVX,
                     Adja1Vy = dto.AdjaVY,
                     Adja1Vz = dto.AdjaVZ,
-                    TarFreqUp = dto.FreqUp == null ? runTask.Freq : dto.FreqUp,
+                    TarFreqUp = dto.FreqUp,
                     TarFreqDown = dto.FreqDown,
                 });
                 var res = PosApi.X2D1_PosNoRef(cgRes, StationRes);
@@ -712,7 +712,7 @@ namespace XdCxRhDW.App.Controllers
                     Adja1Vx = ephAdja.data.VX,
                     Adja1Vy = ephAdja.data.VY,
                     Adja1Vz = ephAdja.data.VZ,
-                    TarFreqUp = dto.FreqUp == null ? runTask.Freq : dto.FreqUp,
+                    TarFreqUp = dto.FreqUp,
                     TarFreqDown = dto.FreqDown,
                 });
 
@@ -820,7 +820,7 @@ namespace XdCxRhDW.App.Controllers
                     Adja1X = dto.AdjaX,
                     Adja1Y = dto.AdjaY,
                     Adja1Z = dto.AdjaZ,
-                    TarFreqUp = dto.FreqUp == null ? runTask.Freq : dto.FreqUp,
+                    TarFreqUp = dto.FreqUp,
                     TarFreqDown = dto.FreqDown,
                 });
 
@@ -969,7 +969,7 @@ namespace XdCxRhDW.App.Controllers
                     Adja1Vx = ephAdja.data.VX,
                     Adja1Vy = ephAdja.data.VY,
                     Adja1Vz = ephAdja.data.VZ,
-                    TarFreqUp = dto.FreqUp == null ? runTask.Freq : dto.FreqUp,
+                    TarFreqUp = dto.FreqUp,
                     TarFreqDown = dto.FreqDown,
                 });
                 var cxRes = db.CxRes.Add(new CxRes()
@@ -1092,7 +1092,7 @@ namespace XdCxRhDW.App.Controllers
                     Adja2Vx = dto.Adja2VX,
                     Adja2Vy = dto.Adja2VY,
                     Adja2Vz = dto.Adja2VZ,
-                    TarFreqUp = dto.FreqUp == null ? runTask.Freq : dto.FreqUp,
+                    TarFreqUp = dto.FreqUp,
                     TarFreqDown = dto.FreqDown,
                 });
 
@@ -1253,7 +1253,7 @@ namespace XdCxRhDW.App.Controllers
                     Adja2Vx = ephAdja2.data.VX,
                     Adja2Vy = ephAdja2.data.VY,
                     Adja2Vz = ephAdja2.data.VZ,
-                    TarFreqUp = dto.FreqUp == null ? runTask.Freq : dto.FreqUp,
+                    TarFreqUp = dto.FreqUp,
                     TarFreqDown = dto.FreqDown,
                 });
 
@@ -1364,7 +1364,7 @@ namespace XdCxRhDW.App.Controllers
                     Adja2Vx = dto.Adja2VX,
                     Adja2Vy = dto.Adja2VY,
                     Adja2Vz = dto.Adja2VZ,
-                    TarFreqUp = dto.FreqUp == null ? runTask.Freq : dto.FreqUp,
+                    TarFreqUp = dto.FreqUp,
                     TarFreqDown = dto.FreqDown,
                 });
 
@@ -1519,7 +1519,7 @@ namespace XdCxRhDW.App.Controllers
                     Adja2Vx = ephAdja2.data.VX,
                     Adja2Vy = ephAdja2.data.VY,
                     Adja2Vz = ephAdja2.data.VZ,
-                    TarFreqUp = dto.FreqUp == null ? runTask.Freq : dto.FreqUp,
+                    TarFreqUp = dto.FreqUp,
                     TarFreqDown = dto.FreqDown,
                 });
 

+ 2 - 0
XdCxRhDW.App/EditForms/PosTimeEditor.cs

@@ -1,4 +1,5 @@
 using DevExpress.XtraEditors;
+using DevExpress.XtraEditors.DXErrorProvider;
 using ExtensionsDev;
 using System;
 using System.Collections.Generic;
@@ -55,6 +56,7 @@ namespace XdCxRhDW.App.EditForms
         }
         private void btnOk_Click(object sender, EventArgs e)
         {
+            dxErrorProvider1.ClearErrors();
             if (this.txtStartTime.DateTime == DateTime.MinValue)
             {
                 DxHelper.MsgBoxHelper.ShowWarning("开始时间不能为空!");

+ 45 - 45
XdCxRhDW.App/EditForms/SigEditor.Designer.cs

@@ -45,7 +45,7 @@
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject11 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject12 = new DevExpress.Utils.SerializableAppearanceObject();
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
-            this.txtSigType = new DevExpress.XtraEditors.CheckedComboBoxEdit();
+            this.txtSigType = new DevExpress.XtraEditors.CheckedListBoxControl();
             this.btnOk = new DevExpress.XtraEditors.SimpleButton();
             this.btnCancel = new DevExpress.XtraEditors.SimpleButton();
             this.txtSnr = new DevExpress.XtraEditors.ButtonEdit();
@@ -57,11 +57,11 @@
             this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
             this.dxErrorProvider = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components);
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.txtSigType.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtSigType)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtSnr.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtFreqDown.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtFreqUp.Properties)).BeginInit();
@@ -71,7 +71,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
             this.SuspendLayout();
             // 
@@ -88,26 +88,27 @@
             this.layoutControl1.Name = "layoutControl1";
             this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(831, 101, 650, 400);
             this.layoutControl1.Root = this.Root;
-            this.layoutControl1.Size = new System.Drawing.Size(239, 297);
+            this.layoutControl1.Size = new System.Drawing.Size(249, 325);
             this.layoutControl1.TabIndex = 0;
             this.layoutControl1.Text = "layoutControl1";
             // 
             // txtSigType
             // 
             this.txtSigType.Location = new System.Drawing.Point(22, 157);
+            this.txtSigType.MultiColumn = true;
             this.txtSigType.Name = "txtSigType";
-            this.txtSigType.Properties.AutoHeight = false;
-            this.txtSigType.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
-            this.txtSigType.Size = new System.Drawing.Size(195, 23);
+            this.txtSigType.ShowFocusRect = true;
+            this.txtSigType.Size = new System.Drawing.Size(205, 55);
             this.txtSigType.StyleController = this.layoutControl1;
-            this.txtSigType.TabIndex = 3;
+            this.txtSigType.TabIndex = 11;
+            this.txtSigType.ItemCheck += new DevExpress.XtraEditors.Controls.ItemCheckEventHandler(this.txtSigType_ItemCheck_1);
+            this.txtSigType.SelectedIndexChanged += new System.EventHandler(this.txtSigType_SelectedIndexChanged);
             // 
             // btnOk
             // 
-            this.btnOk.Location = new System.Drawing.Point(121, 248);
+            this.btnOk.Location = new System.Drawing.Point(126, 280);
             this.btnOk.Name = "btnOk";
-            this.btnOk.Size = new System.Drawing.Size(96, 23);
+            this.btnOk.Size = new System.Drawing.Size(101, 23);
             this.btnOk.StyleController = this.layoutControl1;
             this.btnOk.TabIndex = 10;
             this.btnOk.Text = "确定";
@@ -115,9 +116,9 @@
             // 
             // btnCancel
             // 
-            this.btnCancel.Location = new System.Drawing.Point(22, 248);
+            this.btnCancel.Location = new System.Drawing.Point(22, 280);
             this.btnCancel.Name = "btnCancel";
-            this.btnCancel.Size = new System.Drawing.Size(95, 23);
+            this.btnCancel.Size = new System.Drawing.Size(100, 23);
             this.btnCancel.StyleController = this.layoutControl1;
             this.btnCancel.TabIndex = 9;
             this.btnCancel.Text = "取消";
@@ -125,14 +126,14 @@
             // 
             // txtSnr
             // 
-            this.txtSnr.Location = new System.Drawing.Point(22, 211);
+            this.txtSnr.Location = new System.Drawing.Point(22, 243);
             this.txtSnr.Name = "txtSnr";
             this.txtSnr.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True;
             this.txtSnr.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "dB", -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.txtSnr.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.txtSnr.Properties.MaskSettings.Set("mask", "f3");
-            this.txtSnr.Size = new System.Drawing.Size(195, 23);
+            this.txtSnr.Size = new System.Drawing.Size(205, 23);
             this.txtSnr.StyleController = this.layoutControl1;
             this.txtSnr.TabIndex = 4;
             // 
@@ -145,7 +146,7 @@
             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.txtFreqDown.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.txtFreqDown.Properties.MaskSettings.Set("mask", "f3");
-            this.txtFreqDown.Size = new System.Drawing.Size(195, 23);
+            this.txtFreqDown.Size = new System.Drawing.Size(205, 23);
             this.txtFreqDown.StyleController = this.layoutControl1;
             this.txtFreqDown.TabIndex = 2;
             // 
@@ -158,7 +159,7 @@
             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.txtFreqUp.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.txtFreqUp.Properties.MaskSettings.Set("mask", "f3");
-            this.txtFreqUp.Size = new System.Drawing.Size(195, 23);
+            this.txtFreqUp.Size = new System.Drawing.Size(205, 23);
             this.txtFreqUp.StyleController = this.layoutControl1;
             this.txtFreqUp.TabIndex = 0;
             // 
@@ -172,10 +173,10 @@
             this.layoutControlItem4,
             this.layoutControlItem5,
             this.layoutControlItem6,
-            this.layoutControlItem7});
+            this.layoutControlItem1});
             this.Root.Name = "Root";
             this.Root.Padding = new DevExpress.XtraLayout.Utils.Padding(20, 20, 20, 20);
-            this.Root.Size = new System.Drawing.Size(239, 297);
+            this.Root.Size = new System.Drawing.Size(249, 325);
             this.Root.TextVisible = false;
             // 
             // layoutControlItem2
@@ -186,7 +187,7 @@
             this.layoutControlItem2.MinSize = new System.Drawing.Size(54, 54);
             this.layoutControlItem2.Name = "layoutControlItem2";
             this.layoutControlItem2.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.layoutControlItem2.Size = new System.Drawing.Size(199, 54);
+            this.layoutControlItem2.Size = new System.Drawing.Size(209, 54);
             this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem2.Text = "上行频点";
             this.layoutControlItem2.TextLocation = DevExpress.Utils.Locations.Top;
@@ -195,12 +196,12 @@
             // layoutControlItem3
             // 
             this.layoutControlItem3.Control = this.txtSnr;
-            this.layoutControlItem3.Location = new System.Drawing.Point(0, 162);
+            this.layoutControlItem3.Location = new System.Drawing.Point(0, 194);
             this.layoutControlItem3.MaxSize = new System.Drawing.Size(0, 54);
             this.layoutControlItem3.MinSize = new System.Drawing.Size(54, 54);
             this.layoutControlItem3.Name = "layoutControlItem3";
             this.layoutControlItem3.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.layoutControlItem3.Size = new System.Drawing.Size(199, 54);
+            this.layoutControlItem3.Size = new System.Drawing.Size(209, 54);
             this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem3.Text = "门限";
             this.layoutControlItem3.TextLocation = DevExpress.Utils.Locations.Top;
@@ -209,12 +210,12 @@
             // layoutControlItem4
             // 
             this.layoutControlItem4.Control = this.btnCancel;
-            this.layoutControlItem4.Location = new System.Drawing.Point(0, 216);
+            this.layoutControlItem4.Location = new System.Drawing.Point(0, 248);
             this.layoutControlItem4.MaxSize = new System.Drawing.Size(0, 37);
             this.layoutControlItem4.MinSize = new System.Drawing.Size(35, 37);
             this.layoutControlItem4.Name = "layoutControlItem4";
             this.layoutControlItem4.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.layoutControlItem4.Size = new System.Drawing.Size(99, 41);
+            this.layoutControlItem4.Size = new System.Drawing.Size(104, 37);
             this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem4.TextVisible = false;
@@ -222,12 +223,12 @@
             // layoutControlItem5
             // 
             this.layoutControlItem5.Control = this.btnOk;
-            this.layoutControlItem5.Location = new System.Drawing.Point(99, 216);
+            this.layoutControlItem5.Location = new System.Drawing.Point(104, 248);
             this.layoutControlItem5.MaxSize = new System.Drawing.Size(0, 37);
             this.layoutControlItem5.MinSize = new System.Drawing.Size(35, 37);
             this.layoutControlItem5.Name = "layoutControlItem5";
             this.layoutControlItem5.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.layoutControlItem5.Size = new System.Drawing.Size(100, 41);
+            this.layoutControlItem5.Size = new System.Drawing.Size(105, 37);
             this.layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem5.TextVisible = false;
@@ -242,25 +243,24 @@
             this.layoutControlItem6.MinSize = new System.Drawing.Size(64, 54);
             this.layoutControlItem6.Name = "layoutControlItem6";
             this.layoutControlItem6.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.layoutControlItem6.Size = new System.Drawing.Size(199, 54);
+            this.layoutControlItem6.Size = new System.Drawing.Size(209, 54);
             this.layoutControlItem6.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem6.Text = "下行频点";
             this.layoutControlItem6.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem6.TextSize = new System.Drawing.Size(48, 14);
             // 
-            // layoutControlItem7
+            // layoutControlItem1
             // 
-            this.layoutControlItem7.Control = this.txtSigType;
-            this.layoutControlItem7.Location = new System.Drawing.Point(0, 108);
-            this.layoutControlItem7.MaxSize = new System.Drawing.Size(0, 54);
-            this.layoutControlItem7.MinSize = new System.Drawing.Size(54, 54);
-            this.layoutControlItem7.Name = "layoutControlItem7";
-            this.layoutControlItem7.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
-            this.layoutControlItem7.Size = new System.Drawing.Size(199, 54);
-            this.layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.layoutControlItem7.Text = "信号类型";
-            this.layoutControlItem7.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem7.TextSize = new System.Drawing.Size(48, 14);
+            this.layoutControlItem1.Control = this.txtSigType;
+            this.layoutControlItem1.Location = new System.Drawing.Point(0, 108);
+            this.layoutControlItem1.MinSize = new System.Drawing.Size(54, 21);
+            this.layoutControlItem1.Name = "layoutControlItem1";
+            this.layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
+            this.layoutControlItem1.Size = new System.Drawing.Size(209, 86);
+            this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.layoutControlItem1.Text = "信号类型";
+            this.layoutControlItem1.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItem1.TextSize = new System.Drawing.Size(48, 14);
             // 
             // dxErrorProvider
             // 
@@ -270,7 +270,7 @@
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(239, 297);
+            this.ClientSize = new System.Drawing.Size(249, 325);
             this.Controls.Add(this.layoutControl1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
             this.Name = "SigEditor";
@@ -278,7 +278,7 @@
             this.Load += new System.EventHandler(this.SatEditor_Load);
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
             this.layoutControl1.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.txtSigType.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtSigType)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtSnr.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtFreqDown.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtFreqUp.Properties)).EndInit();
@@ -288,7 +288,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
             this.ResumeLayout(false);
 
@@ -308,9 +308,9 @@
         private DevExpress.XtraEditors.ButtonEdit txtFreqDown;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
         private DevExpress.XtraEditors.ButtonEdit txtFreqUp;
-        private DevExpress.XtraEditors.CheckedComboBoxEdit txtSigType;
-        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
         private DevExpress.XtraGrid.GridControl gridControl1;
         private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider;
+        private DevExpress.XtraEditors.CheckedListBoxControl txtSigType;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
     }
 }

+ 34 - 17
XdCxRhDW.App/EditForms/SigEditor.cs

@@ -36,9 +36,8 @@ namespace XdCxRhDW.App.EditForms
         }
         private void SatEditor_Load(object sender, EventArgs e)
         {
-           
-            txtSigType.Properties.Items.Clear();
-            txtSigType.Properties.Items.AddEnum<EnumSigCheckType>();
+
+            txtSigType.AddEnum<EnumSigCheckType>();
             if (this.Text == "编辑信号" && info != null)
             {
                 this.txtFreqUp.EditValue = info.FreqUp;
@@ -58,7 +57,7 @@ namespace XdCxRhDW.App.EditForms
                 //    deWay.Add(EnumSigCheckType.Ky5758);
                 //}
                 //this.txtSigType.EditValue = string.Join(",", deWay);
-                this.txtSigType.EditValue = info.SigType.ToString();
+                //this.txtSigType.EditValue = info.SigType.ToString();
             }
         }
 
@@ -70,6 +69,7 @@ namespace XdCxRhDW.App.EditForms
         {
             try
             {
+                dxErrorProvider.ClearErrors();
                 if (txtFreqUp.EditValue == null)
                 {
                     dxErrorProvider.SetError(txtFreqUp, "请输入上行频点");
@@ -80,7 +80,7 @@ namespace XdCxRhDW.App.EditForms
                     dxErrorProvider.SetError(txtFreqDown, "请输入下行频点");
                     return;
                 }
-                if (string.IsNullOrEmpty(txtSigType.EditValue.ToString()))
+                if (!txtSigType.Items.Any(p => p.CheckState == CheckState.Checked))
                 {
                     dxErrorProvider.SetError(txtSigType, "请选择信号类型");
                     return;
@@ -93,20 +93,13 @@ namespace XdCxRhDW.App.EditForms
                 info.FreqUp = Convert.ToDouble(txtFreqUp.EditValue);
                 info.FreqDown = Convert.ToDouble(txtFreqDown.EditValue);
                 info.Snr = Convert.ToDouble(txtSnr.EditValue);
-                var res = txtSigType.EditValue.ToString().Split(new string[] { "," }, System.StringSplitOptions.RemoveEmptyEntries).ToList();
-                if (res.Count() == 2)
-                {
-                    info.SigType = (EnumSigCheckType)Enum.Parse(typeof(EnumSigCheckType), res[0]) | (EnumSigCheckType)Enum.Parse(typeof(EnumSigCheckType), res[1]);
-                }
-                else if (res.Count() == 3)
-                {
-                    info.SigType = (EnumSigCheckType)Enum.Parse(typeof(EnumSigCheckType), res[0]) | (EnumSigCheckType)Enum.Parse(typeof(EnumSigCheckType), res[1]) | (EnumSigCheckType)Enum.Parse(typeof(EnumSigCheckType), res[2]);
-                }
-                else
+                var res = txtSigType.Items.Where(p => p.CheckState == CheckState.Checked).Select(t => (EnumSigCheckType)t.Value).ToList();
+                EnumSigCheckType sigType = res.First();
+                for (int i = 1; i < res.Count; i++)
                 {
-                    info.SigType = (EnumSigCheckType)Enum.Parse(typeof(EnumSigCheckType), res[0]);
+                    sigType |= res[i];
                 }
-
+                info.SigType = sigType;
                 this.DialogResult = DialogResult.OK;
             }
             catch (Exception ex)
@@ -115,5 +108,29 @@ namespace XdCxRhDW.App.EditForms
                 DxHelper.MsgBoxHelper.ShowError("编辑信号信息出错");
             }
         }
+
+        private void txtSigType_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            var idx = txtSigType.SelectedIndex;
+            txtSigType.Items[idx].InvertCheckState();
+        }
+
+        private void txtSigType_ItemCheck_1(object sender, DevExpress.XtraEditors.Controls.ItemCheckEventArgs e)
+        {
+            if (e.State == CheckState.Checked)
+            {
+                if (e.Index < 3)
+                {
+                    txtSigType.Items[EnumSigCheckType.Normal].CheckState = CheckState.Unchecked;
+                }
+                else
+                {
+
+                    txtSigType.Items[EnumSigCheckType.DAMA].CheckState = CheckState.Unchecked;
+                    txtSigType.Items[EnumSigCheckType.IBS].CheckState = CheckState.Unchecked;
+                    txtSigType.Items[EnumSigCheckType.Ky5758].CheckState = CheckState.Unchecked;
+                }
+            }
+        }
     }
 }

+ 46 - 157
XdCxRhDW.App/EditForms/TaskEditor.Designer.cs

@@ -29,22 +29,10 @@
         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();
             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();
-            this.txtFreq = new DevExpress.XtraEditors.ButtonEdit();
             this.txtMainSat = new DevExpress.XtraEditors.SearchLookUpEdit();
             this.searchLookUpEdit1View = new DevExpress.XtraGrid.Views.Grid.GridView();
             this.txtAdja1Sat = new DevExpress.XtraEditors.SearchLookUpEdit();
@@ -53,32 +41,26 @@
             this.gridView2 = new DevExpress.XtraGrid.Views.Grid.GridView();
             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.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
             this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.itemFreqUp = new DevExpress.XtraLayout.LayoutControlItem();
             this.itemCapDir = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
             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.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
             this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
             this.dxErrorProvider = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components);
+            this.btnFreq = new DevExpress.XtraEditors.SimpleButton();
+            this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
             ((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();
             ((System.ComponentModel.ISupportInitialize)(this.txtMainSat.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtAdja1Sat.Properties)).BeginInit();
@@ -87,65 +69,47 @@
             ((System.ComponentModel.ISupportInitialize)(this.gridView2)).BeginInit();
             ((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.emptySpaceItem1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.itemFreqUp)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.itemCapDir)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).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.layoutControlGroup1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
             // 
-            this.layoutControl1.Controls.Add(this.txtDetectionWay);
+            this.layoutControl1.Controls.Add(this.btnFreq);
             this.layoutControl1.Controls.Add(this.btnSave);
             this.layoutControl1.Controls.Add(this.txtTaskName);
             this.layoutControl1.Controls.Add(this.txtPosType);
-            this.layoutControl1.Controls.Add(this.txtFreq);
             this.layoutControl1.Controls.Add(this.txtMainSat);
             this.layoutControl1.Controls.Add(this.txtAdja1Sat);
             this.layoutControl1.Controls.Add(this.txtAdja2Sat);
             this.layoutControl1.Controls.Add(this.txtTaskType);
             this.layoutControl1.Controls.Add(this.txtCapDir);
-            this.layoutControl1.Controls.Add(this.txtDoFreqUp);
-            this.layoutControl1.Controls.Add(this.txtSignalType);
             this.layoutControl1.Controls.Add(this.txtCapDirFormat);
             this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.layoutControl1.Location = new System.Drawing.Point(0, 0);
             this.layoutControl1.Name = "layoutControl1";
             this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(784, 215, 650, 400);
             this.layoutControl1.Root = this.Root;
-            this.layoutControl1.Size = new System.Drawing.Size(501, 388);
+            this.layoutControl1.Size = new System.Drawing.Size(501, 313);
             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(373, 342);
+            this.btnSave.Location = new System.Drawing.Point(373, 260);
             this.btnSave.Name = "btnSave";
             this.btnSave.Size = new System.Drawing.Size(116, 26);
             this.btnSave.StyleController = this.layoutControl1;
@@ -175,17 +139,6 @@
             this.txtPosType.TabIndex = 5;
             this.txtPosType.EditValueChanged += new System.EventHandler(this.txtPosType_EditValueChanged);
             // 
-            // txtFreq
-            // 
-            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(236, 20);
-            this.txtFreq.StyleController = this.layoutControl1;
-            this.txtFreq.TabIndex = 10;
-            // 
             // txtMainSat
             // 
             this.txtMainSat.Location = new System.Drawing.Point(12, 185);
@@ -262,41 +215,17 @@
             // 
             // txtCapDir
             // 
-            this.txtCapDir.Location = new System.Drawing.Point(12, 308);
+            this.txtCapDir.Location = new System.Drawing.Point(12, 226);
             this.txtCapDir.Name = "txtCapDir";
             this.txtCapDir.Properties.AutoHeight = false;
             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(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.Properties.NullValuePrompt = "不填则处理全部频点";
-            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 = "yyyy_MM_dd_HH";
-            this.txtCapDirFormat.Location = new System.Drawing.Point(252, 308);
+            this.txtCapDirFormat.Location = new System.Drawing.Point(252, 226);
             this.txtCapDirFormat.Name = "txtCapDirFormat";
             this.txtCapDirFormat.Size = new System.Drawing.Size(237, 20);
             this.txtCapDirFormat.StyleController = this.layoutControl1;
@@ -312,25 +241,22 @@
             this.layoutControlItem2,
             this.layoutControlItem3,
             this.layoutControlItem4,
-            this.itemFreqUp,
             this.itemCapDir,
-            this.layoutControlItem6,
             this.itemCapDirFormat,
             this.layoutControlItemAdja1,
             this.layoutControlItemAdja2,
-            this.itemDetectionWay,
-            this.itemDoFreqUp,
-            this.layoutControlGroup1});
+            this.layoutControlGroup1,
+            this.layoutControlItem7});
             this.Root.Name = "Root";
-            this.Root.Size = new System.Drawing.Size(501, 388);
+            this.Root.Size = new System.Drawing.Size(501, 313);
             this.Root.TextVisible = false;
             // 
             // emptySpaceItem1
             // 
             this.emptySpaceItem1.AllowHotTrack = false;
-            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 320);
+            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 238);
             this.emptySpaceItem1.Name = "emptySpaceItem1";
-            this.emptySpaceItem1.Size = new System.Drawing.Size(361, 48);
+            this.emptySpaceItem1.Size = new System.Drawing.Size(231, 55);
             this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
             // 
             // layoutControlItem2
@@ -349,12 +275,12 @@
             // layoutControlItem3
             // 
             this.layoutControlItem3.Control = this.btnSave;
-            this.layoutControlItem3.Location = new System.Drawing.Point(361, 320);
+            this.layoutControlItem3.Location = new System.Drawing.Point(361, 238);
             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, 48);
+            this.layoutControlItem3.Size = new System.Drawing.Size(120, 55);
             this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem3.TextVisible = false;
@@ -369,25 +295,12 @@
             this.layoutControlItem4.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem4.TextSize = new System.Drawing.Size(84, 14);
             // 
-            // itemFreqUp
-            // 
-            this.itemFreqUp.Control = this.txtFreq;
-            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(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(84, 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, 279);
+            this.itemCapDir.Location = new System.Drawing.Point(0, 197);
             this.itemCapDir.MaxSize = new System.Drawing.Size(0, 41);
             this.itemCapDir.MinSize = new System.Drawing.Size(118, 41);
             this.itemCapDir.Name = "itemCapDir";
@@ -397,20 +310,10 @@
             this.itemCapDir.TextLocation = DevExpress.Utils.Locations.Top;
             this.itemCapDir.TextSize = new System.Drawing.Size(84, 14);
             // 
-            // layoutControlItem6
-            // 
-            this.layoutControlItem6.Control = this.txtSignalType;
-            this.layoutControlItem6.Location = new System.Drawing.Point(0, 197);
-            this.layoutControlItem6.Name = "layoutControlItem6";
-            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(84, 14);
-            // 
             // itemCapDirFormat
             // 
             this.itemCapDirFormat.Control = this.txtCapDirFormat;
-            this.itemCapDirFormat.Location = new System.Drawing.Point(240, 279);
+            this.itemCapDirFormat.Location = new System.Drawing.Point(240, 197);
             this.itemCapDirFormat.Name = "itemCapDirFormat";
             this.itemCapDirFormat.Size = new System.Drawing.Size(241, 41);
             this.itemCapDirFormat.Text = "子目录日期格式";
@@ -439,32 +342,6 @@
             this.layoutControlItemAdja2.TextSize = new System.Drawing.Size(84, 14);
             this.layoutControlItemAdja2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
             // 
-            // itemDetectionWay
-            // 
-            this.itemDetectionWay.Control = this.txtDetectionWay;
-            this.itemDetectionWay.Location = new System.Drawing.Point(240, 197);
-            this.itemDetectionWay.Name = "itemDetectionWay";
-            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(84, 14);
-            this.itemDetectionWay.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
-            // 
-            // itemDoFreqUp
-            // 
-            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(84, 14);
-            // 
             // layoutControlGroup1
             // 
             this.layoutControlGroup1.GroupBordersVisible = false;
@@ -509,11 +386,36 @@
             // 
             this.dxErrorProvider.ContainerControl = this;
             // 
+            // btnFreq
+            // 
+            this.btnFreq.Location = new System.Drawing.Point(243, 260);
+            this.btnFreq.MaximumSize = new System.Drawing.Size(0, 26);
+            this.btnFreq.MinimumSize = new System.Drawing.Size(0, 26);
+            this.btnFreq.Name = "btnFreq";
+            this.btnFreq.Size = new System.Drawing.Size(126, 26);
+            this.btnFreq.StyleController = this.layoutControl1;
+            this.btnFreq.TabIndex = 14;
+            this.btnFreq.Text = "编辑频点";
+            this.btnFreq.Click += new System.EventHandler(this.btnFreq_Click);
+            // 
+            // layoutControlItem7
+            // 
+            this.layoutControlItem7.Control = this.btnFreq;
+            this.layoutControlItem7.Location = new System.Drawing.Point(231, 238);
+            this.layoutControlItem7.MaxSize = new System.Drawing.Size(130, 48);
+            this.layoutControlItem7.MinSize = new System.Drawing.Size(130, 48);
+            this.layoutControlItem7.Name = "layoutControlItem7";
+            this.layoutControlItem7.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
+            this.layoutControlItem7.Size = new System.Drawing.Size(130, 55);
+            this.layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem7.TextVisible = false;
+            // 
             // TaskEditor
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(501, 388);
+            this.ClientSize = new System.Drawing.Size(501, 313);
             this.Controls.Add(this.layoutControl1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
             this.Name = "TaskEditor";
@@ -521,10 +423,8 @@
             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();
             ((System.ComponentModel.ISupportInitialize)(this.txtMainSat.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtAdja1Sat.Properties)).EndInit();
@@ -533,26 +433,21 @@
             ((System.ComponentModel.ISupportInitialize)(this.gridView2)).EndInit();
             ((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.emptySpaceItem1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.itemFreqUp)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.itemCapDir)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).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.layoutControlGroup1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -568,11 +463,9 @@
         private DevExpress.XtraEditors.RadioGroup txtPosType;
         private DevExpress.XtraEditors.SimpleButton btnSave;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
-        private DevExpress.XtraEditors.ButtonEdit txtFreq;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItemAdja1;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItemAdja2;
-        private DevExpress.XtraLayout.LayoutControlItem itemFreqUp;
         private DevExpress.XtraEditors.SearchLookUpEdit txtMainSat;
         private DevExpress.XtraGrid.Views.Grid.GridView searchLookUpEdit1View;
         private DevExpress.XtraEditors.SearchLookUpEdit txtAdja1Sat;
@@ -584,14 +477,10 @@
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
         private DevExpress.XtraEditors.TextEdit txtCapDir;
         private DevExpress.XtraLayout.LayoutControlItem itemCapDir;
-        private DevExpress.XtraEditors.ButtonEdit txtDoFreqUp;
-        private DevExpress.XtraLayout.LayoutControlItem itemDoFreqUp;
-        private DevExpress.XtraEditors.ImageComboBoxEdit txtSignalType;
-        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
-        private DevExpress.XtraEditors.CheckedComboBoxEdit txtDetectionWay;
-        private DevExpress.XtraLayout.LayoutControlItem itemDetectionWay;
         private DevExpress.XtraEditors.TextEdit txtCapDirFormat;
         private DevExpress.XtraLayout.LayoutControlItem itemCapDirFormat;
         private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
+        private DevExpress.XtraEditors.SimpleButton btnFreq;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
     }
 }

+ 23 - 123
XdCxRhDW.App/EditForms/TaskEditor.cs

@@ -2,6 +2,7 @@
 using DevExpress.Utils.Extensions;
 using DevExpress.XtraBars.Customization;
 using DevExpress.XtraEditors;
+using DevExpress.XtraEditors.ButtonsPanelControl;
 using DevExpress.XtraEditors.Controls;
 using DevExpress.XtraEditors.DXErrorProvider;
 using DevExpress.XtraPrinting.Native;
@@ -31,10 +32,11 @@ namespace XdCxRhDW.App.EditForms
     public partial class TaskEditor : DevExpress.XtraEditors.XtraForm
     {
         public TaskInfo info;
+        public List<SigInfo> selectedItem=new List<SigInfo>();
         public TaskEditor()
         {
             InitializeComponent();
-            this.layoutControl1.UseDefault();
+            //this.layoutControl1.UseDefault();
             this.Text = "添加任务";
             info = new TaskInfo();
             this.StartPosition = FormStartPosition.CenterParent;
@@ -53,11 +55,12 @@ namespace XdCxRhDW.App.EditForms
             this.txtTaskType_SelectedIndexChanged(this, EventArgs.Empty);
         }
 
-        public TaskEditor(TaskInfo info)
+        public TaskEditor(TaskInfo info,List<SigInfo> taskSigList)
            : this()
         {
             this.Text = $"编辑任务[{info.TaskName}]";
             this.info = info;
+            this.selectedItem = taskSigList;
         }
 
         private async void TaskEditor_Load(object sender, EventArgs e)
@@ -80,32 +83,11 @@ namespace XdCxRhDW.App.EditForms
                     this.txtTaskName.Text = info.TaskName;
                     this.txtPosType.SelectedIndex = (int)info.PosType;
                     this.txtTaskType.SelectedIndex = (int)info.TaskType;
-                    this.txtSignalType.EditValue = info.SigType;
-                    if (info.DetectionWay != null)
-                    {
-                        List<EnumTaskCheckType> deWay = new List<EnumTaskCheckType>();
-                        if (info.DetectionWay.Value.HasFlag(EnumTaskCheckType.DAMA))
-                        {
-                            deWay.Add(EnumTaskCheckType.DAMA);
-                        }
-                        if (info.DetectionWay.Value.HasFlag(EnumTaskCheckType.IBS))
-                        {
-                            deWay.Add(EnumTaskCheckType.IBS);
-                        }
-                        if (info.DetectionWay.Value.HasFlag(EnumTaskCheckType.Ky5758))
-                        {
-                            deWay.Add(EnumTaskCheckType.Ky5758);
-                        }
-                        this.txtDetectionWay.EditValue = string.Join(",", deWay);
-                    }
-                    this.txtDetectionWay.RefreshEditValue();
                     this.txtMainSat.EditValue = satMain;
                     this.txtAdja1Sat.EditValue = satAdja1;
                     this.txtAdja2Sat.EditValue = satAdja2;
-                    this.txtFreq.EditValue = info.Freq * (decimal)1e-6;
                     txtCapDir.Text = info.CapDir;
                     txtCapDirFormat.Text = info.CapDirFormat;
-                    txtDoFreqUp.Text = info.HistoryFrequpMHz;
                 }
             }
         }
@@ -121,28 +103,7 @@ namespace XdCxRhDW.App.EditForms
                     dxErrorProvider.SetError(txtTaskName, "请填写任务名");
                     return;
                 }
-                if (txtSignalType.EditValue == null)
-                {
-                    dxErrorProvider.SetError(txtSignalType, "请选择信号类型");
-                    return;
-                }
-                if ((EnumSigType)txtSignalType.EditValue == EnumSigType.SX)
-                {
-
-                    if (string.IsNullOrWhiteSpace(txtDetectionWay.Text))
-                    {
-                        dxErrorProvider.SetError(txtDetectionWay, "请选择检测方式");
-                        return;
-                    }
-                }
-                else
-                {
-                    if (posType == EnumPosType.RH || posType == EnumPosType.X2D1 || posType == EnumPosType.X1D1CX)
-                    {
-                        dxErrorProvider.SetError(txtSignalType, posType.GetEnumDisplayName() + "不支持常规信号");
-                        return;
-                    }
-                }
+               
                 if (this.Text == "添加任务")
                 {
                     using (RHDWContext db = new RHDWContext())
@@ -225,38 +186,13 @@ namespace XdCxRhDW.App.EditForms
                     }
 
                 }
-                if (txtTaskType.SelectedIndex == 0)
-                {
-                    if (txtFreq.EditValue == null)
-                    {
-                        dxErrorProvider.SetError(txtFreq, "请填写频点");
-                        return;
-                    }
-                }
-                else
+                if (txtTaskType.SelectedIndex != 0)
                 {
                     if (string.IsNullOrWhiteSpace(txtCapDir.Text))
                     {
                         dxErrorProvider.SetError(txtCapDir, "请填写采集文件目录");
                         return;
                     }
-                    try
-                    {
-                        var str = txtDoFreqUp.Text.Replace(",", ",").Replace(";", ",").Replace(";", ",").Trim();
-                        var freqs = str.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
-                        List<double> list = new List<double>();
-                        foreach (var item in freqs)
-                        {
-                            double.TryParse(item, out double freqUpMHz);
-                            list.Add(freqUpMHz);
-                        }
-                        txtDoFreqUp.Text = string.Join(",", list.Select(p => p.ToString("f3")));
-                    }
-                    catch
-                    {
-                        dxErrorProvider.SetError(txtDoFreqUp, "处理频点格式错误!");
-                        return;
-                    }
                 }
                 info.TaskState = EnumTaskState.Stopped;
                 info.TaskName = txtTaskName.Text;
@@ -266,42 +202,16 @@ namespace XdCxRhDW.App.EditForms
                     info.Adja1Sat = ((SatInfo)txtAdja1Sat.EditValue).SatCode;
                 if (txtAdja2Sat.EditValue != null)
                     info.Adja2Sat = ((SatInfo)txtAdja2Sat.EditValue).SatCode;
-                info.SigType = (EnumSigType)txtSignalType.EditValue;
-                if (info.SigType == EnumSigType.SX)
-                {
-                    var res = txtDetectionWay.EditValue.ToString().Split(new string[] { "," }, System.StringSplitOptions.RemoveEmptyEntries).ToList();
-                    if (res.Count() == 2)
-                    {
-                        info.DetectionWay = (EnumTaskCheckType)Enum.Parse(typeof(EnumTaskCheckType), res[0]) | (EnumTaskCheckType)Enum.Parse(typeof(EnumTaskCheckType), res[1]);
-                    }
-                    else if (res.Count() == 3)
-                    {
-                        info.DetectionWay = (EnumTaskCheckType)Enum.Parse(typeof(EnumTaskCheckType), res[0]) | (EnumTaskCheckType)Enum.Parse(typeof(EnumTaskCheckType), res[1]) | (EnumTaskCheckType)Enum.Parse(typeof(EnumTaskCheckType), res[2]);
-                    }
-                    else
-                    {
-                        info.DetectionWay = (EnumTaskCheckType)Enum.Parse(typeof(EnumTaskCheckType), res[0]);
-                    }
-                }
-                else
-                {
-                    info.DetectionWay = null;
-                }
-                //string strResult = info.DetectionWay.ToString() + " " + ((int)info.DetectionWay);
                 info.TaskType = (EnumTaskType)txtTaskType.SelectedIndex;
                 if (info.TaskType == EnumTaskType.Real)
                 {
-                    info.Freq = (long)(Math.Round(Convert.ToDouble(txtFreq.EditValue), 3) * 1e6);
                     info.CapDir = null;
                     info.CapDirFormat = null;
-                    info.HistoryFrequpMHz = null;
                 }
                 else
                 {
-                    info.Freq = 0;
                     info.CapDir = txtCapDir.Text.Trim();
                     info.CapDirFormat = txtCapDirFormat.Text.Trim();
-                    info.HistoryFrequpMHz = txtDoFreqUp.Text.Replace(",", ",").Replace(";", ",").Replace(";", ",").Trim();
                 }
                 this.DialogResult = DialogResult.OK;
             }
@@ -356,52 +266,42 @@ namespace XdCxRhDW.App.EditForms
 
         private void txtTaskType_SelectedIndexChanged(object sender, EventArgs e)
         {
-            //加载信号类型
-            txtSignalType.Properties.Items.Clear();
-            txtSignalType.Properties.Items.Add(new ImageComboBoxItem("请选择", null, -1));
-            txtSignalType.Properties.Items.AddEnum<EnumSigType>();
             if (txtTaskType.SelectedIndex == 0)
             {
-                itemFreqUp.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
+               
                 itemCapDir.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
                 itemCapDirFormat.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
-                itemDoFreqUp.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
                 this.Height -= 55;
             }
             else
             {
-                itemFreqUp.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
                 itemCapDir.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
                 itemCapDirFormat.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
-                itemDoFreqUp.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
-                var normal = txtSignalType.Properties.Items.FirstOrDefault(f => f.Description.Contains("常规"));
                 //txtSignalType.Properties.Items.Remove(normal);//不要移除了
                 this.Height += 55;
             }
             this.layoutControl1.BestFit();
         }
 
-        private void txtSignalType_SelectedIndexChanged(object sender, EventArgs e)
+
+        private void btnFreq_Click(object sender, EventArgs e)
         {
-            if (txtSignalType.SelectedIndex == 0)
+            
+            if (this.Text.StartsWith("添加任务"))
             {
-                itemDetectionWay.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+                TaskEditorSignal frm = new TaskEditorSignal();
+                if (frm.ShowDialog() != DialogResult.OK) return;
+                frm.info = info;
+                selectedItem.Clear();
+                selectedItem = frm.listSigInfoSelected;
             }
-            else
+            else if (this.Text.StartsWith("编辑任务") && info != null)
             {
-                var selectedEnum = (EnumSigType)Enum.Parse(typeof(EnumSigType), txtSignalType.EditValue.ToString());
-                if (selectedEnum == EnumSigType.SX)
-                {
-                    txtDetectionWay.Properties.Items.Clear();
-                    txtDetectionWay.Properties.Items.AddEnum<EnumTaskCheckType>();
-                    itemDetectionWay.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
-                }
-                else
-                {
-                    itemDetectionWay.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
-                }
+                TaskEditorSignal frm = new TaskEditorSignal(info, selectedItem);
+                if (frm.ShowDialog() != DialogResult.OK) return;
+                selectedItem.Clear();
+                selectedItem = frm.listSigInfoSelected;
+            }
             }
-            this.layoutControl1.BestFit();
-        }
     }
 }

+ 193 - 0
XdCxRhDW.App/EditForms/TaskEditorSignal.Designer.cs

@@ -0,0 +1,193 @@
+namespace XdCxRhDW.App.EditForms
+{
+    partial class TaskEditorSignal
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            this.dxErrorProvider = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components);
+            this.gridTaskSignal = new DevExpress.XtraGrid.GridControl();
+            this.gridViewTaskSignal = new DevExpress.XtraGrid.Views.Grid.GridView();
+            this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
+            this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
+            this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.btnOk = new DevExpress.XtraEditors.SimpleButton();
+            this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.btnCancle = new DevExpress.XtraEditors.SimpleButton();
+            this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridTaskSignal)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridViewTaskSignal)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
+            this.layoutControl1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // dxErrorProvider
+            // 
+            this.dxErrorProvider.ContainerControl = this;
+            // 
+            // gridTaskSignal
+            // 
+            this.gridTaskSignal.Location = new System.Drawing.Point(12, 12);
+            this.gridTaskSignal.MainView = this.gridViewTaskSignal;
+            this.gridTaskSignal.Name = "gridTaskSignal";
+            this.gridTaskSignal.Size = new System.Drawing.Size(477, 338);
+            this.gridTaskSignal.TabIndex = 0;
+            this.gridTaskSignal.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
+            this.gridViewTaskSignal});
+            // 
+            // gridViewTaskSignal
+            // 
+            this.gridViewTaskSignal.GridControl = this.gridTaskSignal;
+            this.gridViewTaskSignal.Name = "gridViewTaskSignal";
+            this.gridViewTaskSignal.SelectionChanged += new DevExpress.Data.SelectionChangedEventHandler(this.gridViewTaskSignal_SelectionChanged);
+            // 
+            // layoutControl1
+            // 
+            this.layoutControl1.Controls.Add(this.btnCancle);
+            this.layoutControl1.Controls.Add(this.btnOk);
+            this.layoutControl1.Controls.Add(this.gridTaskSignal);
+            this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.layoutControl1.Location = new System.Drawing.Point(0, 0);
+            this.layoutControl1.Name = "layoutControl1";
+            this.layoutControl1.Root = this.Root;
+            this.layoutControl1.Size = new System.Drawing.Size(501, 388);
+            this.layoutControl1.TabIndex = 1;
+            this.layoutControl1.Text = "layoutControl1";
+            // 
+            // Root
+            // 
+            this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
+            this.Root.GroupBordersVisible = false;
+            this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
+            this.layoutControlItem1,
+            this.layoutControlItem2,
+            this.layoutControlItem3,
+            this.emptySpaceItem1});
+            this.Root.Name = "Root";
+            this.Root.Size = new System.Drawing.Size(501, 388);
+            this.Root.TextVisible = false;
+            // 
+            // layoutControlItem1
+            // 
+            this.layoutControlItem1.Control = this.gridTaskSignal;
+            this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
+            this.layoutControlItem1.Name = "layoutControlItem1";
+            this.layoutControlItem1.Size = new System.Drawing.Size(481, 342);
+            this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem1.TextVisible = false;
+            // 
+            // btnOk
+            // 
+            this.btnOk.Location = new System.Drawing.Point(404, 354);
+            this.btnOk.Name = "btnOk";
+            this.btnOk.Size = new System.Drawing.Size(85, 22);
+            this.btnOk.StyleController = this.layoutControl1;
+            this.btnOk.TabIndex = 4;
+            this.btnOk.Text = "确定";
+            this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
+            // 
+            // layoutControlItem2
+            // 
+            this.layoutControlItem2.Control = this.btnOk;
+            this.layoutControlItem2.Location = new System.Drawing.Point(392, 342);
+            this.layoutControlItem2.Name = "layoutControlItem2";
+            this.layoutControlItem2.Size = new System.Drawing.Size(89, 26);
+            this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem2.TextVisible = false;
+            // 
+            // btnCancle
+            // 
+            this.btnCancle.Location = new System.Drawing.Point(316, 354);
+            this.btnCancle.Name = "btnCancle";
+            this.btnCancle.Size = new System.Drawing.Size(84, 22);
+            this.btnCancle.StyleController = this.layoutControl1;
+            this.btnCancle.TabIndex = 5;
+            this.btnCancle.Text = "取消";
+            this.btnCancle.Click += new System.EventHandler(this.btnCancle_Click);
+            // 
+            // layoutControlItem3
+            // 
+            this.layoutControlItem3.Control = this.btnCancle;
+            this.layoutControlItem3.Location = new System.Drawing.Point(304, 342);
+            this.layoutControlItem3.Name = "layoutControlItem3";
+            this.layoutControlItem3.Size = new System.Drawing.Size(88, 26);
+            this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem3.TextVisible = false;
+            // 
+            // emptySpaceItem1
+            // 
+            this.emptySpaceItem1.AllowHotTrack = false;
+            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 342);
+            this.emptySpaceItem1.Name = "emptySpaceItem1";
+            this.emptySpaceItem1.Size = new System.Drawing.Size(304, 26);
+            this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
+            // 
+            // TaskEditorSignal
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(501, 388);
+            this.Controls.Add(this.layoutControl1);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+            this.Name = "TaskEditorSignal";
+            this.Text = "TaskEditorSignal";
+            this.Load += new System.EventHandler(this.TaskEditorSignal_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridTaskSignal)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridViewTaskSignal)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
+            this.layoutControl1.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+        private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider;
+        private DevExpress.XtraGrid.GridControl gridTaskSignal;
+        private DevExpress.XtraGrid.Views.Grid.GridView gridViewTaskSignal;
+        private DevExpress.XtraLayout.LayoutControl layoutControl1;
+        private DevExpress.XtraLayout.LayoutControlGroup Root;
+        private DevExpress.XtraEditors.SimpleButton btnCancle;
+        private DevExpress.XtraEditors.SimpleButton btnOk;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
+        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
+    }
+}

+ 125 - 0
XdCxRhDW.App/EditForms/TaskEditorSignal.cs

@@ -0,0 +1,125 @@
+using DevExpress.Utils.About;
+using DevExpress.Utils.Extensions;
+using DevExpress.XtraBars.Customization;
+using DevExpress.XtraEditors;
+using DevExpress.XtraEditors.Controls;
+using DevExpress.XtraEditors.DXErrorProvider;
+using DevExpress.XtraGrid;
+using DevExpress.XtraPrinting.Native;
+using DPP_YH_Core.Extensions;
+using DxHelper;
+using ExtensionsDev;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.Data;
+using System.Data.Entity;
+using System.Drawing;
+using System.Linq;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Documents;
+using System.Windows.Forms;
+using XdCxRhDW.Dto;
+using XdCxRhDW.Entity;
+using XdCxRhDW.Repostory;
+
+namespace XdCxRhDW.App.EditForms
+{
+    public partial class TaskEditorSignal : DevExpress.XtraEditors.XtraForm
+    {
+        public TaskInfo info;
+        public List<SigInfo> listSigInfo = new List<SigInfo>();
+        public List<SigInfo> listSigInfoSelected = new List<SigInfo>();
+        public TaskEditorSignal()
+        {
+            InitializeComponent();
+            this.Text = "添加任务频点";
+            info = new TaskInfo();
+            this.StartPosition = FormStartPosition.CenterParent;
+
+        }
+        public TaskEditorSignal(TaskInfo info, List<SigInfo> listSigInfoSelected)
+           : this()
+        {
+            this.Text = $"编辑任务[{info.TaskName}]频点";
+            this.info = info;
+            this.listSigInfoSelected = listSigInfoSelected.Skip(0).ToList();
+
+        }
+
+        private async void TaskEditorSignal_Load(object sender, EventArgs e)
+        {
+            try
+            {
+                gridTaskSignal.UseDefault(listSigInfo).UseMultiSelect().UseRowNumber().DrawGridColumnHeaderCheckBox();
+                using (var db = new RHDWContext())
+                {
+                    var items = await db.SigInfos.ToListAsync();
+                    listSigInfo.AddRange(items);
+                    if (this.Text.StartsWith("编辑"))
+                    {
+                        for (int i = 0; i < listSigInfo.Count; i++)
+                        {
+                            for (int j = 0; j < this.listSigInfoSelected.Count; j++)
+                            {
+                                if (listSigInfo[i].ID == this.listSigInfoSelected[j].ID)
+                                {
+                                    this.gridViewTaskSignal.SelectRow(i);
+                                }
+                            }
+                        }                      
+                        //for (int i = 0; i < listSigInfo.Count; i++)
+                        //{
+                        //    gridViewTaskSignal.SetRowCellValue(i, gridViewTaskSignal.Columns[0], true);
+                        //}
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                Serilog.Log.Error(ex, "查询信号信息异常");
+                DxHelper.MsgBoxHelper.ShowError("查询信号信息异常");
+            }
+        }
+
+        private void gridViewTaskSignal_SelectionChanged(object sender, DevExpress.Data.SelectionChangedEventArgs e)
+        {
+            //var selectedRows = gridViewTaskSignal.GetSelectedRows();
+            //listSigInfoSelected.Clear();
+            //for (int i = 0; i < selectedRows.Count(); i++)
+            //{
+            //    //var signalValue = gridViewTaskSignal.GetRowCellValue(selectedRows[i], nameof(FileResEntity.Signal));
+            //    var res = gridViewTaskSignal.GetRow(selectedRows[i]) as SigInfo;
+            //    listSigInfoSelected.Add(res);
+            //}
+            //gridViewTaskSignal.ClearSelection();//全不选
+            //gridViewTaskSignal.SelectAll();//全选
+        }
+
+        private void btnCancle_Click(object sender, EventArgs e)
+        {
+            this.DialogResult = DialogResult.Cancel;
+        }
+
+        private void btnOk_Click(object sender, EventArgs e)
+        {
+            var selectedRows = gridViewTaskSignal.GetSelectedRows();
+            // List <SigInfo> ress= new List <SigInfo>();
+            listSigInfoSelected.Clear();
+            for (int i = 0; i < selectedRows.Count(); i++)
+            {
+                //var signalValue = gridViewTaskSignal.GetRowCellValue(selectedRows[i], nameof(FileResEntity.Signal));
+                var res = gridViewTaskSignal.GetRow(selectedRows[i]) as SigInfo;
+                listSigInfoSelected.Add(res);
+            }
+            //listSigInfoSelected.Clear();
+            //listSigInfoSelected.AddRange(ress);
+            this.DialogResult = DialogResult.OK;
+        }
+
+    }
+}

+ 126 - 0
XdCxRhDW.App/EditForms/TaskEditorSignal.resx

@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="dxErrorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>40</value>
+  </metadata>
+</root>

+ 1 - 0
XdCxRhDW.App/ExtensionsDev/DateEditExtension.cs

@@ -16,6 +16,7 @@ namespace ExtensionsDev
         {
             if (string.IsNullOrWhiteSpace(nullPrompt))
             {
+                if (SysConfig.Config==null) return ctrl;
                 ctrl.Properties.NullValuePrompt = SysConfig.Config.TimeZoneUTC;
                 ctrl.ToolTip= SysConfig.Config.TimeZoneUTC;
             }

+ 9 - 1
XdCxRhDW.App/ExtensionsDev/GridControlEx.cs

@@ -950,6 +950,14 @@ public static class GridControlEx
         }
 
     }
-
+    public static GridControl DrawGridColumnHeaderCheckBox(this GridControl grid)
+    {
+        //View的 Editable要为true
+        var view = grid.MainView as GridView;
+        view.OptionsBehavior.Editable = true;
+        view.OptionsSelection.MultiSelect = true;
+        view.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CheckBoxRowSelect;
+        return grid;
+    }
 }
 

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

@@ -1,10 +1,12 @@
 using DevExpress.Mvvm.Native;
+using DevExpress.Office.Crypto;
 using DevExpress.Utils;
 using DevExpress.Utils.Drawing;
 using DevExpress.Utils.Svg;
 using DevExpress.XtraEditors.ButtonsPanelControl;
 using DevExpress.XtraEditors.Controls;
 using DevExpress.XtraGrid.Views.Grid;
+using DPP_YH_Core.Extensions;
 using DxHelper;
 using ExtensionsDev;
 using System;
@@ -162,7 +164,6 @@ namespace XdCxRhDW.App.UserControl
             this.svgImageCollection1.Add("Stopped", SvgHelper.CreateCycle("#1E8B58"));
             this.svgImageCollection1.Add("Running", SvgHelper.CreateCycle("#2E8B57"));
             gridView1.CustomDrawCell += GridView1_CustomDrawCell;
-            gridView1.CustomColumnDisplayText += GridView1_CustomColumnDisplayText;
             gridView1.DoubleClick += GridView1_DoubleClick;
             txtTimeCho_SelectedIndexChanged(null, null);
             WaitHelper.CloseForm();
@@ -228,22 +229,8 @@ namespace XdCxRhDW.App.UserControl
             {
                 gridView2.Columns[nameof(ModelPosRes.CxResID)].Visible = false;
             }
-            this.txtFrequpMHz.Properties.Items.Clear();
-            this.txtFrequpMHz.Properties.Items.Add(new ImageComboBoxItem("全部", null));
-            if (tsk.TaskType == EnumTaskType.Real)
-                this.txtFrequpMHz.Properties.Items.Add(new ImageComboBoxItem((tsk.Freq / 1e6).ToString("f3"), tsk.Freq));
-            else
-            {
-                if (tsk.HistoryFrequpMHz != null)
-                {
-                    var freqArr = tsk.HistoryFrequpMHz.Split(',');
-                    var listFreqHz = freqArr.Where(p => !string.IsNullOrWhiteSpace(p)).Select(p => Convert.ToDouble(p) * 1e6).OrderBy(p => p).ToList();
-                    foreach (var freqHz in listFreqHz)
-                    {
-                        this.txtFrequpMHz.Properties.Items.Add(new ImageComboBoxItem((freqHz / 1e6).ToString("f3"), freqHz));
-                    }
-                }
-            }
+          
+          
             txtFrequpMHz.SelectedIndex = 0;
             var btnEdit = (layoutControlGroup1.CustomHeaderButtons[1] as GroupBoxButton);
             var btnDel = (layoutControlGroup1.CustomHeaderButtons[2] as GroupBoxButton);
@@ -280,14 +267,6 @@ namespace XdCxRhDW.App.UserControl
         {
             layoutControlGroup1_CustomButtonClick(null, new DevExpress.XtraBars.Docking2010.BaseButtonEventArgs(new GroupBoxButton() { Caption = "编辑任务" }));
         }
-        private void GridView1_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
-        {
-            if (e.Value == null) return;
-            if (e.Column.FieldName == nameof(TaskInfo.Freq))
-            {
-                e.DisplayText = $"{(long)e.Value / 1e6}MHz";
-            }
-        }
         private void GridView1_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e)
         {
             if (e.Column.FieldName == nameof(TaskInfo.TaskName) && (EnumTaskState)gridView1.GetRowCellValue(e.RowHandle, nameof(TaskInfo.TaskState)) == EnumTaskState.Running)
@@ -364,6 +343,7 @@ namespace XdCxRhDW.App.UserControl
                     TaskEditor frm = new TaskEditor();
                     if (frm.ShowDialog() != DialogResult.OK) return;
                     var addItem = frm.info;
+                    var addItemSignal = frm.selectedItem;
                     using (RHDWContext db = new RHDWContext())
                     {
                         if (addItem.PosType == EnumPosType.X1D1CX)
@@ -377,6 +357,17 @@ namespace XdCxRhDW.App.UserControl
                         }
                         var taskInfo = db.TaskInfos.Add(addItem);
 
+                        List<TaskSig> sigList = new List<TaskSig>();
+                        foreach (var item in addItemSignal)
+                        {
+                            TaskSig taskSig = new TaskSig();
+                            taskSig.TaskInfoID = taskInfo.ID;
+                            taskSig.SigInfoID = item.ID;
+                            taskSig.FreqUp = item.FreqUp;
+                            taskSig.FreqDown = item.FreqDown;
+                            sigList.Add(taskSig);
+                        }
+                        db.TaskSigs.AddRange(sigList);
                         await db.SaveChangesAsync();
                     }
                     list.Insert(0, addItem);
@@ -396,9 +387,14 @@ namespace XdCxRhDW.App.UserControl
                     using (RHDWContext db = new RHDWContext())
                     {
                         var editItem = gridView1.GetFocusedRow() as TaskInfo;
-                        TaskEditor frm = new TaskEditor(editItem);
+                        List<TaskSig> taskSig = await db.TaskSigs.Where(w => w.TaskInfoID == editItem.ID).ToListAsync();
+                        var taskSigID = taskSig.Select(s => s.SigInfoID);
+                        var items = await db.SigInfos.ToListAsync();
+                        var taskSigInfo = items.Where(w => taskSigID.Contains(w.ID)).ToList();
+                          TaskEditor frm = new TaskEditor(editItem, taskSigInfo);
                         if (frm.ShowDialog() != DialogResult.OK) return;
                         editItem = frm.info;
+                        List<SigInfo> editItemSig = frm.selectedItem;
                         if (await db.TaskInfos.AnyAsync(p => p.ID != editItem.ID && p.TaskName == editItem.TaskName))
                         {
                             DxHelper.MsgBoxHelper.ShowWarning("任务名称重复");
@@ -407,14 +403,10 @@ namespace XdCxRhDW.App.UserControl
                         var find = await db.TaskInfos.Where(p => p.ID == editItem.ID).FirstOrDefaultAsync();
                         find.TaskName = editItem.TaskName;
                         find.PosType = editItem.PosType;
-                        find.SigType = editItem.SigType;
-                        find.DetectionWay = editItem.DetectionWay;
                         find.UpdateTime = DateTime.Now;
-                        find.Freq = editItem.Freq;
                         find.MainSat = editItem.MainSat;
                         find.CapDir = editItem.CapDir;
                         find.CapDirFormat = editItem.CapDirFormat;
-                        find.HistoryFrequpMHz = editItem.HistoryFrequpMHz;
                         if (find.PosType == EnumPosType.X1D1CX)
                         {
                             find.Adja1Sat = null;
@@ -430,7 +422,19 @@ namespace XdCxRhDW.App.UserControl
                             find.Adja2Sat = editItem.Adja2Sat;
                         }
                         db.TaskInfos.AddOrUpdate(find);
-                        await db.SaveChangesAsync();
+                        db.TaskSigs.RemoveRange(taskSig);
+                        List<TaskSig> sigList = new List<TaskSig>();
+                        foreach (var item in editItemSig)
+                        {
+                            TaskSig taskSigEdit = new TaskSig();
+                            taskSigEdit.TaskInfoID = editItem.ID;
+                            taskSigEdit.SigInfoID = item.ID;
+                            taskSigEdit.FreqUp = item.FreqUp;
+                            taskSigEdit.FreqDown = item.FreqDown;
+                            sigList.Add(taskSigEdit);
+                        }
+                        db.TaskSigs.AddRange(sigList);
+                       await db.SaveChangesAsync();
                     }
                     gridView1.RefreshData();
                 }
@@ -452,6 +456,8 @@ namespace XdCxRhDW.App.UserControl
                     {
                         var item = db.TaskInfos.FirstOrDefault(p => p.ID == tsk.ID);
                         db.TaskInfos.Remove(item);
+                        var taskSig = db.TaskSigs.Where(w => w.TaskInfoID == tsk.ID);
+                        db.TaskSigs.RemoveRange(taskSig);
                         db.SaveChanges();
                     }
                     gridView1.DeleteSelectedRows();
@@ -474,6 +480,7 @@ namespace XdCxRhDW.App.UserControl
                     if (tsk.TaskType == EnumTaskType.History)
                     {
                         TxInfo tx;
+                        List<TaskSigDto> tskSig = new List<TaskSigDto>();
                         using (RHDWContext db = new RHDWContext())
                         {
                             tx = db.TxInfos.FirstOrDefault();
@@ -482,6 +489,7 @@ namespace XdCxRhDW.App.UserControl
                                 DxHelper.MsgBoxHelper.ShowWarning($"未配置天线信息");
                                 return;
                             }
+                            tskSig = db.TaskSigs.Where(w=>w.TaskInfoID == tsk.ID).MapTo<List<TaskSigDto>>();
                         }
                         if (tsk.PosType == EnumPosType.X2D1)
                         {
@@ -496,8 +504,6 @@ namespace XdCxRhDW.App.UserControl
                             if (frm.ShowDialog() != DialogResult.OK) return;
                             var startTime = frm.start;
                             var endTime = frm.end;
-                            var strs = tsk.HistoryFrequpMHz.Split(',');
-                            var freqs = strs.Select(f => ((long)(Convert.ToDouble(f) * 1e6)));
                             X2D1HistoryTaskHandleDto dto = new X2D1HistoryTaskHandleDto()
                             {
                                 MainSatCode = tsk.MainSat,
@@ -506,12 +512,11 @@ namespace XdCxRhDW.App.UserControl
                                 StartTime = startTime,
                                 EndTime = endTime,
                                 TaskName = tsk.TaskName,
-                                TaskCheckType = tsk.DetectionWay.HasValue ? (EnumTaskCheckTypeDto)(int)tsk.DetectionWay.Value : EnumTaskCheckTypeDto.DAMA,
                                 CapDir = tsk.CapDir,
                                 CapLon = tx.Lon,
                                 CapLat = tx.Lat,
                                 DateDirFormat = tsk.CapDirFormat,
-                                FreqsHz = freqs.ToList()
+                                Freqs = tskSig.ToList()
                             };
                             var res = await HttpHelper.PostRequestAsync<AjaxResult>(svtItem.BaseHttpAddr + "/api/HistoryTaskProcessing/Run", dto);
                             if (res.code != 200)
@@ -534,8 +539,6 @@ namespace XdCxRhDW.App.UserControl
                             if (frm.ShowDialog() != DialogResult.OK) return;
                             var startTime = frm.start;
                             var endTime = frm.end;
-                            var strs = tsk.HistoryFrequpMHz.Split(',');
-                            var freqs = strs.Select(f => ((long)(Convert.ToDouble(f) * 1e6)));
                             X2D1HistoryTaskHandleDto dto = new X2D1HistoryTaskHandleDto()
                             {
                                 MainSatCode = tsk.MainSat,
@@ -544,12 +547,11 @@ namespace XdCxRhDW.App.UserControl
                                 StartTime = startTime,
                                 EndTime = endTime,
                                 TaskName = tsk.TaskName,
-                                TaskCheckType = tsk.DetectionWay.HasValue ? (EnumTaskCheckTypeDto)(int)tsk.DetectionWay.Value : EnumTaskCheckTypeDto.DAMA,
                                 CapDir = tsk.CapDir,
                                 DateDirFormat = tsk.CapDirFormat,
                                 CapLon = tx.Lon,
                                 CapLat = tx.Lat,
-                                FreqsHz = freqs.ToList()
+                                Freqs = tskSig.ToList()
                             };
                             var res = await HttpHelper.PostRequestAsync<AjaxResult>(svtItem.BaseHttpAddr + "/api/HistoryTaskProcessing/Run", dto);
                             if (res.code != 200)
@@ -562,6 +564,7 @@ namespace XdCxRhDW.App.UserControl
                         else
                         {
                             DxHelper.MsgBoxHelper.ShowError($"暂不支持{tsk.PosType.GetEnumDisplayName()}类型的历史任务");
+                            return;
                         }
                     }
                     using (RHDWContext db = new RHDWContext())

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

@@ -206,6 +206,12 @@
     <Compile Include="EditForms\SigEditor.Designer.cs">
       <DependentUpon>SigEditor.cs</DependentUpon>
     </Compile>
+    <Compile Include="EditForms\TaskEditorSignal.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="EditForms\TaskEditorSignal.Designer.cs">
+      <DependentUpon>TaskEditorSignal.cs</DependentUpon>
+    </Compile>
     <Compile Include="EditForms\TaskHistoryTimeEditor.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -461,6 +467,9 @@
     <EmbeddedResource Include="EditForms\SigEditor.resx">
       <DependentUpon>SigEditor.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="EditForms\TaskEditorSignal.resx">
+      <DependentUpon>TaskEditorSignal.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="EditForms\TaskHistoryTimeEditor.resx">
       <DependentUpon>TaskHistoryTimeEditor.cs</DependentUpon>
     </EmbeddedResource>

+ 6 - 0
XdCxRhDW.Entity/EntityEnum.cs

@@ -249,5 +249,11 @@ namespace XdCxRhDW.Entity
         /// </summary>
         [Display(Name = "能量检测")]
         Ky5758 = 4,
+
+        /// <summary>
+        /// 常规信号
+        /// </summary>
+        [Display(Name = "常规信号")]
+        Normal = 8,
     }
 }

+ 1 - 1
XdCxRhDW.Entity/SigInfo.cs

@@ -18,7 +18,7 @@ namespace XdCxRhDW.Entity
         [Display(Name = "下行频点(MHz)")]
         public double FreqDown { get; set; }
 
-        [Display(Name = "号类型")]
+        [Display(Name = "号类型")]
         public EnumSigCheckType SigType { get; set; }
 
         [Display(Name = "门限(dB)")]

+ 2 - 18
XdCxRhDW.Entity/TaskInfo.cs

@@ -29,9 +29,6 @@ namespace XdCxRhDW.Entity
         [Display(Name = "定位类型")]
         public EnumPosType PosType { get; set; }
 
-        [Display(Name = "信号类型")]
-        public EnumSigType SigType { get; set; }
-
         [Display(Name = "主星", AutoGenerateField = false)]
         public int MainSat { get; set; }
 
@@ -41,16 +38,7 @@ namespace XdCxRhDW.Entity
         [Display(Name = "邻星2", AutoGenerateField = false)]
         public int? Adja2Sat { get; set; }
 
-        [Display(Name = "上行频点")]
-        public long Freq { get; set; }
-
-
-
-        /// <summary>
-        /// 检测方式
-        /// </summary>
-        [Display(AutoGenerateField = false)]
-        public EnumTaskCheckType? DetectionWay { get; set; }
+       
 
         /// <summary>
         /// 历史任务采集文件的目录
@@ -64,11 +52,7 @@ namespace XdCxRhDW.Entity
         [Display(AutoGenerateField = false)]
         public string CapDirFormat { get; set; }
 
-        /// <summary>
-        /// 历史任务要处理的上行频点MHz
-        /// </summary>
-        [Display(AutoGenerateField = false)]
-        public string HistoryFrequpMHz { get; set; }
+       
 
     }
 }

+ 12 - 3
XdCxRhDW.Entity/TaskSig.cs

@@ -1,4 +1,5 @@
-using System;
+using Newtonsoft.Json;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel.DataAnnotations;
 using System.ComponentModel.DataAnnotations.Schema;
@@ -16,12 +17,20 @@ namespace XdCxRhDW.Entity
         /// <summary>
         /// 任务编号
         /// </summary>
-        public int TaskID { get; set; }
+        public int TaskInfoID { get; set; }
+
+        [Display(AutoGenerateField = false)]
+        [JsonIgnore]
+        public virtual TaskInfo TaskInfo { get; set; }
 
         /// <summary>
         /// 信号编号
         /// </summary>
-        public int SigID { get; set; }
+        public int SigInfoID { get; set; }
+
+        [Display(AutoGenerateField = false)]
+        [JsonIgnore]
+        public virtual SigInfo SigInfo { get; set; }
 
         /// <summary>
         /// 上行频点(MHz)(防止信号被删除的冗余字段)

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

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

+ 1 - 0
XdCxRhDw.Dto/02.XdCxRhDW.Dto.csproj

@@ -97,6 +97,7 @@
     <Compile Include="PosDto\X2D1NoXlPosDto.cs" />
     <Compile Include="SvrStateDto.cs" />
     <Compile Include="TaskHandleDto\X2D1HistoryTaskHandleDto.cs" />
+    <Compile Include="TaskSigDto.cs" />
     <Compile Include="XlCalcDto\XlImportDto.cs" />
     <Compile Include="XlCalcDto\XlCalcMultDto.cs" />
     <Compile Include="XlCalcDto\XlCalcDto.cs" />

+ 3 - 7
XdCxRhDw.Dto/TaskHandleDto/X2D1HistoryTaskHandleDto.cs

@@ -4,6 +4,7 @@ using System.ComponentModel.DataAnnotations;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using XdCxRhDW.Entity;
 
 namespace XdCxRhDW.Dto
 {
@@ -53,14 +54,9 @@ namespace XdCxRhDW.Dto
         public string CapDir { get; set; }
 
         /// <summary>
-        /// 要处理的上行频点Hz
+        /// 要处理的信号
         /// </summary>
-        public List<long> FreqsHz { get; set; }
-
-        /// <summary>
-        /// 任务检测类型(支持多选)
-        /// </summary>
-        public EnumTaskCheckTypeDto TaskCheckType { get; set; }
+        public List<TaskSigDto> Freqs { get; set; }
 
         /// <summary>
         /// 采集站经度

+ 35 - 0
XdCxRhDw.Dto/TaskSigDto.cs

@@ -0,0 +1,35 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Linq;
+using System.Runtime.Remoting.Metadata.W3cXsd2001;
+using System.Text;
+using System.Threading.Tasks;
+using XdCxRhDW.Dto;
+
+namespace XdCxRhDW.Entity
+{
+
+    //任务信号
+    public class TaskSigDto
+    {
+        /// <summary>
+        /// 任务编号
+        /// </summary>
+        public int TaskInfoID { get; set; }
+
+        [Display(Name = "上行频点(MHz)")]
+        public double FreqUp { get; set; }
+
+        [Display(Name = "下行频点(MHz)")]
+        public double FreqDown { get; set; }
+
+        [Display(Name = "信号类型")]
+        public EnumTaskCheckTypeDto SigType { get; set; }
+
+        [Display(Name = "门限(dB)")]
+        public double Snr { get; set; }
+    }
+}