wyq 6 miesięcy temu
rodzic
commit
58a2a464a5

+ 3 - 2
DW5S.App/EditForms/PosTimeEditor.cs

@@ -14,6 +14,7 @@ using System.Windows.Documents;
 using System.Windows.Forms;
 using DW5S.Entity;
 using DW5S.Repostory;
+using DW5S.ViewModel;
 
 namespace DW5S.App.EditForms
 {
@@ -22,7 +23,7 @@ namespace DW5S.App.EditForms
         static Dictionary<int, (DateTime, DateTime)> cache = new Dictionary<int, (DateTime, DateTime)>();
         public DateTime start;
         public DateTime end;
-        TaskInfo tsk;
+        TaskViewModel tsk;
         public PosTimeEditor()
         {
             InitializeComponent();
@@ -31,7 +32,7 @@ namespace DW5S.App.EditForms
             this.txtEndTime.UseDefault().UseDoubleClickToSelectAll();
             this.StartPosition = FormStartPosition.CenterParent;
         }
-        public PosTimeEditor(TaskInfo tsk)
+        public PosTimeEditor(TaskViewModel tsk)
             : this()
         {
             this.tsk = tsk;

+ 271 - 353
DW5S.App/EditForms/TaskEditor.Designer.cs

@@ -28,430 +28,352 @@
         /// </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.txtTaskType = new DevExpress.XtraEditors.RadioGroup();
-            this.txtCapDir = new DevExpress.XtraEditors.TextEdit();
-            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.itemCapDir = new DevExpress.XtraLayout.LayoutControlItem();
-            this.itemCapDirFormat = 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.layoutControlItem5 = 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.txtTaskType.Properties)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtCapDir.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.itemCapDir)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.itemCapDirFormat)).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.layoutControlItem5)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
-            this.SuspendLayout();
+            components = new System.ComponentModel.Container();
+            layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
+            btnFreq = new DevExpress.XtraEditors.SimpleButton();
+            btnSave = new DevExpress.XtraEditors.SimpleButton();
+            txtTaskName = new DevExpress.XtraEditors.TextEdit();
+            txtPosType = new DevExpress.XtraEditors.RadioGroup();
+            txtMainSat = new DevExpress.XtraEditors.SearchLookUpEdit();
+            searchLookUpEdit1View = new DevExpress.XtraGrid.Views.Grid.GridView();
+            txtAdja1Sat = new DevExpress.XtraEditors.SearchLookUpEdit();
+            gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
+            txtAdja2Sat = new DevExpress.XtraEditors.SearchLookUpEdit();
+            gridView2 = new DevExpress.XtraGrid.Views.Grid.GridView();
+            txtTaskType = new DevExpress.XtraEditors.RadioGroup();
+            Root = new DevExpress.XtraLayout.LayoutControlGroup();
+            emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
+            layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
+            layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
+            layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
+            layoutControlItemAdja1 = new DevExpress.XtraLayout.LayoutControlItem();
+            layoutControlItemAdja2 = new DevExpress.XtraLayout.LayoutControlItem();
+            layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
+            layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
+            layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
+            layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
+            dxErrorProvider = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components);
+            ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit();
+            layoutControl1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)txtTaskName.Properties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)txtPosType.Properties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)txtMainSat.Properties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)searchLookUpEdit1View).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)txtAdja1Sat.Properties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)gridView1).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)txtAdja2Sat.Properties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)gridView2).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)txtTaskType.Properties).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)Root).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItemAdja1).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItemAdja2).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)dxErrorProvider).BeginInit();
+            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.Controls.Add(this.txtTaskType);
-            this.layoutControl1.Controls.Add(this.txtCapDir);
-            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(502, 301);
-            this.layoutControl1.TabIndex = 0;
-            this.layoutControl1.Text = "layoutControl1";
+            layoutControl1.Controls.Add(btnFreq);
+            layoutControl1.Controls.Add(btnSave);
+            layoutControl1.Controls.Add(txtTaskName);
+            layoutControl1.Controls.Add(txtPosType);
+            layoutControl1.Controls.Add(txtMainSat);
+            layoutControl1.Controls.Add(txtAdja1Sat);
+            layoutControl1.Controls.Add(txtAdja2Sat);
+            layoutControl1.Controls.Add(txtTaskType);
+            layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
+            layoutControl1.Location = new System.Drawing.Point(0, 0);
+            layoutControl1.Name = "layoutControl1";
+            layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(784, 215, 650, 400);
+            layoutControl1.Root = Root;
+            layoutControl1.Size = new System.Drawing.Size(514, 255);
+            layoutControl1.TabIndex = 0;
+            layoutControl1.Text = "layoutControl1";
             // 
             // btnFreq
             // 
-            this.btnFreq.Location = new System.Drawing.Point(284, 260);
-            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);
+            btnFreq.Location = new System.Drawing.Point(296, 219);
+            btnFreq.Name = "btnFreq";
+            btnFreq.Size = new System.Drawing.Size(96, 23);
+            btnFreq.StyleController = layoutControl1;
+            btnFreq.TabIndex = 7;
+            btnFreq.Text = "选择信号";
+            btnFreq.Click += btnFreq_Click;
             // 
             // btnSave
             // 
-            this.btnSave.Location = new System.Drawing.Point(394, 260);
-            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_ClickAsync);
+            btnSave.Location = new System.Drawing.Point(406, 219);
+            btnSave.Name = "btnSave";
+            btnSave.Size = new System.Drawing.Size(96, 23);
+            btnSave.StyleController = layoutControl1;
+            btnSave.TabIndex = 8;
+            btnSave.Text = "保存";
+            btnSave.Click += btnSave_ClickAsync;
             // 
             // 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(246, 20);
-            this.txtTaskName.StyleController = this.layoutControl1;
-            this.txtTaskName.TabIndex = 4;
+            txtTaskName.Location = new System.Drawing.Point(12, 39);
+            txtTaskName.Name = "txtTaskName";
+            txtTaskName.Properties.AutoHeight = false;
+            txtTaskName.Size = new System.Drawing.Size(252, 20);
+            txtTaskName.StyleController = layoutControl1;
+            txtTaskName.TabIndex = 0;
             // 
             // 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(478, 79);
