zoulei 1 年之前
父節點
當前提交
590cc5e1a4

+ 5 - 1
XdCxRhDW.App/App.config

@@ -2,13 +2,17 @@
 <configuration>
 	<connectionStrings>
 		<add name="DbCon" connectionString="Data Source=|DataDirectory|\Database.db" providerName="System.Data.SQLite.EF6" />
-		<add name="DbConPart" connectionString="Data Source=|DataDirectory|\Database2.db" providerName="System.Data.SQLite.EF6" />
 	</connectionStrings>
 	<appSettings>
+		<!--54专用-->
+		<add key="UseFor54" value=""/>
+		
 		<!--程序标题-->
 		<add key="SystemName" value="多模式融合定位平台" />
+		
 		<!--公司名称(没有则不会显示版权)-->
 		<add key="Company" value="" />
+		
 		<!--本机IP,没有则由程序自动获取-->
 		<add key="LocalIP" value="" />
 

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

@@ -36,7 +36,7 @@ namespace XdCxRhDW.App.EditForms
         public TaskEditor()
         {
             InitializeComponent();
-            //this.layoutControl1.UseDefault();
+            this.layoutControl1.UseDefault();
             this.Text = "添加任务";
             info = new TaskInfo();
             this.StartPosition = FormStartPosition.CenterParent;

+ 380 - 0
XdCxRhDW.App/EditForms/TaskEditor54.Designer.cs

@@ -0,0 +1,380 @@
+namespace XdCxRhDW.App.EditForms
+{
+    partial class TaskEditor54
+    {
+        /// <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.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
+            this.btnFreq = new DevExpress.XtraEditors.SimpleButton();
+            this.btnSave = new DevExpress.XtraEditors.SimpleButton();
+            this.txtTaskName = new DevExpress.XtraEditors.TextEdit();
+            this.txtPosType = new DevExpress.XtraEditors.RadioGroup();
+            this.txtMainSat = new DevExpress.XtraEditors.SearchLookUpEdit();
+            this.searchLookUpEdit1View = new DevExpress.XtraGrid.Views.Grid.GridView();
+            this.txtAdja1Sat = new DevExpress.XtraEditors.SearchLookUpEdit();
+            this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
+            this.txtAdja2Sat = new DevExpress.XtraEditors.SearchLookUpEdit();
+            this.gridView2 = new DevExpress.XtraGrid.Views.Grid.GridView();
+            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.layoutControlItemAdja1 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItemAdja2 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
+            this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem7 = 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.txtTaskName.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtPosType.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtMainSat.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtAdja1Sat.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtAdja2Sat.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridView2)).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.layoutControlItemAdja1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAdja2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // layoutControl1
+            // 
+            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.txtMainSat);
+            this.layoutControl1.Controls.Add(this.txtAdja1Sat);
+            this.layoutControl1.Controls.Add(this.txtAdja2Sat);
+            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(493, 265);
+            this.layoutControl1.TabIndex = 0;
+            this.layoutControl1.Text = "layoutControl1";
+            // 
+            // btnFreq
+            // 
+            this.btnFreq.Location = new System.Drawing.Point(275, 219);
+            this.btnFreq.Name = "btnFreq";
+            this.btnFreq.Size = new System.Drawing.Size(96, 23);
+            this.btnFreq.StyleController = this.layoutControl1;
+            this.btnFreq.TabIndex = 14;
+            this.btnFreq.Text = "选择信号";
+            this.btnFreq.Click += new System.EventHandler(this.btnFreq_Click);
+            // 
+            // btnSave
+            // 
+            this.btnSave.Location = new System.Drawing.Point(385, 219);
+            this.btnSave.Name = "btnSave";
+            this.btnSave.Size = new System.Drawing.Size(96, 23);
+            this.btnSave.StyleController = this.layoutControl1;
+            this.btnSave.TabIndex = 6;
+            this.btnSave.Text = "保存";
+            this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
+            // 
+            // txtTaskName
+            // 
+            this.txtTaskName.Location = new System.Drawing.Point(12, 39);
+            this.txtTaskName.Name = "txtTaskName";
+            this.txtTaskName.Properties.AutoHeight = false;
+            this.txtTaskName.Size = new System.Drawing.Size(469, 20);
+            this.txtTaskName.StyleController = this.layoutControl1;
+            this.txtTaskName.TabIndex = 4;
+            // 
+            // txtPosType
+            // 
+            this.txtPosType.EditValue = 0;
+            this.txtPosType.Location = new System.Drawing.Point(12, 85);
+            this.txtPosType.Name = "txtPosType";
+            this.txtPosType.Properties.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244)))));
+            this.txtPosType.Properties.Appearance.Options.UseBackColor = true;
+            this.txtPosType.Properties.Columns = 3;
+            this.txtPosType.Size = new System.Drawing.Size(469, 79);
+            this.txtPosType.StyleController = this.layoutControl1;
+            this.txtPosType.TabIndex = 5;
+            this.txtPosType.EditValueChanged += new System.EventHandler(this.txtPosType_EditValueChanged);
+            // 
+            // txtMainSat
+            // 
+            this.txtMainSat.Location = new System.Drawing.Point(12, 185);
+            this.txtMainSat.Name = "txtMainSat";
+            this.txtMainSat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.txtMainSat.Properties.NullText = "";
+            this.txtMainSat.Properties.PopupSizeable = false;
+            this.txtMainSat.Properties.PopupView = this.searchLookUpEdit1View;
+            this.txtMainSat.Size = new System.Drawing.Size(153, 20);
+            this.txtMainSat.StyleController = this.layoutControl1;
+            this.txtMainSat.TabIndex = 7;
+            // 
+            // searchLookUpEdit1View
+            // 
+            this.searchLookUpEdit1View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
+            this.searchLookUpEdit1View.Name = "searchLookUpEdit1View";
+            this.searchLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = false;
+            this.searchLookUpEdit1View.OptionsView.ShowGroupPanel = false;
+            // 
+            // txtAdja1Sat
+            // 
+            this.txtAdja1Sat.Location = new System.Drawing.Point(169, 185);
+            this.txtAdja1Sat.Name = "txtAdja1Sat";
+            this.txtAdja1Sat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.txtAdja1Sat.Properties.NullText = "";
+            this.txtAdja1Sat.Properties.PopupSizeable = false;
+            this.txtAdja1Sat.Properties.PopupView = this.gridView1;
+            this.txtAdja1Sat.Size = new System.Drawing.Size(154, 20);
+            this.txtAdja1Sat.StyleController = this.layoutControl1;
+            this.txtAdja1Sat.TabIndex = 8;
+            // 
+            // gridView1
+            // 
+            this.gridView1.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
+            this.gridView1.Name = "gridView1";
+            this.gridView1.OptionsSelection.EnableAppearanceFocusedCell = false;
+            this.gridView1.OptionsView.ShowGroupPanel = false;
+            // 
+            // txtAdja2Sat
+            // 
+            this.txtAdja2Sat.Location = new System.Drawing.Point(327, 185);
+            this.txtAdja2Sat.Name = "txtAdja2Sat";
+            this.txtAdja2Sat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.txtAdja2Sat.Properties.NullText = "";
+            this.txtAdja2Sat.Properties.PopupSizeable = false;
+            this.txtAdja2Sat.Properties.PopupView = this.gridView2;
+            this.txtAdja2Sat.Size = new System.Drawing.Size(154, 20);
+            this.txtAdja2Sat.StyleController = this.layoutControl1;
+            this.txtAdja2Sat.TabIndex = 9;
+            // 
+            // gridView2
+            // 
+            this.gridView2.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
+            this.gridView2.Name = "gridView2";
+            this.gridView2.OptionsSelection.EnableAppearanceFocusedCell = false;
+            this.gridView2.OptionsView.ShowGroupPanel = false;
+            // 
+            // Root
+            // 
+            this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
+            this.Root.GroupBordersVisible = false;
+            this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
+            this.emptySpaceItem1,
+            this.layoutControlItem2,
+            this.layoutControlItem3,
+            this.layoutControlItem4,
+            this.layoutControlItemAdja1,
+            this.layoutControlItemAdja2,
+            this.layoutControlGroup1,
+            this.layoutControlItem7});
+            this.Root.Name = "Root";
+            this.Root.Size = new System.Drawing.Size(493, 265);
+            this.Root.TextVisible = false;
+            // 
+            // emptySpaceItem1
+            // 
+            this.emptySpaceItem1.AllowHotTrack = false;
+            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 197);
+            this.emptySpaceItem1.Name = "emptySpaceItem1";
+            this.emptySpaceItem1.Size = new System.Drawing.Size(263, 48);
+            this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
+            // 
+            // layoutControlItem2
+            // 
+            this.layoutControlItem2.Control = this.txtPosType;
+            this.layoutControlItem2.Location = new System.Drawing.Point(0, 56);
+            this.layoutControlItem2.MaxSize = new System.Drawing.Size(0, 100);
+            this.layoutControlItem2.MinSize = new System.Drawing.Size(54, 100);
+            this.layoutControlItem2.Name = "layoutControlItem2";
+            this.layoutControlItem2.Size = new System.Drawing.Size(473, 100);
+            this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.layoutControlItem2.Text = "定位模式";
+            this.layoutControlItem2.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItem2.TextSize = new System.Drawing.Size(48, 14);
+            // 
+            // layoutControlItem3
+            // 
+            this.layoutControlItem3.Control = this.btnSave;
+            this.layoutControlItem3.Location = new System.Drawing.Point(373, 197);
+            this.layoutControlItem3.MaxSize = new System.Drawing.Size(100, 37);
+            this.layoutControlItem3.MinSize = new System.Drawing.Size(100, 37);
+            this.layoutControlItem3.Name = "layoutControlItem3";
+            this.layoutControlItem3.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
+            this.layoutControlItem3.Size = new System.Drawing.Size(100, 48);
+            this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem3.TextVisible = false;
+            // 
+            // layoutControlItem4
+            // 
+            this.layoutControlItem4.Control = this.txtMainSat;
+            this.layoutControlItem4.Location = new System.Drawing.Point(0, 156);
+            this.layoutControlItem4.Name = "layoutControlItem4";
+            this.layoutControlItem4.Size = new System.Drawing.Size(157, 41);
+            this.layoutControlItem4.Text = "主星";
+            this.layoutControlItem4.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItem4.TextSize = new System.Drawing.Size(48, 14);
+            // 
+            // layoutControlItemAdja1
+            // 
+            this.layoutControlItemAdja1.Control = this.txtAdja1Sat;
+            this.layoutControlItemAdja1.Location = new System.Drawing.Point(157, 156);
+            this.layoutControlItemAdja1.Name = "layoutControlItemAdja1";
+            this.layoutControlItemAdja1.Size = new System.Drawing.Size(158, 41);
+            this.layoutControlItemAdja1.Text = "邻星1";
+            this.layoutControlItemAdja1.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItemAdja1.TextSize = new System.Drawing.Size(48, 14);
+            this.layoutControlItemAdja1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+            // 
+            // layoutControlItemAdja2
+            // 
+            this.layoutControlItemAdja2.Control = this.txtAdja2Sat;
+            this.layoutControlItemAdja2.Location = new System.Drawing.Point(315, 156);
+            this.layoutControlItemAdja2.Name = "layoutControlItemAdja2";
+            this.layoutControlItemAdja2.Size = new System.Drawing.Size(158, 41);
+            this.layoutControlItemAdja2.Text = "邻星2";
+            this.layoutControlItemAdja2.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItemAdja2.TextSize = new System.Drawing.Size(48, 14);
+            this.layoutControlItemAdja2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+            // 
+            // layoutControlGroup1
+            // 
+            this.layoutControlGroup1.GroupBordersVisible = false;
+            this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
+            this.layoutControlItem1});
+            this.layoutControlGroup1.Location = new System.Drawing.Point(0, 0);
+            this.layoutControlGroup1.Name = "layoutControlGroup1";
+            this.layoutControlGroup1.Size = new System.Drawing.Size(473, 56);
+            // 
+            // layoutControlItem1
+            // 
+            this.layoutControlItem1.Control = this.txtTaskName;
+            this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
+            this.layoutControlItem1.MaxSize = new System.Drawing.Size(0, 56);
+            this.layoutControlItem1.MinSize = new System.Drawing.Size(118, 56);
+            this.layoutControlItem1.Name = "layoutControlItem1";
+            this.layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 7);
+            this.layoutControlItem1.Size = new System.Drawing.Size(473, 56);
+            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);
+            // 
+            // layoutControlItem7
+            // 
+            this.layoutControlItem7.Control = this.btnFreq;
+            this.layoutControlItem7.Location = new System.Drawing.Point(263, 197);
+            this.layoutControlItem7.MaxSize = new System.Drawing.Size(110, 37);
+            this.layoutControlItem7.MinSize = new System.Drawing.Size(110, 37);
+            this.layoutControlItem7.Name = "layoutControlItem7";
+            this.layoutControlItem7.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 12, 12, 2);
+            this.layoutControlItem7.Size = new System.Drawing.Size(110, 48);
+            this.layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem7.TextVisible = false;
+            // 
+            // dxErrorProvider
+            // 
+            this.dxErrorProvider.ContainerControl = this;
+            // 
+            // TaskEditor54
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(493, 265);
+            this.Controls.Add(this.layoutControl1);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+            this.Name = "TaskEditor54";
+            this.Text = "TaskEditor";
+            this.Load += new System.EventHandler(this.TaskEditor_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
+            this.layoutControl1.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.txtTaskName.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtPosType.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtMainSat.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtAdja1Sat.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtAdja2Sat.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridView2)).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.layoutControlItemAdja1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItemAdja2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private DevExpress.XtraLayout.LayoutControl layoutControl1;
+        private DevExpress.XtraLayout.LayoutControlGroup Root;
+        private DevExpress.XtraEditors.TextEdit txtTaskName;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
+        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
+        private DevExpress.XtraEditors.RadioGroup txtPosType;
+        private DevExpress.XtraEditors.SimpleButton btnSave;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItemAdja1;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItemAdja2;
+        private DevExpress.XtraEditors.SearchLookUpEdit txtMainSat;
+        private DevExpress.XtraGrid.Views.Grid.GridView searchLookUpEdit1View;
+        private DevExpress.XtraEditors.SearchLookUpEdit txtAdja1Sat;
+        private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
+        private DevExpress.XtraEditors.SearchLookUpEdit txtAdja2Sat;
+        private DevExpress.XtraGrid.Views.Grid.GridView gridView2;
+        private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider;
+        private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
+        private DevExpress.XtraEditors.SimpleButton btnFreq;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
+    }
+}

