gongqiuhong 1 年之前
父節點
當前提交
ffd75b2353

+ 5 - 5
XdCxRhDW.App/EditForms/TaskEditor.Designer.cs

@@ -99,7 +99,7 @@
             this.layoutControl1.Name = "layoutControl1";
             this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(784, 215, 650, 400);
             this.layoutControl1.Root = this.Root;
-            this.layoutControl1.Size = new System.Drawing.Size(437, 514);
+            this.layoutControl1.Size = new System.Drawing.Size(437, 508);
             this.layoutControl1.TabIndex = 0;
             this.layoutControl1.Text = "layoutControl1";
             // 
@@ -235,7 +235,7 @@
             this.layoutControlItem8});
             this.Root.Name = "Root";
             this.Root.Padding = new DevExpress.XtraLayout.Utils.Padding(20, 20, 20, 20);
-            this.Root.Size = new System.Drawing.Size(437, 514);
+            this.Root.Size = new System.Drawing.Size(437, 508);
             this.Root.TextVisible = false;
             // 
             // layoutControlItem1
@@ -256,7 +256,7 @@
             this.emptySpaceItem1.AllowHotTrack = false;
             this.emptySpaceItem1.Location = new System.Drawing.Point(0, 422);
             this.emptySpaceItem1.Name = "emptySpaceItem1";
-            this.emptySpaceItem1.Size = new System.Drawing.Size(277, 52);
+            this.emptySpaceItem1.Size = new System.Drawing.Size(277, 46);
             this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
             // 
             // layoutControlItem2
@@ -281,7 +281,7 @@
             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, 52);
+            this.layoutControlItem3.Size = new System.Drawing.Size(120, 46);
             this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem3.TextVisible = false;
@@ -344,7 +344,7 @@
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(437, 514);
+            this.ClientSize = new System.Drawing.Size(437, 508);
             this.Controls.Add(this.layoutControl1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
             this.Name = "TaskEditor";

+ 62 - 1
XdCxRhDW.App/EditForms/TaskEditor.cs

@@ -73,7 +73,6 @@ namespace XdCxRhDW.App.EditForms
                     this.txtFreq.EditValue = info.Freq * 1e-6;
                     this.txtBand.EditValue = info.Band * 1e-6;
                 }
-
             }
         }
 
@@ -81,6 +80,68 @@ namespace XdCxRhDW.App.EditForms
         {
             try
             {
+                if (txtTaskName.EditValue == null)
+                {
+                    DxHelper.MsgBoxHelper.ShowError("请填写任务名");
+                    return;
+                }
+                if (txtPosType.SelectedIndex== -1)
+                {
+                    DxHelper.MsgBoxHelper.ShowError("请选择定位类型");
+                    return;
+                }
+                var posType = (EnumPosType)txtPosType.Properties.Items[txtPosType.SelectedIndex].Value;
+                if (posType == EnumPosType.X1D1CX)
+                {
+                    if (txtMainSat.EditValue == null)
+                    {
+                        DxHelper.MsgBoxHelper.ShowError("请选择卫星");
+                        return;
+                    }
+                }
+                else if (posType == EnumPosType.X2D1|| posType == EnumPosType.RH|| posType == EnumPosType.X2Dfo)
+                {
+                    if (txtMainSat.EditValue == null)
+                    {
+                        DxHelper.MsgBoxHelper.ShowError("请选择主星");
+                        return;
+                    }
+                    if (txtAdja1Sat.EditValue == null)
+                    {
+                        DxHelper.MsgBoxHelper.ShowError("请选择邻星");
+                        return;
+                    }
+                }
+                else if (posType == EnumPosType.X3TwoDto|| posType == EnumPosType.X3TwoDfo)
+                {
+                    if (txtMainSat.EditValue == null)
+                    {
+                        DxHelper.MsgBoxHelper.ShowError("请选择主星");
+                        return; 
+                    }
+                    if (txtAdja1Sat.EditValue == null)
+                    {
+                        DxHelper.MsgBoxHelper.ShowError("请选择邻星1");
+                        return;
+                    }
+                    if (txtAdja2Sat.EditValue == null)
+                    {
+                        DxHelper.MsgBoxHelper.ShowError("请选择邻星2");
+                        return;
+                    }
+                   
+                }
+                if (txtFreq.EditValue == null)
+                {
+                    DxHelper.MsgBoxHelper.ShowError("请填写频点");
+                    return;
+                }
+                if (txtBand.EditValue == null)
+                {
+                    DxHelper.MsgBoxHelper.ShowError("请填写带宽");
+                    return;
+                }
+
                 info.TaskState = EnumTaskState.Stopped;
                 info.TaskName = txtTaskName.Text;
                 info.PosType = (EnumPosType)txtPosType.SelectedIndex;

+ 4 - 3
XdCxRhDW.Repostory/Model/TaskInfo.cs

@@ -3,6 +3,7 @@ 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;
 
@@ -22,13 +23,13 @@ namespace XdCxRhDW.Repostory.Model
         [Display(Name = "定位类型")]
         public EnumPosType PosType { get; set; }
 
-        [Display(Name = "主星")]
+        [Display(Name = "主星", AutoGenerateField = false)]
         public int MainSat { get; set; }
 
-        [Display(Name = "邻星1")]
+        [Display(Name = "邻星1", AutoGenerateField = false)]
         public int? Adja1Sat { get; set; }
 
-        [Display(Name = "邻星2")]
+        [Display(Name = "邻星2", AutoGenerateField = false)]
         public int? Adja2Sat { get; set; }
 
         [Display(Name = "上行频点(Hz)")]