-            this.txtPosType.StyleController = this.layoutControl1;
-            this.txtPosType.TabIndex = 5;
-            this.txtPosType.EditValueChanged += new System.EventHandler(this.txtPosType_EditValueChanged);
+            txtPosType.EditValue = 0;
+            txtPosType.Location = new System.Drawing.Point(12, 85);
+            txtPosType.Name = "txtPosType";
+            txtPosType.Properties.Appearance.BackColor = System.Drawing.Color.FromArgb(244, 244, 244);
+            txtPosType.Properties.Appearance.Options.UseBackColor = true;
+            txtPosType.Properties.Columns = 3;
+            txtPosType.Size = new System.Drawing.Size(490, 79);
+            txtPosType.StyleController = layoutControl1;
+            txtPosType.TabIndex = 3;
+            txtPosType.EditValueChanged += 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(156, 20);
-            this.txtMainSat.StyleController = this.layoutControl1;
-            this.txtMainSat.TabIndex = 7;
+            txtMainSat.Location = new System.Drawing.Point(12, 185);
+            txtMainSat.Name = "txtMainSat";
+            txtMainSat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
+            txtMainSat.Properties.NullText = "";
+            txtMainSat.Properties.PopupSizeable = false;
+            txtMainSat.Properties.PopupView = searchLookUpEdit1View;
+            txtMainSat.Size = new System.Drawing.Size(160, 20);
+            txtMainSat.StyleController = layoutControl1;
+            txtMainSat.TabIndex = 4;
             // 
             // searchLookUpEdit1View
             // 
-            this.searchLookUpEdit1View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
-            this.searchLookUpEdit1View.Name = "searchLookUpEdit1View";
-            this.searchLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = false;
-            this.searchLookUpEdit1View.OptionsView.ShowGroupPanel = false;
+            searchLookUpEdit1View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
+            searchLookUpEdit1View.Name = "searchLookUpEdit1View";
+            searchLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = false;
+            searchLookUpEdit1View.OptionsView.ShowGroupPanel = false;
             // 
             // txtAdja1Sat
             // 
-            this.txtAdja1Sat.Location = new System.Drawing.Point(172, 185);
-            this.txtAdja1Sat.Name = "txtAdja1Sat";
-            this.txtAdja1Sat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
-            this.txtAdja1Sat.Properties.NullText = "";
-            this.txtAdja1Sat.Properties.PopupSizeable = false;
-            this.txtAdja1Sat.Properties.PopupView = this.gridView1;
-            this.txtAdja1Sat.Size = new System.Drawing.Size(157, 20);
-            this.txtAdja1Sat.StyleController = this.layoutControl1;
-            this.txtAdja1Sat.TabIndex = 8;
+            txtAdja1Sat.Location = new System.Drawing.Point(176, 185);
+            txtAdja1Sat.Name = "txtAdja1Sat";
+            txtAdja1Sat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
+            txtAdja1Sat.Properties.NullText = "";
+            txtAdja1Sat.Properties.PopupSizeable = false;
+            txtAdja1Sat.Properties.PopupView = gridView1;
+            txtAdja1Sat.Size = new System.Drawing.Size(160, 20);
+            txtAdja1Sat.StyleController = layoutControl1;
+            txtAdja1Sat.TabIndex = 5;
             // 
             // gridView1
             // 
-            this.gridView1.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
-            this.gridView1.Name = "gridView1";
-            this.gridView1.OptionsSelection.EnableAppearanceFocusedCell = false;
-            this.gridView1.OptionsView.ShowGroupPanel = false;
+            gridView1.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
+            gridView1.Name = "gridView1";
+            gridView1.OptionsSelection.EnableAppearanceFocusedCell = false;
+            gridView1.OptionsView.ShowGroupPanel = false;
             // 
             // txtAdja2Sat
             // 
-            this.txtAdja2Sat.Location = new System.Drawing.Point(333, 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(157, 20);
-            this.txtAdja2Sat.StyleController = this.layoutControl1;
-            this.txtAdja2Sat.TabIndex = 9;
+            txtAdja2Sat.Location = new System.Drawing.Point(340, 185);
+            txtAdja2Sat.Name = "txtAdja2Sat";
+            txtAdja2Sat.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
+            txtAdja2Sat.Properties.NullText = "";
+            txtAdja2Sat.Properties.PopupSizeable = false;
+            txtAdja2Sat.Properties.PopupView = gridView2;
+            txtAdja2Sat.Size = new System.Drawing.Size(162, 20);
+            txtAdja2Sat.StyleController = layoutControl1;
+            txtAdja2Sat.TabIndex = 6;
             // 
             // gridView2
             // 
-            this.gridView2.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
-            this.gridView2.Name = "gridView2";
-            this.gridView2.OptionsSelection.EnableAppearanceFocusedCell = false;
-            this.gridView2.OptionsView.ShowGroupPanel = false;
+            gridView2.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
+            gridView2.Name = "gridView2";
+            gridView2.OptionsSelection.EnableAppearanceFocusedCell = false;
+            gridView2.OptionsView.ShowGroupPanel = false;
             // 
             // txtTaskType
             // 
-            this.txtTaskType.EditValue = 0;
-            this.txtTaskType.Location = new System.Drawing.Point(262, 37);
-            this.txtTaskType.Name = "txtTaskType";
-            this.txtTaskType.Properties.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244)))));
-            this.txtTaskType.Properties.Appearance.Options.UseBackColor = true;
-            this.txtTaskType.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
-            this.txtTaskType.Properties.ColumnIndent = 3;
-            this.txtTaskType.Properties.Columns = 3;
-            this.txtTaskType.Size = new System.Drawing.Size(228, 27);
-            this.txtTaskType.StyleController = this.layoutControl1;
-            this.txtTaskType.TabIndex = 5;
-            this.txtTaskType.SelectedIndexChanged += new System.EventHandler(this.txtTaskType_SelectedIndexChanged);
-            // 
-            // txtCapDir
-            // 
-            this.txtCapDir.Location = new System.Drawing.Point(12, 226);
-            this.txtCapDir.Name = "txtCapDir";
-            this.txtCapDir.Properties.AutoHeight = false;
-            this.txtCapDir.Size = new System.Drawing.Size(237, 20);
-            this.txtCapDir.StyleController = this.layoutControl1;
-            this.txtCapDir.TabIndex = 4;
-            // 
-            // txtCapDirFormat
-            // 
-            this.txtCapDirFormat.EditValue = "yyyy_MM_dd_HH";
-            this.txtCapDirFormat.Location = new System.Drawing.Point(253, 226);
-            this.txtCapDirFormat.Name = "txtCapDirFormat";
-            this.txtCapDirFormat.Properties.AutoHeight = false;
-            this.txtCapDirFormat.Size = new System.Drawing.Size(237, 20);
-            this.txtCapDirFormat.StyleController = this.layoutControl1;
-            this.txtCapDirFormat.TabIndex = 13;
-            this.txtCapDirFormat.ToolTip = "没有子目录则不填";
+            txtTaskType.EditValue = 0;
+            txtTaskType.Location = new System.Drawing.Point(268, 37);
+            txtTaskType.Name = "txtTaskType";
+            txtTaskType.Properties.Appearance.BackColor = System.Drawing.Color.FromArgb(244, 244, 244);
+            txtTaskType.Properties.Appearance.Options.UseBackColor = true;
+            txtTaskType.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
+            txtTaskType.Properties.ColumnIndent = 3;
+            txtTaskType.Properties.Columns = 3;
+            txtTaskType.Size = new System.Drawing.Size(234, 27);
+            txtTaskType.StyleController = layoutControl1;
+            txtTaskType.TabIndex = 2;
+            txtTaskType.SelectedIndexChanged += txtTaskType_SelectedIndexChanged;
             // 
             // 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.itemCapDir,