+ 271 - 0
XdCxRhDW.App/EditForms/TaskEditor54.cs

@@ -0,0 +1,271 @@
+using DevExpress.Utils.About;
+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;
+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 TaskEditor54 : DevExpress.XtraEditors.XtraForm
+    {
+        public TaskInfo info;
+        public List<SigInfo> selectedItem = new List<SigInfo>();
+        public TaskEditor54()
+        {
+            InitializeComponent();
+            this.layoutControl1.UseDefault();
+            this.Text = "添加任务";
+            info = new TaskInfo();
+            this.StartPosition = FormStartPosition.CenterParent;
+            //加载DW类型
+            this.txtPosType.Properties.Items.Add(new RadioGroupItem((int)EnumPosType.X2D1, EnumPosType.X2D1.GetEnumDisplayName()));
+            this.txtPosType.Properties.Items.Add(new RadioGroupItem((int)EnumPosType.X3TwoDto, EnumPosType.X3TwoDto.GetEnumDisplayName()));
+            this.txtPosType.SelectedIndex = 0;
+        }
+
+        public TaskEditor54(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)
+        {
+            using (RHDWContext db = new RHDWContext())
+            {
+                var sats = await db.SatInfos.ToListAsync();
+                this.txtMainSat.UseDefault().SetData(sats, nameof(SatInfo.Sat)).UseDoubleClickToSelectAll();
+                this.txtAdja1Sat.UseDefault().SetData(sats, nameof(SatInfo.Sat)).UseDoubleClickToSelectAll();
+                this.txtAdja2Sat.UseDefault().SetData(sats, nameof(SatInfo.Sat)).UseDoubleClickToSelectAll();
+            }
+            if (this.Text.StartsWith("编辑任务") && info != null)
+            {
+                using (RHDWContext db = new RHDWContext())
+                {
+                    var satMain = await db.SatInfos.Where(w => w.SatCode == info.MainSat).FirstOrDefaultAsync();
+                    var satAdja1 = await db.SatInfos.Where(w => w.SatCode == info.Adja1Sat).FirstOrDefaultAsync();
+                    var satAdja2 = await db.SatInfos.Where(w => w.SatCode == info.Adja2Sat).FirstOrDefaultAsync();
+
+                    this.txtTaskName.Text = info.TaskName;
+                    int idx = 0;
+                    foreach (RadioGroupItem item in txtPosType.Properties.Items)
+                    {
+                        if ((int)item.Value == (int)info.PosType)
+                        {
+                            this.txtPosType.SelectedIndex = idx;
+                            break;
+                        }
+                        idx++;
+                    }
+                    this.txtMainSat.EditValue = satMain;
+                    this.txtAdja1Sat.EditValue = satAdja1;
+                    this.txtAdja2Sat.EditValue = satAdja2;
+                }
+            }
+        }
+
+        private void btnSave_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                dxErrorProvider.ClearErrors();
+                var posType = (EnumPosType)txtPosType.Properties.Items[txtPosType.SelectedIndex].Value;
+                if (txtTaskName.EditValue == null)
+                {
+                    dxErrorProvider.SetError(txtTaskName, "请填写任务名");
+                    return;
+                }
+                if (!selectedItem.Any())
+                {
+                    DxHelper.MsgBoxHelper.ShowError("请选择信号");
+                    return;
+                }
+
+                if (this.Text == "添加任务")
+                {
+                    using (RHDWContext db = new RHDWContext())
+                    {
+                        if (db.TaskInfos.Any(p => p.TaskName == txtTaskName.Text))
+                        {
+                            dxErrorProvider.SetError(txtTaskName, "任务名称重复");
+                            return;
+                        }
+                    }
+                }
+                else
+                {
+                    using (RHDWContext db = new RHDWContext())
+                    {
+                        if (db.TaskInfos.Any(p => p.ID != info.ID && p.TaskName == txtTaskName.Text))
+                        {
+                            dxErrorProvider.SetError(txtTaskName, "任务名称重复");
+                            return;
+                        }
+                    }
+                }
+                if (posType == EnumPosType.X1D1CX)
+                {
+                    if (txtMainSat.EditValue == null)
+                    {
+                        dxErrorProvider.SetError(txtMainSat, "请选择卫星");
+                        return;
+                    }
+                }
+                else if (posType == EnumPosType.X2D1 || posType == EnumPosType.RH || posType == EnumPosType.X2Dfo)
+                {
+                    if (txtMainSat.EditValue == null)
+                    {
+                        dxErrorProvider.SetError(txtMainSat, "请选择主星");
+                        return;
+                    }
+                    if (txtAdja1Sat.EditValue == null)
+                    {
+                        dxErrorProvider.SetError(txtAdja1Sat, "请选择邻星");
+                        return;
+                    }
+                    if (txtMainSat.EditValue == txtAdja1Sat.EditValue)
+                    {
+                        dxErrorProvider.SetError(txtAdja1Sat, "邻星不能和主星一致");
+                        return;
+                    }
+                }
+                else if (posType == EnumPosType.X3TwoDto || posType == EnumPosType.X3TwoDfo)
+                {
+                    if (txtMainSat.EditValue == null)
+                    {
+                        dxErrorProvider.SetError(txtMainSat, "请选择主星");
+                        return;
+                    }
+                    if (txtAdja1Sat.EditValue == null)
+                    {
+                        dxErrorProvider.SetError(txtAdja1Sat, "请选择邻星1");
+                        return;
+                    }
+                    if (txtAdja2Sat.EditValue == null)
+                    {
+                        dxErrorProvider.SetError(txtAdja2Sat, "请选择邻星2");
+                        return;
+                    }
+                    if (txtMainSat.EditValue == txtAdja1Sat.EditValue)
+                    {
+                        dxErrorProvider.SetError(txtAdja1Sat, "邻星1不能和主星一致");
+                        return;
+                    }
+                    if (txtMainSat.EditValue == txtAdja2Sat.EditValue)
+                    {
+                        dxErrorProvider.SetError(txtAdja2Sat, "邻星2不能和主星一致");
+                        return;
+                    }
+                    if (txtAdja1Sat.EditValue == txtAdja2Sat.EditValue)
+                    {
+                        dxErrorProvider.SetError(txtAdja2Sat, "邻星2不能和邻星1一致");
+                        return;
+                    }
+
+                }
+                info.TaskState = EnumTaskState.Stopped;
+                info.TaskName = txtTaskName.Text;
+                info.PosType = (EnumPosType)(int)txtPosType.EditValue;
+                info.MainSat = ((SatInfo)txtMainSat.EditValue).SatCode;
+                if (txtAdja1Sat.EditValue != null)
+                    info.Adja1Sat = ((SatInfo)txtAdja1Sat.EditValue).SatCode;
+                if (txtAdja2Sat.EditValue != null)
+                    info.Adja2Sat = ((SatInfo)txtAdja2Sat.EditValue).SatCode;
+                info.TaskType = EnumTaskType.Real;
+                this.DialogResult = DialogResult.OK;
+            }
+            catch (Exception ex)
+            {
+                Serilog.Log.Error(ex, "编辑任务信息出错");
+                DxHelper.MsgBoxHelper.ShowError("编辑任务信息出错");
+            }
+        }
+
+        private void txtPosType_EditValueChanged(object sender, EventArgs e)
+        {
+            RadioGroup posTypeRadioGroup = sender as RadioGroup;
+            var posType = (EnumPosType)posTypeRadioGroup.Properties.Items[posTypeRadioGroup.SelectedIndex].Value;
+            if (posType == EnumPosType.X1D1CX)
+            {
+                layoutControlItemAdja1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+                layoutControlItemAdja2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+            }
+            else if (posType == EnumPosType.X2D1)
+            {
+                layoutControlItemAdja1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
+                layoutControlItemAdja2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+                this.layoutControlItemAdja1.Text = "邻星";
+            }
+            else if (posType == EnumPosType.RH)
+            {
+                layoutControlItemAdja1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
+                layoutControlItemAdja2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+                this.layoutControlItemAdja1.Text = "邻星";
+            }
+            else if (posType == EnumPosType.X3TwoDto)
+            {
+                layoutControlItemAdja1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
+                layoutControlItemAdja2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
+                this.layoutControlItemAdja1.Text = "邻星1";
+            }
+            else if (posType == EnumPosType.X3TwoDfo)
+            {
+                layoutControlItemAdja1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
+                layoutControlItemAdja2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
+                this.layoutControlItemAdja1.Text = "邻星1";
+            }
+            else if (posType == EnumPosType.X2Dfo)
+            {
+                layoutControlItemAdja1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
+                layoutControlItemAdja2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+                this.layoutControlItemAdja1.Text = "邻星";
+            }
+            this.layoutControl1.BestFit();
+        }
+
+        private void btnFreq_Click(object sender, EventArgs e)
+        {
+
+            if (this.Text.StartsWith("添加任务"))
+            {
+                TaskEditorSignal frm = new TaskEditorSignal();
+                if (frm.ShowDialog() != DialogResult.OK) return;
+                frm.info = info;
+                selectedItem.Clear();
+                selectedItem = frm.listSigInfoSelected;
+            }
+            else if (this.Text.StartsWith("编辑任务") && info != null)
+            {
+                TaskEditorSignal frm = new TaskEditorSignal(info, selectedItem);
+                if (frm.ShowDialog() != DialogResult.OK) return;
+                selectedItem.Clear();
+                selectedItem = frm.listSigInfoSelected;
+            }
+        }
+    }
+}