-            this.itemCapDirFormat,
-            this.layoutControlItemAdja1,
-            this.layoutControlItemAdja2,
-            this.layoutControlGroup1,
-            this.layoutControlItem7});
-            this.Root.Name = "Root";
-            this.Root.Size = new System.Drawing.Size(502, 301);
-            this.Root.TextVisible = false;
+            Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
+            Root.GroupBordersVisible = false;
+            Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { emptySpaceItem1, layoutControlItem2, layoutControlItem3, layoutControlItem4, layoutControlItemAdja1, layoutControlItemAdja2, layoutControlGroup1, layoutControlItem7 });
+            Root.Name = "Root";
+            Root.Size = new System.Drawing.Size(514, 255);
+            Root.TextVisible = false;
             // 
             // emptySpaceItem1
             // 
-            this.emptySpaceItem1.AllowHotTrack = false;
-            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 238);
-            this.emptySpaceItem1.Name = "emptySpaceItem1";
-            this.emptySpaceItem1.Size = new System.Drawing.Size(272, 43);
-            this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
+            emptySpaceItem1.AllowHotTrack = false;
+            emptySpaceItem1.Location = new System.Drawing.Point(0, 197);
+            emptySpaceItem1.Name = "emptySpaceItem1";
+            emptySpaceItem1.Size = new System.Drawing.Size(284, 38);
+            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(482, 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(84, 14);
+            layoutControlItem2.Control = txtPosType;
+            layoutControlItem2.Location = new System.Drawing.Point(0, 56);
+            layoutControlItem2.MaxSize = new System.Drawing.Size(0, 100);
+            layoutControlItem2.MinSize = new System.Drawing.Size(54, 100);
+            layoutControlItem2.Name = "layoutControlItem2";
+            layoutControlItem2.Size = new System.Drawing.Size(494, 100);
+            layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            layoutControlItem2.Text = "定位模式";
+            layoutControlItem2.TextLocation = DevExpress.Utils.Locations.Top;
+            layoutControlItem2.TextSize = new System.Drawing.Size(48, 14);
             // 
             // layoutControlItem3
             // 
-            this.layoutControlItem3.Control = this.btnSave;
-            this.layoutControlItem3.Location = new System.Drawing.Point(382, 238);
-            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, 43);
-            this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem3.TextVisible = false;
+            layoutControlItem3.Control = btnSave;
+            layoutControlItem3.Location = new System.Drawing.Point(394, 197);
+            layoutControlItem3.MaxSize = new System.Drawing.Size(100, 37);
+            layoutControlItem3.MinSize = new System.Drawing.Size(100, 37);
+            layoutControlItem3.Name = "layoutControlItem3";
+            layoutControlItem3.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 2);
+            layoutControlItem3.Size = new System.Drawing.Size(100, 38);
+            layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
+            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(160, 41);
-            this.layoutControlItem4.Text = "主星";
-            this.layoutControlItem4.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem4.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, 197);
-            this.itemCapDir.MaxSize = new System.Drawing.Size(0, 41);
-            this.itemCapDir.MinSize = new System.Drawing.Size(118, 41);
-            this.itemCapDir.Name = "itemCapDir";
-            this.itemCapDir.Size = new System.Drawing.Size(241, 41);
-            this.itemCapDir.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.itemCapDir.Text = "采集文件目录";
-            this.itemCapDir.TextLocation = DevExpress.Utils.Locations.Top;
-            this.itemCapDir.TextSize = new System.Drawing.Size(84, 14);
-            // 
-            // itemCapDirFormat
-            // 
-            this.itemCapDirFormat.Control = this.txtCapDirFormat;
-            this.itemCapDirFormat.Location = new System.Drawing.Point(241, 197);
-            this.itemCapDirFormat.MaxSize = new System.Drawing.Size(0, 41);
-            this.itemCapDirFormat.MinSize = new System.Drawing.Size(88, 41);
-            this.itemCapDirFormat.Name = "itemCapDirFormat";
-            this.itemCapDirFormat.Size = new System.Drawing.Size(241, 41);
-            this.itemCapDirFormat.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.itemCapDirFormat.Text = "子目录日期格式";
-            this.itemCapDirFormat.TextLocation = DevExpress.Utils.Locations.Top;
-            this.itemCapDirFormat.TextSize = new System.Drawing.Size(84, 14);
+            layoutControlItem4.Control = txtMainSat;
+            layoutControlItem4.Location = new System.Drawing.Point(0, 156);
+            layoutControlItem4.Name = "layoutControlItem4";
+            layoutControlItem4.Size = new System.Drawing.Size(164, 41);
+            layoutControlItem4.Text = "主星";
+            layoutControlItem4.TextLocation = DevExpress.Utils.Locations.Top;
+            layoutControlItem4.TextSize = new System.Drawing.Size(48, 14);
             // 
             // layoutControlItemAdja1
             // 
-            this.layoutControlItemAdja1.Control = this.txtAdja1Sat;
-            this.layoutControlItemAdja1.Location = new System.Drawing.Point(160, 156);
-            this.layoutControlItemAdja1.Name = "layoutControlItemAdja1";
-            this.layoutControlItemAdja1.Size = new System.Drawing.Size(161, 41);
-            this.layoutControlItemAdja1.Text = "邻星1";
-            this.layoutControlItemAdja1.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItemAdja1.TextSize = new System.Drawing.Size(84, 14);
-            this.layoutControlItemAdja1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+            layoutControlItemAdja1.Control = txtAdja1Sat;
+            layoutControlItemAdja1.Location = new System.Drawing.Point(164, 156);
+            layoutControlItemAdja1.Name = "layoutControlItemAdja1";
+            layoutControlItemAdja1.Size = new System.Drawing.Size(164, 41);
+            layoutControlItemAdja1.Text = "邻星1";
+            layoutControlItemAdja1.TextLocation = DevExpress.Utils.Locations.Top;
+            layoutControlItemAdja1.TextSize = new System.Drawing.Size(48, 14);
+            layoutControlItemAdja1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
             // 
             // layoutControlItemAdja2
             // 