+ 126 - 0
XdCxRhDW.App/EditForms/TaskEditor54.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>

+ 43 - 34
XdCxRhDW.App/EditForms/TaskEditorSignal.Designer.cs

@@ -33,11 +33,11 @@
             this.gridTaskSignal = new DevExpress.XtraGrid.GridControl();
             this.gridViewTaskSignal = new DevExpress.XtraGrid.Views.Grid.GridView();
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
+            this.btnCancle = new DevExpress.XtraEditors.SimpleButton();
+            this.btnOk = new DevExpress.XtraEditors.SimpleButton();
             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();
@@ -58,10 +58,10 @@
             // 
             // gridTaskSignal
             // 
-            this.gridTaskSignal.Location = new System.Drawing.Point(12, 12);
+            this.gridTaskSignal.Location = new System.Drawing.Point(6, 6);
             this.gridTaskSignal.MainView = this.gridViewTaskSignal;
             this.gridTaskSignal.Name = "gridTaskSignal";
-            this.gridTaskSignal.Size = new System.Drawing.Size(477, 338);
+            this.gridTaskSignal.Size = new System.Drawing.Size(747, 344);
             this.gridTaskSignal.TabIndex = 0;
             this.gridTaskSignal.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
             this.gridViewTaskSignal});
@@ -80,10 +80,30 @@
             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.Size = new System.Drawing.Size(759, 388);
             this.layoutControl1.TabIndex = 1;
             this.layoutControl1.Text = "layoutControl1";
             // 
+            // btnCancle
+            // 
+            this.btnCancle.Location = new System.Drawing.Point(547, 358);
+            this.btnCancle.Name = "btnCancle";
+            this.btnCancle.Size = new System.Drawing.Size(96, 24);
+            this.btnCancle.StyleController = this.layoutControl1;
+            this.btnCancle.TabIndex = 5;
+            this.btnCancle.Text = "取消";
+            this.btnCancle.Click += new System.EventHandler(this.btnCancle_Click);
+            // 
+            // btnOk
+            // 
+            this.btnOk.Location = new System.Drawing.Point(657, 358);
+            this.btnOk.Name = "btnOk";
+            this.btnOk.Size = new System.Drawing.Size(96, 24);
+            this.btnOk.StyleController = this.layoutControl1;
+            this.btnOk.TabIndex = 4;
+            this.btnOk.Text = "确定";
+            this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
+            // 
             // Root
             // 
             this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
@@ -94,7 +114,8 @@
             this.layoutControlItem3,
             this.emptySpaceItem1});
             this.Root.Name = "Root";
-            this.Root.Size = new System.Drawing.Size(501, 388);
+            this.Root.Padding = new DevExpress.XtraLayout.Utils.Padding(4, 4, 4, 4);
+            this.Root.Size = new System.Drawing.Size(759, 388);
             this.Root.TextVisible = false;
             // 
             // layoutControlItem1