-            this.layoutControlItemAdja2.Control = this.txtAdja2Sat;
-            this.layoutControlItemAdja2.Location = new System.Drawing.Point(321, 156);
-            this.layoutControlItemAdja2.Name = "layoutControlItemAdja2";
-            this.layoutControlItemAdja2.Size = new System.Drawing.Size(161, 41);
-            this.layoutControlItemAdja2.Text = "邻星2";
-            this.layoutControlItemAdja2.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItemAdja2.TextSize = new System.Drawing.Size(84, 14);
-            this.layoutControlItemAdja2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+            layoutControlItemAdja2.Control = txtAdja2Sat;
+            layoutControlItemAdja2.Location = new System.Drawing.Point(328, 156);
+            layoutControlItemAdja2.Name = "layoutControlItemAdja2";
+            layoutControlItemAdja2.Size = new System.Drawing.Size(166, 41);
+            layoutControlItemAdja2.Text = "邻星2";
+            layoutControlItemAdja2.TextLocation = DevExpress.Utils.Locations.Top;
+            layoutControlItemAdja2.TextSize = new System.Drawing.Size(48, 14);
+            layoutControlItemAdja2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
             // 
             // layoutControlGroup1
             // 
-            this.layoutControlGroup1.GroupBordersVisible = false;
-            this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
-            this.layoutControlItem1,
-            this.layoutControlItem5});
-            this.layoutControlGroup1.Location = new System.Drawing.Point(0, 0);
-            this.layoutControlGroup1.Name = "layoutControlGroup1";
-            this.layoutControlGroup1.Size = new System.Drawing.Size(482, 56);
+            layoutControlGroup1.GroupBordersVisible = false;
+            layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem5 });
+            layoutControlGroup1.Location = new System.Drawing.Point(0, 0);
+            layoutControlGroup1.Name = "layoutControlGroup1";
+            layoutControlGroup1.Size = new System.Drawing.Size(494, 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(250, 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(84, 14);
+            layoutControlItem1.Control = txtTaskName;
+            layoutControlItem1.Location = new System.Drawing.Point(0, 0);
+            layoutControlItem1.MaxSize = new System.Drawing.Size(0, 56);
+            layoutControlItem1.MinSize = new System.Drawing.Size(118, 56);
+            layoutControlItem1.Name = "layoutControlItem1";
+            layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 12, 7);
+            layoutControlItem1.Size = new System.Drawing.Size(256, 56);
+            layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            layoutControlItem1.Text = "任务名称";
+            layoutControlItem1.TextLocation = DevExpress.Utils.Locations.Top;
+            layoutControlItem1.TextSize = new System.Drawing.Size(48, 14);
             // 
             // layoutControlItem5
             // 
-            this.layoutControlItem5.Control = this.txtTaskType;
-            this.layoutControlItem5.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem5.CustomizationFormText = "定位模式";
-            this.layoutControlItem5.Location = new System.Drawing.Point(250, 0);
-            this.layoutControlItem5.MinSize = new System.Drawing.Size(88, 37);
-            this.layoutControlItem5.Name = "layoutControlItem5";
-            this.layoutControlItem5.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 10, 2);
-            this.layoutControlItem5.Size = new System.Drawing.Size(232, 56);
-            this.layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.layoutControlItem5.Text = " ";
-            this.layoutControlItem5.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem5.TextSize = new System.Drawing.Size(84, 14);
+            layoutControlItem5.Control = txtTaskType;
+            layoutControlItem5.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
+            layoutControlItem5.CustomizationFormText = "定位模式";
+            layoutControlItem5.Location = new System.Drawing.Point(256, 0);
+            layoutControlItem5.MinSize = new System.Drawing.Size(88, 37);
+            layoutControlItem5.Name = "layoutControlItem5";
+            layoutControlItem5.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 10, 2);
+            layoutControlItem5.Size = new System.Drawing.Size(238, 56);
+            layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            layoutControlItem5.Text = " ";
+            layoutControlItem5.TextLocation = DevExpress.Utils.Locations.Top;
+            layoutControlItem5.TextSize = new System.Drawing.Size(48, 14);
             // 
             // layoutControlItem7
             // 
-            this.layoutControlItem7.Control = this.btnFreq;
-            this.layoutControlItem7.Location = new System.Drawing.Point(272, 238);
-            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, 43);
-            this.layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem7.TextVisible = false;
+            layoutControlItem7.Control = btnFreq;
+            layoutControlItem7.Location = new System.Drawing.Point(284, 197);
+            layoutControlItem7.MaxSize = new System.Drawing.Size(110, 37);
+            layoutControlItem7.MinSize = new System.Drawing.Size(110, 37);
+            layoutControlItem7.Name = "layoutControlItem7";
+            layoutControlItem7.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 12, 12, 2);
+            layoutControlItem7.Size = new System.Drawing.Size(110, 38);
+            layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
+            layoutControlItem7.TextVisible = false;
             // 
             // dxErrorProvider
             // 
-            this.dxErrorProvider.ContainerControl = this;
+            dxErrorProvider.ContainerControl = this;
             // 
             // TaskEditor
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(502, 301);
-            this.Controls.Add(this.layoutControl1);
-            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
-            this.Name = "TaskEditor";
-            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.txtTaskType.Properties)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtCapDir.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.itemCapDir)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.itemCapDirFormat)).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.layoutControlItem5)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
-            this.ResumeLayout(false);
-
+            AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
+            AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            ClientSize = new System.Drawing.Size(514, 255);
+            Controls.Add(layoutControl1);
+            FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+            Name = "TaskEditor";
+            Text = "TaskEditor";
+            Load += TaskEditor_Load;
+            ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit();
+            layoutControl1.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)txtTaskName.Properties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)txtPosType.Properties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)txtMainSat.Properties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)searchLookUpEdit1View).EndInit();
+            ((System.ComponentModel.ISupportInitialize)txtAdja1Sat.Properties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)gridView1).EndInit();
+            ((System.ComponentModel.ISupportInitialize)txtAdja2Sat.Properties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)gridView2).EndInit();
+            ((System.ComponentModel.ISupportInitialize)txtTaskType.Properties).EndInit();
+            ((System.ComponentModel.ISupportInitialize)Root).EndInit();
+            ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItemAdja1).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItemAdja2).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit();
+            ((System.ComponentModel.ISupportInitialize)dxErrorProvider).EndInit();
+            ResumeLayout(false);
         }
 
         #endregion
@@ -477,10 +399,6 @@
         private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider;
         private DevExpress.XtraEditors.RadioGroup txtTaskType;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
-        private DevExpress.XtraEditors.TextEdit txtCapDir;
-        private DevExpress.XtraLayout.LayoutControlItem itemCapDir;
-        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;

+ 24 - 52
DW5S.App/EditForms/TaskEditor.cs

@@ -26,22 +26,21 @@ using DW5S.Entity;
 using DW5S.Repostory;
 using Serilog;
 using DW5S.Service;