@@ -102,61 +123,49 @@
             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.Size = new System.Drawing.Size(751, 348);
             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.Location = new System.Drawing.Point(641, 348);
+            this.layoutControlItem2.MaxSize = new System.Drawing.Size(110, 32);
+            this.layoutControlItem2.MinSize = new System.Drawing.Size(110, 32);
             this.layoutControlItem2.Name = "layoutControlItem2";
-            this.layoutControlItem2.Size = new System.Drawing.Size(89, 26);
+            this.layoutControlItem2.Padding = new DevExpress.XtraLayout.Utils.Padding(12, 2, 6, 2);
+            this.layoutControlItem2.Size = new System.Drawing.Size(110, 32);
+            this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             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.Location = new System.Drawing.Point(541, 348);
+            this.layoutControlItem3.MaxSize = new System.Drawing.Size(100, 32);
+            this.layoutControlItem3.MinSize = new System.Drawing.Size(100, 32);
             this.layoutControlItem3.Name = "layoutControlItem3";
-            this.layoutControlItem3.Size = new System.Drawing.Size(88, 26);
+            this.layoutControlItem3.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 6, 2);
+            this.layoutControlItem3.Size = new System.Drawing.Size(100, 32);
+            this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             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.Location = new System.Drawing.Point(0, 348);
             this.emptySpaceItem1.Name = "emptySpaceItem1";
-            this.emptySpaceItem1.Size = new System.Drawing.Size(304, 26);
+            this.emptySpaceItem1.Size = new System.Drawing.Size(541, 32);
             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.ClientSize = new System.Drawing.Size(759, 388);
             this.Controls.Add(this.layoutControl1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
             this.Name = "TaskEditorSignal";

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

@@ -67,6 +67,7 @@ namespace XdCxRhDW.App.EditForms
                     if (selectedIdx >= 0)
                         this.gridViewTaskSignal.SelectRow(selectedIdx);
                 }
+                gridViewTaskSignal.BestFitColumns();
             }
             catch (Exception ex)
             {

+ 4 - 0
XdCxRhDW.App/ExtensionsDev/GridControlEx.cs

@@ -978,6 +978,10 @@ public static class GridControlEx
         view.OptionsBehavior.Editable = true;
         view.OptionsSelection.MultiSelect = true;
         view.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CheckBoxRowSelect;
+        foreach (GridColumn item in view.Columns)
+        {
+            item.OptionsColumn.AllowEdit = false;
+        }
         return grid;
     }
 }

+ 37 - 34
XdCxRhDW.App/ExtensionsDev/LayoutControlExtension.cs

@@ -17,7 +17,7 @@ namespace ExtensionsDev
 {
     public static class LayoutControlExtension
     {
-        public static void UseDefault(this LayoutControl ctrl)
+        public static void UseDefault(this LayoutControl ctrl, bool saveLayout = false)
         {
             foreach (var item in ctrl.Root.Items)
             {
@@ -33,48 +33,51 @@ namespace ExtensionsDev
             ctrl.OptionsFocus.AllowFocusTabbedGroups = false;
             ctrl.OptionsFocus.AllowFocusControlOnLabelClick = true;
             // ctrl.Root.GroupBordersVisible = false;
-            System.Windows.Forms.Control findCtrl = ctrl;
-            string GetLayoutName()
+            if (saveLayout)
             {
-                while (findCtrl.Parent != null)
+                System.Windows.Forms.Control findCtrl = ctrl;
+                string GetLayoutName()
                 {
-                    findCtrl = findCtrl.Parent;
-                    if (findCtrl is System.Windows.Forms.UserControl) break;
+                    while (findCtrl.Parent != null)
+                    {
+                        findCtrl = findCtrl.Parent;
+                        if (findCtrl is System.Windows.Forms.UserControl) break;
+                    }
+                    return $"{findCtrl.Name}_{ctrl.Name}";
                 }
-                return $"{findCtrl.Name}_{ctrl.Name}";
-            }
-            string name = GetLayoutName();
-            EventHandler loadEvent = (sender, e) =>
-            {
-                var form = ctrl.FindForm();
-                if (form != null)
+                string name = GetLayoutName();
+                EventHandler loadEvent = (sender, e) =>
                 {
-                    form.VisibleChanged += (sender2, e2) =>
+                    var form = ctrl.FindForm();
+                    if (form != null)
                     {
-                        Directory.CreateDirectory("Layout");
-                        if (name == null) return;
-                        ctrl.SaveLayoutToXml($"Layout\\{name}.xml");
-                    };
+                        form.VisibleChanged += (sender2, e2) =>
+                        {
+                            Directory.CreateDirectory("Layout");
+                            if (name == null) return;
+                            ctrl.SaveLayoutToXml($"Layout\\{name}.xml");
+                        };
+                    }
+                };
+                if (findCtrl is Form frm)
+                {
+                    frm.Load += loadEvent;
                 }
-            };
-            if (findCtrl is Form frm)
-            {
-                frm.Load += loadEvent;
-            }
-            else if (findCtrl is UserControl uCtrl)
-            {
-                uCtrl.Load += loadEvent;
-            }
-
-            if ( name != null && File.Exists($"Layout\\{name}.xml"))
-            {
-                if (Debugger.IsAttached)
+                else if (findCtrl is UserControl uCtrl)
                 {
-                    File.Delete($"Layout\\{name}.xml");
+                    uCtrl.Load += loadEvent;
                 }
-                else 
+
+                if (name != null && File.Exists($"Layout\\{name}.xml"))
                 {
-                    ctrl.RestoreLayoutFromXml($"Layout\\{name}.xml");
+                    if (Debugger.IsAttached)
+                    {
+                        File.Delete($"Layout\\{name}.xml");
+                    }
+                    else
+                    {
+                        ctrl.RestoreLayoutFromXml($"Layout\\{name}.xml");
+                    }
                 }
             }
         }

+ 36 - 9
XdCxRhDW.App/UserControl/CtrlHome.cs

@@ -39,7 +39,7 @@ namespace XdCxRhDW.App.UserControl
         public CtrlHome()
         {
             InitializeComponent();
-            layoutControl1.UseDefault();
+            layoutControl1.UseDefault(true);
             if (this.splitterItem1.Location.X < 200)
                 this.splitterItem1.Location = new Point(200, 0);
             txtStartTime.UseDefault();
@@ -342,10 +342,24 @@ namespace XdCxRhDW.App.UserControl
             {
                 try
                 {
-                    TaskEditor frm = new TaskEditor();
-                    if (frm.ShowDialog() != DialogResult.OK) return;
-                    var addItem = frm.info;
-                    var addItemSignal = frm.selectedItem;
+                    TaskInfo addItem;
+                    List<SigInfo> addItemSignal;
+                    if (ConfigurationManager.AppSettings["UseFor54"] != null
+                        && ConfigurationManager.AppSettings["UseFor54"].ToLower() != "false"
+                        && ConfigurationManager.AppSettings["UseFor54"].ToLower() != "0")
+                    {
+                        TaskEditor54 frm = new TaskEditor54();
+                        if (frm.ShowDialog() != DialogResult.OK) return;
+                        addItem = frm.info;
+                        addItemSignal = frm.selectedItem;
+                    }
+                    else
+                    {
+                        TaskEditor frm = new TaskEditor();
+                        if (frm.ShowDialog() != DialogResult.OK) return;
+                        addItem = frm.info;
+                        addItemSignal = frm.selectedItem;
+                    }
                     using (RHDWContext db = new RHDWContext())
                     {
                         if (addItem.PosType == EnumPosType.X1D1CX)
@@ -397,10 +411,23 @@ namespace XdCxRhDW.App.UserControl
                         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;
+                        List<SigInfo> editItemSig;
+                        if (ConfigurationManager.AppSettings["UseFor54"] != null
+                            && ConfigurationManager.AppSettings["UseFor54"].ToLower() != "false"
+                            && ConfigurationManager.AppSettings["UseFor54"].ToLower() != "0")
+                        {
+                            TaskEditor54 frm = new TaskEditor54(editItem, taskSigInfo);
+                            if (frm.ShowDialog() != DialogResult.OK) return;
+                            editItem = frm.info;
+                            editItemSig = frm.selectedItem;
+                        }
+                        else
+                        {
+                            TaskEditor frm = new TaskEditor(editItem, taskSigInfo);
+                            if (frm.ShowDialog() != DialogResult.OK) return;
+                            editItem = frm.info;
+                            editItemSig = frm.selectedItem;
+                        }
                         if (await db.TaskInfos.AnyAsync(p => p.ID != editItem.ID && p.TaskName == editItem.TaskName))
                         {
                             DxHelper.MsgBoxHelper.ShowWarning("任务名称重复");

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

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