+using DW5S.ViewModel;
+using XdCxRhDW5S.ViewModel;
 
 namespace DW5S.App.EditForms
 {
     public partial class TaskEditor : DevExpress.XtraEditors.XtraForm
     {
-        
-        
-
-        public TaskInfo info;
-        public List<SigInfo> selectedItem = new List<SigInfo>();
+        public TaskViewModel info;
+        public List<SigViewModel> selectedItem = new List<SigViewModel>();
         public TaskEditor()
         {
             InitializeComponent();
             this.layoutControl1.UseDefault();
             this.Text = "添加任务";
-            info = new TaskInfo();
+            info = new TaskViewModel();
             this.StartPosition = FormStartPosition.CenterParent;
             //加载DW类型
             var values = Enum.GetValues(typeof(EnumPosType));
@@ -58,7 +57,7 @@ namespace DW5S.App.EditForms
             this.txtTaskType_SelectedIndexChanged(this, EventArgs.Empty);
         }
 
-        public TaskEditor(TaskInfo info, List<SigInfo> taskSigList)
+        public TaskEditor(TaskViewModel info, List<SigViewModel> taskSigList)
            : this()
         {
             this.Text = $"编辑任务[{info.TaskName}]";
@@ -69,24 +68,22 @@ namespace DW5S.App.EditForms
         private async void TaskEditor_Load(object sender, EventArgs e)
         {
             var unitOfWork = IocContainer.UnitOfWork;
-            var repsSat = unitOfWork.Of<SatInfo>();
-            var sats = await repsSat.GetAllAsync();
-            this.txtMainSat.UseDefault().SetData(sats.ToList(), displayField: nameof(SatInfo.Sat)).UseDoubleClickToSelectAll();
-            this.txtAdja1Sat.UseDefault().SetData(sats.ToList(), displayField: nameof(SatInfo.Sat)).UseDoubleClickToSelectAll();
-            this.txtAdja2Sat.UseDefault().SetData(sats.ToList(), displayField: nameof(SatInfo.Sat)).UseDoubleClickToSelectAll();
+            var sats = await unitOfWork.Of<SatInfo>().GetAllAsync();
+            var satList = sats.To<List<SatViewModel>>();
+            this.txtMainSat.UseDefault().SetData(satList, displayField: nameof(SatViewModel.Sat)).UseDoubleClickToSelectAll();
+            this.txtAdja1Sat.UseDefault().SetData(satList, displayField: nameof(SatViewModel.Sat)).UseDoubleClickToSelectAll();
+            this.txtAdja2Sat.UseDefault().SetData(satList, displayField: nameof(SatViewModel.Sat)).UseDoubleClickToSelectAll();
             if (this.Text.StartsWith("编辑任务") && info != null)
             {
-                var satMain = sats.FirstOrDefault(w => w.SatCode == info.MainSat);
-                var satAdja1 = sats.FirstOrDefault(w => w.SatCode == info.Adja1Sat);
-                var satAdja2 = sats.FirstOrDefault(w => w.SatCode == info.Adja2Sat);
+                var satMain = satList.FirstOrDefault(w => w.SatCode == info.MainSat);
+                var satAdja1 = satList.FirstOrDefault(w => w.SatCode == info.Adja1Sat);
+                var satAdja2 = satList.FirstOrDefault(w => w.SatCode == info.Adja2Sat);
                 this.txtTaskName.Text = info.TaskName;
                 this.txtPosType.SelectedIndex = (int)info.PosType;
                 this.txtTaskType.SelectedIndex = (int)info.TaskType;
                 this.txtMainSat.EditValue = satMain;
                 this.txtAdja1Sat.EditValue = satAdja1;
                 this.txtAdja2Sat.EditValue = satAdja2;
-                txtCapDir.Text = info.CapDir;
-                txtCapDirFormat.Text = info.CapDirFormat;
             }
         }
 
@@ -135,7 +132,7 @@ namespace DW5S.App.EditForms
                         return;
                     }
                 }
-                else if (posType == EnumPosType.X2D1 || posType == EnumPosType.X2D1NoRef )
+                else if (posType == EnumPosType.X2D1 || posType == EnumPosType.X2D1NoRef)
                 {
                     if (txtMainSat.EditValue == null)
                     {
@@ -153,28 +150,16 @@ namespace DW5S.App.EditForms
                         return;
                     }
                 }
-              
-                if ((EnumTaskType)txtTaskType.EditValue == EnumTaskType.History)//是历史任务
-                {
-                    if (string.IsNullOrWhiteSpace(txtCapDir.Text))
-                    {
-                        dxErrorProvider.SetError(txtCapDir, "请填写采集文件目录");
-                        return;
-                    }
-                }
                 info.TaskState = EnumTaskState.Stopped;
                 info.TaskName = txtTaskName.Text;
                 info.PosType = (EnumPosType)txtPosType.SelectedIndex;
-                info.MainSat = ((SatInfo)txtMainSat.EditValue).SatCode;
+                info.MainSat = ((SatViewModel)txtMainSat.EditValue).SatCode;
                 if (txtAdja1Sat.EditValue != null)
-                    info.Adja1Sat = ((SatInfo)txtAdja1Sat.EditValue).SatCode;
+                    info.Adja1Sat = ((SatViewModel)txtAdja1Sat.EditValue).SatCode;
                 if (txtAdja2Sat.EditValue != null)
-                    info.Adja2Sat = ((SatInfo)txtAdja2Sat.EditValue).SatCode;
+                    info.Adja2Sat = ((SatViewModel)txtAdja2Sat.EditValue).SatCode;
                 info.TaskType = (EnumTaskType)txtTaskType.SelectedIndex;
-                
-                    info.CapDir = txtCapDir.Text.Trim();
-                    info.CapDirFormat = txtCapDirFormat.Text.Trim();
-                
+
                 this.DialogResult = DialogResult.OK;
             }
             catch (Exception ex)
@@ -194,34 +179,21 @@ namespace DW5S.App.EditForms
                 layoutControlItemAdja1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
                 layoutControlItemAdja2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
             }
-            else if (posType == EnumPosType.X2D1)
+            else if (posType == EnumPosType.X2D1|| posType == EnumPosType.X2D1NoRef)
             {
                 layoutControlItemAdja1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
                 layoutControlItemAdja2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
                 this.layoutControlItemAdja1.Text = "邻星";
             }
-           
+
             this.layoutControl1.BestFit();
         }
 
         private void txtTaskType_SelectedIndexChanged(object sender, EventArgs e)
         {
-            //if ((EnumTaskType)txtTaskType.EditValue == EnumTaskType.Group)
-            //{
-            //    itemCapDir.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
-            //    itemCapDirFormat.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
-            //    if (this.Height >= 438)
-            //        this.Height -= 55;
-            //}
-            //else
-            //{
-                itemCapDir.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
-                itemCapDirFormat.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
-                //txtSignalType.Properties.Items.Remove(normal);//不要移除了
-                var a = this.Height;
-                if (this.Height < 438)
-                    this.Height += 55;
-           // }
+            var a = this.Height;
+            if (this.Height < 438)
+                this.Height += 55;
             this.layoutControl1.BestFit();
         }
 

+ 27 - 27
DW5S.App/EditForms/TaskEditor.resx

@@ -1,17 +1,17 @@
 <?xml version="1.0" encoding="utf-8"?>
 <root>
-  <!-- 
-    Microsoft ResX Schema 
-    
+  <!--
+    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 
+
+    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>
@@ -26,36 +26,36 @@
         <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 
+
+    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 
+
+    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 
+
+    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 
+
+    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 
+    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 
+    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 
+    value   : The object must be serialized into a byte array
             : using a System.ComponentModel.TypeConverter
             : and then encoded with base64 encoding.
     -->

+ 10 - 24
DW5S.App/EditForms/TaskEditorSignal.cs

@@ -28,26 +28,24 @@ using Serilog;
 using Serilog.Core;
 using Microsoft.EntityFrameworkCore;
 using DW5S.Service;
+using DW5S.ViewModel;
 
 namespace DW5S.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 TaskViewModel info;
+        public List<SigViewModel> listSigInfo = new List<SigViewModel>();
+        public List<SigViewModel> listSigInfoSelected = new List<SigViewModel>();
         public TaskEditorSignal()
         {
             InitializeComponent();
             this.Text = "任务信号选择";
-            info = new TaskInfo();
+            info = new TaskViewModel();
             this.StartPosition = FormStartPosition.CenterParent;
 
         }
-        public TaskEditorSignal(TaskInfo info, List<SigInfo> listSigInfoSelected)
+        public TaskEditorSignal(TaskViewModel info, List<SigViewModel> listSigInfoSelected)
            : this()
         {
             this.Text = $"任务[{info.TaskName}]信号选择";
@@ -66,15 +64,9 @@ namespace DW5S.App.EditForms
                 var fixedStations = await repsFixed.FindAsync(p => p.Enable);
 
                 var repsSig = unitOfWork.Of<SigInfo>();
-                var items = await repsSig.GetAllAsync(p => p.FreqUp);
-                listSigInfo.AddRange(items);
-                foreach (var item in listSigInfo)
-                {
-                    //if (fixedStations.Any(p => p.FreqUpHz == item.FreqUp))
-                    //    item.IsFixedStationFreq = "✔";
-                    //else
-                    //    item.IsFixedStationFreq = "✖";
-                }
+                var items = await repsSig.GetAllAsync(p => p.FreqDown);
+                listSigInfo.AddRange(items.To<List<SigViewModel>>());
+               
                 foreach (var item in listSigInfoSelected)
                 {
                     var selectedIdx = listSigInfo.FindIndex(p => p.Id == item.Id);
@@ -102,15 +94,9 @@ namespace DW5S.App.EditForms
             listSigInfoSelected.Clear();
             for (int i = 0; i < selectedRows.Count(); i++)
             {
-                var res = gridViewTaskSignal.GetRow(selectedRows[i]) as SigInfo;
+                var res = gridViewTaskSignal.GetRow(selectedRows[i]) as SigViewModel;
                 listSigInfoSelected.Add(res);
             }
-            //int count = listSigInfoSelected.Count(s => s.IsFixedStationFreq.Trim() == "✔".Trim());
-            //if (count >= 2)
-            //{
-            //    DxHelper.MsgBoxHelper.ShowError("只支持一个固定站频点");
-            //    return;
-            //}
             this.DialogResult = DialogResult.OK;
         }
 

+ 3 - 2
DW5S.App/EditForms/TaskHistoryTimeEditor.cs

@@ -15,6 +15,7 @@ using System.Windows.Forms;
 using DW5S.Entity;
 using DW5S.Repostory;
 using Serilog;
+using DW5S.ViewModel;
 
 namespace DW5S.App.EditForms
 {
@@ -23,7 +24,7 @@ namespace DW5S.App.EditForms
         static Dictionary<int, (DateTime, DateTime)> cache = new Dictionary<int, (DateTime, DateTime)>();
         public DateTime start;
         public DateTime end;
-        TaskInfo tsk;
+        TaskViewModel tsk;
         public TaskHistoryTimeEditor()
         {
             InitializeComponent();
@@ -32,7 +33,7 @@ namespace DW5S.App.EditForms
             this.txtEndTime.UseDefault().UseDoubleClickToSelectAll();
             this.StartPosition = FormStartPosition.CenterParent;
         }
-        public TaskHistoryTimeEditor(TaskInfo tsk)
+        public TaskHistoryTimeEditor(TaskViewModel tsk)
             : this()
         {
             this.tsk = tsk;

+ 35 - 54
DW5S.App/UserControl/CtrlHome.cs

@@ -1,47 +1,36 @@
 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;
 using DevExpress.XtraGrid.Views.Grid;
+using DW5S.App.EditForms;
+using DW5S.App.Model;
+using DW5S.App.PopupControl;
+using DW5S.DTO;
+using DW5S.Entity;
+using DW5S.KxcApi;
+using DW5S.Repostory;
+using DW5S.Service;
+using DW5S.ViewModel;
 using DxHelper;
 using ExtensionsDev;
+using Microsoft.EntityFrameworkCore;
 using System;
 using System.Collections.Generic;
-using System.Configuration;
-using System.Diagnostics;
 using System.Drawing;
 using System.Linq;
-using System.Net;
 using System.Threading;
 using System.Threading.Tasks;
-using System.Windows.Documents;
 using System.Windows.Forms;
-using DW5S.KxcApi;
-using DW5S.App.EditForms;
-using DW5S.App.Model;
-using DW5S.App.PopupControl;
-using DW5S.DTO;
-using DW5S.Entity;
-using DW5S.Repostory;
-using DW5S.WebApi;
-using static System.Windows.Forms.VisualStyles.VisualStyleElement.TextBox;
-using DW5S.Service;
-using Serilog;
-using System.Windows.Media.Media3D;
-using Microsoft.EntityFrameworkCore;
-using Serilog.Core;
-using DevExpress.CodeParser;
 
 namespace DW5S.App.UserControl
 {
     public partial class CtrlHome : DevExpress.XtraEditors.XtraUserControl
     {
-        List<TaskInfo> list = new List<TaskInfo>();
-        TaskInfo tsk;
+        List<TaskViewModel> list = new List<TaskViewModel>();
+        TaskViewModel tsk;
         List<CancellationTokenSource> listCts = new List<CancellationTokenSource>();
         Dictionary<int, CancellationTokenSource> dicCts = new Dictionary<int, CancellationTokenSource>();
         List<ModelPosRes> cache = new List<ModelPosRes>();//定位点缓存,最多1000条记录
@@ -139,21 +128,14 @@ namespace DW5S.App.UserControl
 
             try
             {
-                List<TxInfo> txList = new List<TxInfo>();
+
                 var repsTask = unitOfWork.Of<TaskInfo>();
+                await repsTask.UpdatePropAsync(p =>p.TaskState==EnumTaskState.Running, s => s.SetProperty(b => b.TaskState, EnumTaskState.Stopped));
+                await unitOfWork.SaveAsync();
+
                 var items = await repsTask.GetAllAsync(p => p.UpdateTime, false);
-                list.AddRange(items);
-                var runningList = items.Where(p => p.TaskState == EnumTaskState.Running);
-                foreach (var item in runningList)
-                {
-                    item.TaskState = EnumTaskState.Stopped;
-                    repsTask.AddOrUpdateAsync(item);
-                }
-                var repsSat = unitOfWork.Of<SatInfo>();
-                var satres = await repsSat.GetAllAsync(p => p.SatName);
-                var repsTx = unitOfWork.Of<TxInfo>();
-                var txres = await repsTx.GetAllAsync();
-                txList.AddRange(txres);
+                list.AddRange(items.To<List<TaskViewModel>>());
+
                 mapControl1.AddRectMenu<ModelPosRes>("删除定位点", SvgHelper.CreateClose(), async items => await DeletePosRes(items.ToList()))
                 .AddRectMenu<ModelPosRes>("使用镜像点", SvgHelper.CreateUseMirr(), async items => await UseMirr(items.ToList()))
                 .AddRectMenu<ModelPosRes>("编辑目标", SvgHelper.CreateEdit(), async items => await EditTarget(items.ToList()))
@@ -169,7 +151,7 @@ namespace DW5S.App.UserControl
                 DxHelper.MsgBoxHelper.ShowError(msg);
             }
 
-            gridView1.Columns[nameof(TaskInfo.TaskName)].AppearanceCell.TextOptions.HAlignment = HorzAlignment.Near;
+            gridView1.Columns[nameof(TaskViewModel.TaskName)].AppearanceCell.TextOptions.HAlignment = HorzAlignment.Near;
             this.svgImageCollection1.Add("Stopped", SvgHelper.CreateCycle("#1E8B58"));
             this.svgImageCollection1.Add("Running", SvgHelper.CreateCycle("#2E8B57"));
             gridView1.CustomDrawCell += GridView1_CustomDrawCell;
@@ -195,7 +177,7 @@ namespace DW5S.App.UserControl
                        {
                            continue;
                        }
-                       var currentTask = gridView1.GetFocusedRow() as TaskInfo;
+                       var currentTask = gridView1.GetFocusedRow() as TaskViewModel;
                        IQueryable<ModelPosRes> refreshQuery = null;
                        List<ModelPosRes> updateItems = null;
                        long? currentFreq = null;
@@ -320,7 +302,7 @@ namespace DW5S.App.UserControl
             listCts.Add(cts);
             mapControl1.DelFixedImg("Sat");
             mapControl1.DelFixedImg("Tx");
-            tsk = (e.Row as TaskInfo);
+            tsk = (e.Row as TaskViewModel);
             if (tsk == null) return;
             if (tsk.PosType == EnumPosType.X1D1CX )
             {
@@ -381,7 +363,7 @@ namespace DW5S.App.UserControl
         }
         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)
+            if (e.Column.FieldName == nameof(TaskViewModel.TaskName) && (EnumTaskState)gridView1.GetRowCellValue(e.RowHandle, nameof(TaskViewModel.TaskState)) == EnumTaskState.Running)
             {
                 var palette = SvgPaletteHelper.GetSvgPalette(this.LookAndFeel, ObjectState.Normal);
                 e.Cache.DrawSvgImage(svgImageCollection1[1], new Rectangle(new Point(e.Bounds.X + 4, e.Bounds.Y + (e.Bounds.Height - 16) / 2), new Size(16, 16)), palette);
@@ -396,7 +378,7 @@ namespace DW5S.App.UserControl
         private void gridView1_PopupMenuShowing(object sender, DevExpress.XtraGrid.Views.Grid.PopupMenuShowingEventArgs e)
         {
             if (gridView1.FocusedRowHandle < 0) return;
-            var state = (EnumTaskState)gridView1.GetFocusedRowCellValue(nameof(TaskInfo.TaskState));
+            var state = (EnumTaskState)gridView1.GetFocusedRowCellValue(nameof(TaskViewModel.TaskState));
             btnStart.Enabled = state == EnumTaskState.Stopped;
             btnStop.Enabled = state == EnumTaskState.Running;
             popupMenu1.ShowPopup(MousePosition);
@@ -445,9 +427,9 @@ namespace DW5S.App.UserControl
                 toolTipController1.HideHint();
                 return;
             }
-            if (hitInfo.Column.FieldName == nameof(TaskInfo.TaskName))
+            if (hitInfo.Column.FieldName == nameof(TaskViewModel.TaskName))
             {
-                var state = (EnumTaskState)gridView1.GetRowCellValue(hitInfo.RowHandle, nameof(TaskInfo.TaskState));
+                var state = (EnumTaskState)gridView1.GetRowCellValue(hitInfo.RowHandle, nameof(TaskViewModel.TaskState));
                 if (state == EnumTaskState.Running)
                     e.Info = new ToolTipControlInfo(hitInfo.RowHandle, "执行中");
             }
@@ -460,7 +442,7 @@ namespace DW5S.App.UserControl
             {
                 try
                 {
-                    TaskInfo addItem;
+                    TaskViewModel addItem;
                     TaskEditor frm = new TaskEditor();
                     if (frm.ShowDialog() != DialogResult.OK) return;
                     addItem = frm.info;
@@ -476,7 +458,8 @@ namespace DW5S.App.UserControl
                     }
                     var unitOfWork = IocContainer.UnitOfWork;
                     var repsTask = unitOfWork.Of<TaskInfo>();
-                    var taskInfo = await repsTask.AddOrUpdateAsync(addItem);
+                    var taskInfo = await repsTask.AddOrUpdateAsync(addItem.To<TaskInfo>());
+                    await unitOfWork.SaveAsync();
 
                     List<TaskSig> sigList = new List<TaskSig>();
                     foreach (var item in addItemSignal)
@@ -508,13 +491,13 @@ namespace DW5S.App.UserControl
             {
                 try
                 {
-                    var editItem = gridView1.GetFocusedRow() as TaskInfo;
+                    var editItem = gridView1.GetFocusedRow() as TaskViewModel;
                     if (editItem == null) return;
                     var unitOfWork = IocContainer.UnitOfWork;
                     var repsTaskSig = unitOfWork.Of<TaskSig>();
                     var sigs = await repsTaskSig.AsQueryable().Include(p => p.SigInfo).Where(p => p.TaskInfoID == editItem.Id).Select(p => p.SigInfo).ToListAsync();
-                    var repsSig = unitOfWork.Of<SigInfo>();
-                    TaskEditor frm = new TaskEditor(editItem, sigs);
+                    
+                    TaskEditor frm = new TaskEditor(editItem, sigs.To<List<SigViewModel>>());
                     if (frm.ShowDialog() != DialogResult.OK) return;
                     editItem = frm.info;
                     var editItemSig = frm.selectedItem;
@@ -529,9 +512,7 @@ namespace DW5S.App.UserControl
                     find.PosType = editItem.PosType;
                     find.UpdateTime = DateTime.Now;
                     find.MainSat = editItem.MainSat;
-                    find.CapDir = editItem.CapDir;
                     find.TaskType = editItem.TaskType;
-                    find.CapDirFormat = editItem.CapDirFormat;
                     find.TaskType = editItem.TaskType;
                     if (find.PosType == EnumPosType.X1D1CX)
                     {
@@ -577,7 +558,7 @@ namespace DW5S.App.UserControl
             {
                 try
                 {
-                    var tsk = gridView1.GetFocusedRow() as TaskInfo;
+                    var tsk = gridView1.GetFocusedRow() as TaskViewModel;
                     if (tsk == null) return;
                     if (!DxHelper.MsgBoxHelper.ShowConfirm($"删除任务[{tsk.TaskName}]?"))
                         return;
@@ -602,7 +583,7 @@ namespace DW5S.App.UserControl
 
         private async void btn_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
         {
-            var tsk = gridView1.GetFocusedRow() as TaskInfo;
+            var tsk = gridView1.GetFocusedRow() as TaskViewModel;
             var unitOfWork = IocContainer.UnitOfWork;
             var repsTask = unitOfWork.Of<TaskInfo>();
             var repsTaskSig = unitOfWork.Of<TaskSig>();
@@ -666,12 +647,12 @@ namespace DW5S.App.UserControl
                                 AdjaSatCode = tsk.Adja1Sat.Value,
                                 ID = tsk.Id,
                                 TaskName = tsk.TaskName,
-                                CapDir = tsk.CapDir,
+                                CapDir ="",
                                 CapLon = tx.Lon,
                                 CapLat = tx.Lat,
                                 CdbLon = cdb.Lon,
                                 CdbLat = cdb.Lat,
-                                DateDirFormat = tsk.CapDirFormat,
+                                DateDirFormat ="",
                                 Sigs = tskSigsDto,
                                 ForTest = AppConfigHelper.Get("ForTest", false)
                             };

+ 11 - 0
DW5S.Entity/EntityEnum.cs

@@ -28,6 +28,17 @@ namespace DW5S.Entity
         History
     }
     /// <summary>
+    /// 任务来源类型
+    /// </summary>
+    public enum TaskSourceType
+    {
+        [Display(Name = "本地创建")]
+        LocalSource,
+
+        [Display(Name = "外部系统")]
+        ExternalSystem,
+    }
+    /// <summary>
     /// 任务定位类型
     /// </summary>
     public enum EnumPosType

+ 5 - 9
DW5S.Entity/TaskInfo.cs

@@ -15,6 +15,11 @@
         /// </summary>
         public string TaskName { get; set; }
 
+        /// <summary>
+        /// 任务来源类型
+        /// </summary>
+        public TaskSourceType TaskSourceType { get; set; }
+
         /// <summary>
         /// 任务类型
         /// </summary>
@@ -40,14 +45,5 @@
         /// </summary>
         public int? Adja2Sat { get; set; }
 
-        /// <summary>
-        /// 历史任务采集文件的目录
-        /// </summary>
-        public string CapDir { get; set; }
-
-        /// <summary>
-        /// 历史任务采集文件的目录日期格式
-        /// </summary>
-        public string CapDirFormat { get; set; }
     }
 }

+ 15 - 0
DW5S.Entity/TaskSig.cs

@@ -38,5 +38,20 @@ namespace DW5S.Entity
         /// 下行频点(Hz)(防止信号被删除的冗余字段)
         /// </summary>
         public long FreqDown { get; set; }
+
+        /// <summary>
+        /// 时差中心(s)
+        /// </summary>
+        public float DtoCenter { get; set; }
+        /// <summary>
+        /// 时差范围 Hz
+        /// </summary>
+        public int DtoRange { get; set; }
+
+        /// <summary>
+        /// 信噪比
+        /// </summary>
+        public int Snr { get; set; }
+
     }
 }

+ 63 - 0
DW5S.ViewModel/TaskSigViewModel.cs

@@ -0,0 +1,63 @@
+using DW5S.Entity;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DW5S.ViewModel
+{
+
+    /// <summary>
+    /// 任务信号
+    /// </summary>
+    public class TaskSigViewModel : BaseViewModel<int>
+    {
+        /// <summary>
+        /// 任务编号
+        /// </summary>
+        [Display(Name = "任务编号",AutoGenerateFilter =false)]
+        public int TaskInfoID { get; set; }
+
+        public virtual TaskInfo TaskInfo { get; set; }
+
+        /// <summary>
+        /// 信号编号
+        /// </summary>
+        [Display(Name = "信号编号", AutoGenerateFilter = false)]
+        public int SigInfoID { get; set; }
+
+        public virtual SigInfo SigInfo { get; set; }
+
+        /// <summary>
+        /// 上行频点(Hz)(防止信号被删除的冗余字段)
+        /// </summary>
+        [Display(Name = "上行频点(Hz)")]
+        public long FreqUp { get; set; }
+
+        /// <summary>
+        /// 下行频点(Hz)(防止信号被删除的冗余字段)
+        /// </summary>
+        [Display(Name = "下行频点(Hz)")]
+        public long FreqDown { get; set; }
+        /// <summary>
+        /// 时差中心(s)
+        /// </summary>
+        [Display(Name = "时差中心(s)")]
+        public float DtoCenter { get; set; }
+        /// <summary>
+        /// 时差范围 Hz
+        /// </summary>
+        [Display(Name = "时差范围(Hz)")]
+        public int DtoRange { get; set; }
+        /// <summary>
+        /// 信噪比
+        /// </summary>
+        [Display(Name = "信噪比(dB)")]
+        public int Snr { get; set; }
+
+    }
+}

+ 40 - 0
DW5S.ViewModel/TaskViewModel.cs

@@ -0,0 +1,40 @@
+using DW5S.Entity;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace DW5S.ViewModel
+{
+    public class TaskViewModel : BaseViewModel<int>
+    {
+        [Display(Name = "任务状态", AutoGenerateField = false)]
+        public EnumTaskState TaskState { get; set; } = EnumTaskState.Stopped;
+
+        [Required]
+        [Display(Name = "任务名称")]
+        public string TaskName { get; set; }
+        /// <summary>
+        /// 任务来源类型
+        /// </summary>
+        [Display(Name = "任务来源类型")]
+        public TaskSourceType TaskSourceType { get; set; }
+        /// <summary>
+        /// 任务类型
+        /// </summary>
+        [Display(Name = "任务类型")]
+        public EnumTaskType TaskType { get; set; }
+
+        [Display(Name = "定位类型")]
+        public EnumPosType PosType { get; set; }
+
+        [Display(Name = "主星", AutoGenerateField = false)]
+        public int MainSat { get; set; }
+
+        [Display(Name = "邻星1", AutoGenerateField = false)]
+        public int? Adja1Sat { get; set; }
+
+        [Display(Name = "邻星2", AutoGenerateField = false)]
+        public int? Adja2Sat { get; set; }
+
+
+    }
+}