Kaynağa Gözat

Merge branch 'master' of http://139.155.15.221:3000/gongqiuhong/DataSimulation

wyq 1 yıl önce
ebeveyn
işleme
6e67f435e2

+ 9 - 0
DataSimulation.Forms/DataSimulation.Forms.csproj

@@ -177,6 +177,12 @@
     </Compile>
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="UserControl\CtrlHistoryTask.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="UserControl\CtrlHistoryTask.Designer.cs">
+      <DependentUpon>CtrlHistoryTask.cs</DependentUpon>
+    </Compile>
     <Compile Include="UserControl\CtrlRef.cs">
       <SubType>UserControl</SubType>
     </Compile>
@@ -232,6 +238,9 @@
       <AutoGen>True</AutoGen>
       <DependentUpon>Resources.resx</DependentUpon>
     </Compile>
+    <EmbeddedResource Include="UserControl\CtrlHistoryTask.resx">
+      <DependentUpon>CtrlHistoryTask.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="UserControl\CtrlRef.resx">
       <DependentUpon>CtrlRef.cs</DependentUpon>
     </EmbeddedResource>

+ 289 - 241
DataSimulation.Forms/EditForms/TaskEditor.Designer.cs

@@ -29,88 +29,95 @@
         private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
-            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions3 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject9 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject10 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject11 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject12 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions3 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject9 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject10 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject11 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject12 = new DevExpress.Utils.SerializableAppearanceObject();
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
-            this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
+            this.mapControl = new DevExpress.XtraMap.MapControl();
+            this.btnSave = new DevExpress.XtraEditors.SimpleButton();
+            this.btnSaveOther = new DevExpress.XtraEditors.SimpleButton();
+            this.txtSpeed = new DevExpress.XtraEditors.ButtonEdit();
+            this.txtBand = new DevExpress.XtraEditors.ButtonEdit();
+            this.txtFreqUp = new DevExpress.XtraEditors.ButtonEdit();
+            this.txtRefStation = new DevExpress.XtraEditors.ImageComboBoxEdit();
+            this.txtTx = new DevExpress.XtraEditors.ImageComboBoxEdit();
+            this.txtAdjaSat2 = new DevExpress.XtraEditors.SearchLookUpEdit();
+            this.searchLookUpEdit3View = new DevExpress.XtraGrid.Views.Grid.GridView();
+            this.txtAdjaSat1 = new DevExpress.XtraEditors.SearchLookUpEdit();
+            this.searchLookUpEdit2View = new DevExpress.XtraGrid.Views.Grid.GridView();
+            this.txtMainSat = new DevExpress.XtraEditors.SearchLookUpEdit();
+            this.searchLookUpEdit1View = new DevExpress.XtraGrid.Views.Grid.GridView();
+            this.radioSimulationType = new DevExpress.XtraEditors.RadioGroup();
             this.txtTaskName = new DevExpress.XtraEditors.TextEdit();
+            this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
             this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
-            this.radioSimulationType = new DevExpress.XtraEditors.RadioGroup();
             this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.txtMainSat = new DevExpress.XtraEditors.SearchLookUpEdit();
             this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.searchLookUpEdit1View = new DevExpress.XtraGrid.Views.Grid.GridView();
-            this.txtAdjaSat1 = new DevExpress.XtraEditors.SearchLookUpEdit();
             this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.searchLookUpEdit2View = new DevExpress.XtraGrid.Views.Grid.GridView();
-            this.txtAdjaSat2 = new DevExpress.XtraEditors.SearchLookUpEdit();
             this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.searchLookUpEdit3View = new DevExpress.XtraGrid.Views.Grid.GridView();
-            this.txtTx = new DevExpress.XtraEditors.ImageComboBoxEdit();
             this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.txtRefStation = new DevExpress.XtraEditors.ImageComboBoxEdit();
-            this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.txtFreqUp = new DevExpress.XtraEditors.ButtonEdit();
             this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.txtBand = new DevExpress.XtraEditors.ButtonEdit();
             this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.txtSpeed = new DevExpress.XtraEditors.ButtonEdit();
             this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.btnSaveOther = new DevExpress.XtraEditors.SimpleButton();
+            this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.btnSave = new DevExpress.XtraEditors.SimpleButton();
             this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem();
             this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
+            this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem();
             this.dxErrorProvider = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components);
+            this.splitterItem1 = new DevExpress.XtraLayout.SplitterItem();
+            this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.mapControl)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtSpeed.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtBand.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtFreqUp.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtRefStation.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtTx.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtAdjaSat2.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit3View)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtAdjaSat1.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit2View)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtMainSat.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.radioSimulationType.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtTaskName.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.radioSimulationType.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtMainSat.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtAdjaSat1.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit2View)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtAdjaSat2.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit3View)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtTx.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtRefStation.Properties)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtFreqUp.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtBand.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtSpeed.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.splitterItem1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
             // 
+            this.layoutControl1.Controls.Add(this.mapControl);
             this.layoutControl1.Controls.Add(this.btnSave);
             this.layoutControl1.Controls.Add(this.btnSaveOther);
             this.layoutControl1.Controls.Add(this.txtSpeed);
@@ -127,316 +134,351 @@
             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(403, 450);
+            this.layoutControl1.Size = new System.Drawing.Size(1189, 509);
             this.layoutControl1.TabIndex = 0;
             this.layoutControl1.Text = "layoutControl1";
             // 
+            // mapControl
+            // 
+            this.mapControl.Location = new System.Drawing.Point(304, 12);
+            this.mapControl.Name = "mapControl";
+            this.mapControl.Size = new System.Drawing.Size(873, 485);
+            this.mapControl.TabIndex = 16;
+            // 
+            // btnSave
+            // 
+            this.btnSave.Location = new System.Drawing.Point(256, 475);
+            this.btnSave.Name = "btnSave";
+            this.btnSave.Size = new System.Drawing.Size(34, 22);
+            this.btnSave.StyleController = this.layoutControl1;
+            this.btnSave.TabIndex = 15;
+            this.btnSave.Text = "保存";
+            this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
+            // 
+            // btnSaveOther
+            // 
+            this.btnSaveOther.Location = new System.Drawing.Point(217, 475);
+            this.btnSaveOther.Name = "btnSaveOther";
+            this.btnSaveOther.Size = new System.Drawing.Size(35, 22);
+            this.btnSaveOther.StyleController = this.layoutControl1;
+            this.btnSaveOther.TabIndex = 14;
+            this.btnSaveOther.Text = "另存";
+            this.btnSaveOther.Visible = false;
+            this.btnSaveOther.Click += new System.EventHandler(this.btnSaveOther_Click);
+            // 
+            // txtSpeed
+            // 
+            this.txtSpeed.Location = new System.Drawing.Point(12, 423);
+            this.txtSpeed.Name = "txtSpeed";
+            this.txtSpeed.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "m/s", -1, false, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            this.txtSpeed.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
+            this.txtSpeed.Properties.MaskSettings.Set("mask", "f3");
+            this.txtSpeed.Size = new System.Drawing.Size(278, 23);
+            this.txtSpeed.StyleController = this.layoutControl1;
+            this.txtSpeed.TabIndex = 13;
+            // 
+            // txtBand
+            // 
+            this.txtBand.Location = new System.Drawing.Point(12, 379);
+            this.txtBand.Name = "txtBand";
+            this.txtBand.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            this.txtBand.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
+            this.txtBand.Properties.MaskSettings.Set("mask", "f3");
+            this.txtBand.Size = new System.Drawing.Size(278, 23);
+            this.txtBand.StyleController = this.layoutControl1;
+            this.txtBand.TabIndex = 12;
+            // 
+            // txtFreqUp
+            // 
+            this.txtFreqUp.Location = new System.Drawing.Point(12, 335);
+            this.txtFreqUp.Name = "txtFreqUp";
+            this.txtFreqUp.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -1, false, true, false, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            this.txtFreqUp.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
+            this.txtFreqUp.Properties.MaskSettings.Set("mask", "f3");
+            this.txtFreqUp.Size = new System.Drawing.Size(278, 23);
+            this.txtFreqUp.StyleController = this.layoutControl1;
+            this.txtFreqUp.TabIndex = 11;
+            // 
+            // txtRefStation
+            // 
+            this.txtRefStation.Location = new System.Drawing.Point(12, 294);
+            this.txtRefStation.Name = "txtRefStation";
+            this.txtRefStation.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.txtRefStation.Size = new System.Drawing.Size(278, 20);
+            this.txtRefStation.StyleController = this.layoutControl1;
+            this.txtRefStation.TabIndex = 10;
+            // 
+            // txtTx
+            // 
+            this.txtTx.Location = new System.Drawing.Point(12, 253);
+            this.txtTx.Name = "txtTx";
+            this.txtTx.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.txtTx.Size = new System.Drawing.Size(278, 20);
+            this.txtTx.StyleController = this.layoutControl1;
+            this.txtTx.TabIndex = 9;
+            // 
+            // txtAdjaSat2
+            // 
+            this.txtAdjaSat2.Location = new System.Drawing.Point(12, 212);
+            this.txtAdjaSat2.Name = "txtAdjaSat2";
+            this.txtAdjaSat2.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.txtAdjaSat2.Properties.PopupView = this.searchLookUpEdit3View;
+            this.txtAdjaSat2.Size = new System.Drawing.Size(278, 20);
+            this.txtAdjaSat2.StyleController = this.layoutControl1;
+            this.txtAdjaSat2.TabIndex = 8;
+            // 
+            // searchLookUpEdit3View
+            // 
+            this.searchLookUpEdit3View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
+            this.searchLookUpEdit3View.Name = "searchLookUpEdit3View";
+            this.searchLookUpEdit3View.OptionsSelection.EnableAppearanceFocusedCell = false;
+            this.searchLookUpEdit3View.OptionsView.ShowGroupPanel = false;
+            // 
+            // txtAdjaSat1
+            // 
+            this.txtAdjaSat1.Location = new System.Drawing.Point(12, 171);
+            this.txtAdjaSat1.Name = "txtAdjaSat1";
+            this.txtAdjaSat1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.txtAdjaSat1.Properties.PopupView = this.searchLookUpEdit2View;
+            this.txtAdjaSat1.Size = new System.Drawing.Size(278, 20);
+            this.txtAdjaSat1.StyleController = this.layoutControl1;
+            this.txtAdjaSat1.TabIndex = 7;
+            // 
+            // searchLookUpEdit2View
+            // 
+            this.searchLookUpEdit2View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
+            this.searchLookUpEdit2View.Name = "searchLookUpEdit2View";
+            this.searchLookUpEdit2View.OptionsSelection.EnableAppearanceFocusedCell = false;
+            this.searchLookUpEdit2View.OptionsView.ShowGroupPanel = false;
+            // 
+            // txtMainSat
+            // 
+            this.txtMainSat.Location = new System.Drawing.Point(12, 130);
+            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.PopupView = this.searchLookUpEdit1View;
+            this.txtMainSat.Size = new System.Drawing.Size(278, 20);
+            this.txtMainSat.StyleController = this.layoutControl1;
+            this.txtMainSat.TabIndex = 6;
+            // 
+            // searchLookUpEdit1View
+            // 
+            this.searchLookUpEdit1View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
+            this.searchLookUpEdit1View.Name = "searchLookUpEdit1View";
+            this.searchLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = false;
+            this.searchLookUpEdit1View.OptionsView.ShowGroupPanel = false;
+            // 
+            // radioSimulationType
+            // 
+            this.radioSimulationType.Location = new System.Drawing.Point(12, 70);
+            this.radioSimulationType.Name = "radioSimulationType";
+            this.radioSimulationType.Size = new System.Drawing.Size(278, 39);
+            this.radioSimulationType.StyleController = this.layoutControl1;
+            this.radioSimulationType.TabIndex = 5;
+            // 
+            // txtTaskName
+            // 
+            this.txtTaskName.Location = new System.Drawing.Point(12, 29);
+            this.txtTaskName.Name = "txtTaskName";
+            this.txtTaskName.Size = new System.Drawing.Size(278, 20);
+            this.txtTaskName.StyleController = this.layoutControl1;
+            this.txtTaskName.TabIndex = 4;
+            // 
             // Root
             // 
             this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
             this.Root.GroupBordersVisible = false;
             this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
             this.layoutControlItem1,
-            this.emptySpaceItem1,
             this.layoutControlItem2,
             this.layoutControlItem3,
             this.layoutControlItem4,
             this.layoutControlItem5,
             this.layoutControlItem6,
             this.layoutControlItem8,
-            this.layoutControlItem9,
-            this.layoutControlItem10,
-            this.layoutControlItem7,
             this.layoutControlItem11,
             this.layoutControlItem12,
+            this.layoutControlItem13,
+            this.layoutControlItem7,
+            this.layoutControlItem9,
+            this.layoutControlItem10,
+            this.splitterItem1,
+            this.emptySpaceItem1,
             this.emptySpaceItem2});
             this.Root.Name = "Root";
-            this.Root.Size = new System.Drawing.Size(403, 450);
+            this.Root.Size = new System.Drawing.Size(1189, 509);
             this.Root.TextVisible = false;
             // 
-            // txtTaskName
-            // 
-            this.txtTaskName.Location = new System.Drawing.Point(12, 29);
-            this.txtTaskName.Name = "txtTaskName";
-            this.txtTaskName.Size = new System.Drawing.Size(379, 20);
-            this.txtTaskName.StyleController = this.layoutControl1;
-            this.txtTaskName.TabIndex = 4;
-            // 
             // layoutControlItem1
             // 
             this.layoutControlItem1.Control = this.txtTaskName;
             this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
             this.layoutControlItem1.Name = "layoutControlItem1";
-            this.layoutControlItem1.Size = new System.Drawing.Size(383, 41);
+            this.layoutControlItem1.Size = new System.Drawing.Size(282, 41);
             this.layoutControlItem1.Text = "任务名称";
             this.layoutControlItem1.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem1.TextSize = new System.Drawing.Size(48, 14);
             // 
-            // emptySpaceItem1
-            // 
-            this.emptySpaceItem1.AllowHotTrack = false;
-            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 338);
-            this.emptySpaceItem1.Name = "emptySpaceItem1";
-            this.emptySpaceItem1.Size = new System.Drawing.Size(383, 92);
-            this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
-            // 
-            // radioSimulationType
-            // 
-            this.radioSimulationType.Location = new System.Drawing.Point(12, 70);
-            this.radioSimulationType.Name = "radioSimulationType";
-            this.radioSimulationType.Size = new System.Drawing.Size(379, 42);
-            this.radioSimulationType.StyleController = this.layoutControl1;
-            this.radioSimulationType.TabIndex = 5;
-            // 
             // layoutControlItem2
             // 
             this.layoutControlItem2.Control = this.radioSimulationType;
             this.layoutControlItem2.Location = new System.Drawing.Point(0, 41);
             this.layoutControlItem2.MinSize = new System.Drawing.Size(54, 60);
             this.layoutControlItem2.Name = "layoutControlItem2";
-            this.layoutControlItem2.Size = new System.Drawing.Size(383, 63);
+            this.layoutControlItem2.Size = new System.Drawing.Size(282, 60);
             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);
             // 
-            // txtMainSat
-            // 
-            this.txtMainSat.Location = new System.Drawing.Point(12, 133);
-            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.PopupView = this.searchLookUpEdit1View;
-            this.txtMainSat.Size = new System.Drawing.Size(379, 20);
-            this.txtMainSat.StyleController = this.layoutControl1;
-            this.txtMainSat.TabIndex = 6;
-            // 
             // layoutControlItem3
             // 
             this.layoutControlItem3.Control = this.txtMainSat;
-            this.layoutControlItem3.Location = new System.Drawing.Point(0, 104);
+            this.layoutControlItem3.Location = new System.Drawing.Point(0, 101);
             this.layoutControlItem3.Name = "layoutControlItem3";
-            this.layoutControlItem3.Size = new System.Drawing.Size(383, 41);
+            this.layoutControlItem3.Size = new System.Drawing.Size(282, 41);
             this.layoutControlItem3.Text = "主星";
             this.layoutControlItem3.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem3.TextSize = new System.Drawing.Size(48, 14);
             // 
-            // searchLookUpEdit1View
-            // 
-            this.searchLookUpEdit1View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
-            this.searchLookUpEdit1View.Name = "searchLookUpEdit1View";
-            this.searchLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = false;
-            this.searchLookUpEdit1View.OptionsView.ShowGroupPanel = false;
-            // 
-            // txtAdjaSat1
-            // 
-            this.txtAdjaSat1.Location = new System.Drawing.Point(12, 174);
-            this.txtAdjaSat1.Name = "txtAdjaSat1";
-            this.txtAdjaSat1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
-            this.txtAdjaSat1.Properties.PopupView = this.searchLookUpEdit2View;
-            this.txtAdjaSat1.Size = new System.Drawing.Size(379, 20);
-            this.txtAdjaSat1.StyleController = this.layoutControl1;
-            this.txtAdjaSat1.TabIndex = 7;
-            // 
             // layoutControlItem4
             // 
             this.layoutControlItem4.Control = this.txtAdjaSat1;
-            this.layoutControlItem4.Location = new System.Drawing.Point(0, 145);
+            this.layoutControlItem4.Location = new System.Drawing.Point(0, 142);
             this.layoutControlItem4.Name = "layoutControlItem4";
-            this.layoutControlItem4.Size = new System.Drawing.Size(383, 41);
+            this.layoutControlItem4.Size = new System.Drawing.Size(282, 41);
             this.layoutControlItem4.Text = "邻星1";
             this.layoutControlItem4.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem4.TextSize = new System.Drawing.Size(48, 14);
             // 
-            // searchLookUpEdit2View
-            // 
-            this.searchLookUpEdit2View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
-            this.searchLookUpEdit2View.Name = "searchLookUpEdit2View";
-            this.searchLookUpEdit2View.OptionsSelection.EnableAppearanceFocusedCell = false;
-            this.searchLookUpEdit2View.OptionsView.ShowGroupPanel = false;
-            // 
-            // txtAdjaSat2
-            // 
-            this.txtAdjaSat2.Location = new System.Drawing.Point(12, 215);
-            this.txtAdjaSat2.Name = "txtAdjaSat2";
-            this.txtAdjaSat2.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
-            this.txtAdjaSat2.Properties.PopupView = this.searchLookUpEdit3View;
-            this.txtAdjaSat2.Size = new System.Drawing.Size(379, 20);
-            this.txtAdjaSat2.StyleController = this.layoutControl1;
-            this.txtAdjaSat2.TabIndex = 8;
-            // 
             // layoutControlItem5
             // 
             this.layoutControlItem5.Control = this.txtAdjaSat2;
-            this.layoutControlItem5.Location = new System.Drawing.Point(0, 186);
+            this.layoutControlItem5.Location = new System.Drawing.Point(0, 183);
             this.layoutControlItem5.Name = "layoutControlItem5";
-            this.layoutControlItem5.Size = new System.Drawing.Size(383, 41);
+            this.layoutControlItem5.Size = new System.Drawing.Size(282, 41);
             this.layoutControlItem5.Text = "邻星2";
             this.layoutControlItem5.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem5.TextSize = new System.Drawing.Size(48, 14);
             // 
-            // searchLookUpEdit3View
-            // 
-            this.searchLookUpEdit3View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
-            this.searchLookUpEdit3View.Name = "searchLookUpEdit3View";
-            this.searchLookUpEdit3View.OptionsSelection.EnableAppearanceFocusedCell = false;
-            this.searchLookUpEdit3View.OptionsView.ShowGroupPanel = false;
-            // 
-            // txtTx
-            // 
-            this.txtTx.Location = new System.Drawing.Point(12, 256);
-            this.txtTx.Name = "txtTx";
-            this.txtTx.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
-            this.txtTx.Size = new System.Drawing.Size(187, 20);
-            this.txtTx.StyleController = this.layoutControl1;
-            this.txtTx.TabIndex = 9;
-            // 
             // layoutControlItem6
             // 
             this.layoutControlItem6.Control = this.txtTx;
-            this.layoutControlItem6.Location = new System.Drawing.Point(0, 227);
+            this.layoutControlItem6.Location = new System.Drawing.Point(0, 224);
             this.layoutControlItem6.Name = "layoutControlItem6";
-            this.layoutControlItem6.Size = new System.Drawing.Size(191, 41);
+            this.layoutControlItem6.Size = new System.Drawing.Size(282, 41);
             this.layoutControlItem6.Text = "天线";
             this.layoutControlItem6.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem6.TextSize = new System.Drawing.Size(48, 14);
             // 
-            // txtRefStation
-            // 
-            this.txtRefStation.Location = new System.Drawing.Point(203, 256);
-            this.txtRefStation.Name = "txtRefStation";
-            this.txtRefStation.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
-            this.txtRefStation.Size = new System.Drawing.Size(188, 20);
-            this.txtRefStation.StyleController = this.layoutControl1;
-            this.txtRefStation.TabIndex = 10;
-            // 
-            // layoutControlItem7
-            // 
-            this.layoutControlItem7.Control = this.txtRefStation;
-            this.layoutControlItem7.Location = new System.Drawing.Point(191, 227);
-            this.layoutControlItem7.Name = "layoutControlItem7";
-            this.layoutControlItem7.Size = new System.Drawing.Size(192, 41);
-            this.layoutControlItem7.Text = "参考站";
-            this.layoutControlItem7.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem7.TextSize = new System.Drawing.Size(48, 14);
-            // 
-            // txtFreqUp
-            // 
-            this.txtFreqUp.Location = new System.Drawing.Point(12, 297);
-            this.txtFreqUp.Name = "txtFreqUp";
-            this.txtFreqUp.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
-            this.txtFreqUp.Size = new System.Drawing.Size(124, 23);
-            this.txtFreqUp.StyleController = this.layoutControl1;
-            this.txtFreqUp.TabIndex = 11;
-            // 
             // layoutControlItem8
             // 
             this.layoutControlItem8.Control = this.txtFreqUp;
-            this.layoutControlItem8.Location = new System.Drawing.Point(0, 268);
+            this.layoutControlItem8.Location = new System.Drawing.Point(0, 306);
             this.layoutControlItem8.Name = "layoutControlItem8";
-            this.layoutControlItem8.Size = new System.Drawing.Size(128, 44);
+            this.layoutControlItem8.Size = new System.Drawing.Size(282, 44);
             this.layoutControlItem8.Text = "上行频点";
             this.layoutControlItem8.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem8.TextSize = new System.Drawing.Size(48, 14);
             // 
-            // txtBand
-            // 
-            this.txtBand.Location = new System.Drawing.Point(140, 297);
-            this.txtBand.Name = "txtBand";
-            this.txtBand.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
-            this.txtBand.Size = new System.Drawing.Size(123, 23);
-            this.txtBand.StyleController = this.layoutControl1;
-            this.txtBand.TabIndex = 12;
-            // 
             // layoutControlItem9
             // 
             this.layoutControlItem9.Control = this.txtBand;
-            this.layoutControlItem9.Location = new System.Drawing.Point(128, 268);
+            this.layoutControlItem9.Location = new System.Drawing.Point(0, 350);
             this.layoutControlItem9.Name = "layoutControlItem9";
-            this.layoutControlItem9.Size = new System.Drawing.Size(127, 44);
+            this.layoutControlItem9.Size = new System.Drawing.Size(282, 44);
             this.layoutControlItem9.Text = "信号带宽";
             this.layoutControlItem9.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem9.TextSize = new System.Drawing.Size(48, 14);
             // 
-            // txtSpeed
-            // 
-            this.txtSpeed.Location = new System.Drawing.Point(267, 297);
-            this.txtSpeed.Name = "txtSpeed";
-            this.txtSpeed.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "m/s", -1, false, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
-            this.txtSpeed.Size = new System.Drawing.Size(124, 23);
-            this.txtSpeed.StyleController = this.layoutControl1;
-            this.txtSpeed.TabIndex = 13;
-            // 
             // layoutControlItem10
             // 
             this.layoutControlItem10.Control = this.txtSpeed;
-            this.layoutControlItem10.Location = new System.Drawing.Point(255, 268);
+            this.layoutControlItem10.Location = new System.Drawing.Point(0, 394);
             this.layoutControlItem10.Name = "layoutControlItem10";
-            this.layoutControlItem10.Size = new System.Drawing.Size(128, 44);
+            this.layoutControlItem10.Size = new System.Drawing.Size(282, 44);
             this.layoutControlItem10.Text = "速度";
             this.layoutControlItem10.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem10.TextSize = new System.Drawing.Size(48, 14);
             // 
-            // btnSaveOther
+            // layoutControlItem7
             // 
-            this.btnSaveOther.Location = new System.Drawing.Point(289, 324);
-            this.btnSaveOther.Name = "btnSaveOther";
-            this.btnSaveOther.Size = new System.Drawing.Size(47, 22);
-            this.btnSaveOther.StyleController = this.layoutControl1;
-            this.btnSaveOther.TabIndex = 14;
-            this.btnSaveOther.Text = "另存";
+            this.layoutControlItem7.Control = this.txtRefStation;
+            this.layoutControlItem7.Location = new System.Drawing.Point(0, 265);
+            this.layoutControlItem7.Name = "layoutControlItem7";
+            this.layoutControlItem7.Size = new System.Drawing.Size(282, 41);
+            this.layoutControlItem7.Text = "参考站";
+            this.layoutControlItem7.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItem7.TextSize = new System.Drawing.Size(48, 14);
             // 
             // layoutControlItem11
             // 
             this.layoutControlItem11.Control = this.btnSaveOther;
-            this.layoutControlItem11.Location = new System.Drawing.Point(277, 312);
+            this.layoutControlItem11.Location = new System.Drawing.Point(205, 463);
             this.layoutControlItem11.Name = "layoutControlItem11";
-            this.layoutControlItem11.Size = new System.Drawing.Size(51, 26);
+            this.layoutControlItem11.Size = new System.Drawing.Size(39, 26);
             this.layoutControlItem11.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem11.TextVisible = false;
-            // 
-            // btnSave
-            // 
-            this.btnSave.Location = new System.Drawing.Point(340, 324);
-            this.btnSave.Name = "btnSave";
-            this.btnSave.Size = new System.Drawing.Size(51, 22);
-            this.btnSave.StyleController = this.layoutControl1;
-            this.btnSave.TabIndex = 15;
-            this.btnSave.Text = "保存";
+            this.layoutControlItem11.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
             // 
             // layoutControlItem12
             // 
             this.layoutControlItem12.Control = this.btnSave;
-            this.layoutControlItem12.Location = new System.Drawing.Point(328, 312);
+            this.layoutControlItem12.Location = new System.Drawing.Point(244, 463);
             this.layoutControlItem12.Name = "layoutControlItem12";
-            this.layoutControlItem12.Size = new System.Drawing.Size(55, 26);
+            this.layoutControlItem12.Size = new System.Drawing.Size(38, 26);
             this.layoutControlItem12.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem12.TextVisible = false;
             // 
             // emptySpaceItem2
             // 
             this.emptySpaceItem2.AllowHotTrack = false;
-            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 312);
+            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 438);
             this.emptySpaceItem2.Name = "emptySpaceItem2";
-            this.emptySpaceItem2.Size = new System.Drawing.Size(277, 26);
+            this.emptySpaceItem2.Size = new System.Drawing.Size(282, 25);
             this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
             // 
+            // layoutControlItem13
+            // 
+            this.layoutControlItem13.Control = this.mapControl;
+            this.layoutControlItem13.Location = new System.Drawing.Point(292, 0);
+            this.layoutControlItem13.Name = "layoutControlItem13";
+            this.layoutControlItem13.Size = new System.Drawing.Size(877, 489);
+            this.layoutControlItem13.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem13.TextVisible = false;
+            // 
             // dxErrorProvider
             // 
             this.dxErrorProvider.ContainerControl = this;
             // 
+            // splitterItem1
+            // 
+            this.splitterItem1.AllowHotTrack = true;
+            this.splitterItem1.Location = new System.Drawing.Point(282, 0);
+            this.splitterItem1.Name = "splitterItem1";
+            this.splitterItem1.Size = new System.Drawing.Size(10, 489);
+            // 
+            // emptySpaceItem1
+            // 
+            this.emptySpaceItem1.AllowHotTrack = false;
+            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 463);
+            this.emptySpaceItem1.Name = "emptySpaceItem1";
+            this.emptySpaceItem1.Size = new System.Drawing.Size(205, 26);
+            this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
+            // 
             // TaskEditor
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(403, 450);
+            this.ClientSize = new System.Drawing.Size(1189, 509);
             this.Controls.Add(this.layoutControl1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
             this.Name = "TaskEditor";
@@ -444,35 +486,38 @@
             this.Load += new System.EventHandler(this.TaskEditor_Load);
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
             this.layoutControl1.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.mapControl)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtSpeed.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtBand.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtFreqUp.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtRefStation.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtTx.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtAdjaSat2.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit3View)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtAdjaSat1.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit2View)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtMainSat.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.radioSimulationType.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtTaskName.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.radioSimulationType.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtMainSat.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtAdjaSat1.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit2View)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtAdjaSat2.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit3View)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtTx.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtRefStation.Properties)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtFreqUp.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtBand.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtSpeed.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.splitterItem1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -483,7 +528,6 @@
         private DevExpress.XtraLayout.LayoutControlGroup Root;
         private DevExpress.XtraEditors.TextEdit txtTaskName;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
-        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
         private DevExpress.XtraEditors.RadioGroup radioSimulationType;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
         private DevExpress.XtraEditors.SearchLookUpEdit txtMainSat;
@@ -511,5 +555,9 @@
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12;
         private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2;
         private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider;
+        private DevExpress.XtraMap.MapControl mapControl;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13;
+        private DevExpress.XtraLayout.SplitterItem splitterItem1;
+        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
     }
 }

+ 125 - 2
DataSimulation.Forms/EditForms/TaskEditor.cs

@@ -23,11 +23,11 @@ namespace DataSimulation.Forms.EditForms
         public TaskEditor()
         {
             InitializeComponent();
-            this.layoutControl1.UseDefault();
+            //this.layoutControl1.UseDefault();
             this.Text = "添加任务";
             info = new TaskInfo();
             this.StartPosition = FormStartPosition.CenterParent;
-            //加载DW类型
+
             List<RadioGroupItem> radioGroups = new List<RadioGroupItem>();
             var values = Enum.GetValues(typeof(EnumSimulationType));
             foreach (var item in values)
@@ -35,6 +35,9 @@ namespace DataSimulation.Forms.EditForms
                 radioGroups.Add(new RadioGroupItem(Convert.ToInt32(item), ((EnumSimulationType)item).GetEnumDisplayName()));
             }
             this.radioSimulationType.Properties.Items.AddRange(radioGroups.ToArray());
+            this.radioSimulationType.SelectedIndex = 0;
+
+
         }
 
         public TaskEditor(TaskInfo info)
@@ -46,12 +49,36 @@ namespace DataSimulation.Forms.EditForms
 
         private async void TaskEditor_Load(object sender, EventArgs e)
         {
+            mapControl.UseDefalutOptions()
+            .UseClearAll()
+            .UseDistanceLine()
+            .UseMarkDot()
+            .UseExportImg()
+            .UseExportXlsx()
+            .UseExportCsv()
+            .SetMapLayerType(null)
+            .UseDrawRect(rect =>
+            {
+                (double startLon, double startLat, double centerLon, double centerLat, double endLon, double endLat, double lonRange, double latRange) = rect;
+            });
+
             using (SimulationContext db = new SimulationContext())
             {
                 var sats = await db.SatInfos.ToListAsync();
                 this.txtMainSat.UseDefault().SetData(sats, nameof(SatInfo.Sat)).UseDoubleClickToSelectAll();
                 this.txtAdjaSat1.UseDefault().SetData(sats, nameof(SatInfo.Sat)).UseDoubleClickToSelectAll();
                 this.txtAdjaSat2.UseDefault().SetData(sats, nameof(SatInfo.Sat)).UseDoubleClickToSelectAll();
+
+                var ants = await db.AntInfos.ToListAsync();
+                foreach (var item in ants)
+                {
+                    this.txtTx.Properties.Items.Add(new ImageComboBoxItem(item.AntName, item.ID));
+                }
+                var refs = await db.RefInfos.ToListAsync();
+                foreach (var item in refs)
+                {
+                    this.txtRefStation.Properties.Items.Add(new ImageComboBoxItem(item.RefName, item.ID));
+                }
             }
             if (this.Text == "编辑任务" && info != null)
             {
@@ -74,5 +101,101 @@ namespace DataSimulation.Forms.EditForms
                 }
             }
         }
+
+        /// <summary>
+        /// 验证信息
+        /// </summary>
+        private void validation()
+        {
+            try
+            {
+                dxErrorProvider.ClearErrors();
+                if (txtTaskName.EditValue == null)
+                {
+                    dxErrorProvider.SetError(txtTaskName, "请填写任务名");
+                    return;
+                }
+                if (radioSimulationType.SelectedIndex == -1)
+                {
+                    dxErrorProvider.SetError(radioSimulationType, "请选择仿真类型");
+                    return;
+                }
+                var posType = (EnumSimulationType)radioSimulationType.Properties.Items[radioSimulationType.SelectedIndex].Value;
+                if (posType == EnumSimulationType.X3TwoDto)
+                {
+                    if (txtMainSat.EditValue == null)
+                    {
+                        dxErrorProvider.SetError(txtMainSat, "请选择主星");
+                        return;
+                    }
+                    if (txtAdjaSat1.EditValue == null)
+                    {
+                        dxErrorProvider.SetError(txtAdjaSat1, "请选择邻星1");
+                        return;
+                    }
+                    if (txtAdjaSat2.EditValue == null)
+                    {
+                        dxErrorProvider.SetError(txtAdjaSat2, "请选择邻星2");
+                        return;
+                    }
+                }
+                if (txtTx.EditValue == null)
+                {
+                    dxErrorProvider.SetError(txtTx, "请选择天线");
+                    return;
+                }
+                if (txtRefStation.EditValue == null)
+                {
+                    dxErrorProvider.SetError(txtRefStation, "请选择参考站");
+                    return;
+                }
+                if (txtFreqUp.EditValue == null)
+                {
+                    dxErrorProvider.SetError(txtFreqUp, "请填写频点");
+                    return;
+                }
+                if (txtBand.EditValue == null)
+                {
+                    dxErrorProvider.SetError(txtBand, "请填写带宽");
+                    return;
+                }
+                if (txtSpeed.EditValue == null)
+                {
+                    dxErrorProvider.SetError(txtSpeed, "请填写速度");
+                    return;
+                }
+
+                info.TaskState = EnumTaskState.Stopped;
+                info.TaskName = txtTaskName.Text;
+                info.SimulationType = (EnumSimulationType)radioSimulationType.SelectedIndex;
+                info.MainSat = ((SatInfo)txtMainSat.EditValue).SatCode;
+                if (txtAdjaSat1.EditValue != null)
+                    info.Adja1Sat = ((SatInfo)txtAdjaSat1.EditValue).SatCode;
+                if (txtAdjaSat2.EditValue != null)
+                    info.Adja2Sat = ((SatInfo)txtAdjaSat2.EditValue).SatCode;
+                info.AntID = Convert.ToInt64(txtTx.EditValue);
+                info.RefID = Convert.ToInt64(txtRefStation.EditValue);
+                info.Freq = (long)(Convert.ToDouble(txtFreqUp.EditValue) * 1e6);
+                info.Band = (long)(Convert.ToDouble(txtBand.EditValue) * 1e6);
+                info.Speed = Convert.ToInt64(txtSpeed.EditValue);
+                info.isHistory = false;
+                this.DialogResult = DialogResult.OK;
+            }
+            catch (Exception ex)
+            {
+                Serilog.Log.Error(ex, "编辑任务信息出错");
+                DxHelper.MsgBoxHelper.ShowError("编辑任务信息出错");
+            }
+        }
+
+        private void btnSave_Click(object sender, EventArgs e)
+        {
+            validation();
+        }
+
+        private void btnSaveOther_Click(object sender, EventArgs e)
+        {
+            validation();
+        }
     }
 }

+ 15 - 2
DataSimulation.Forms/MainForm.Designer.cs

@@ -42,6 +42,7 @@
             this.dockManager1 = new DevExpress.XtraBars.Docking.DockManager(this.components);
             this.documentManager1 = new DevExpress.XtraBars.Docking2010.DocumentManager(this.components);
             this.tabbedView1 = new DevExpress.XtraBars.Docking2010.Views.Tabbed.TabbedView(this.components);
+            this.btnHistoryTask = new DevExpress.XtraBars.BarButtonItem();
             ((System.ComponentModel.ISupportInitialize)(this.ribbon)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.dockManager1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.documentManager1)).BeginInit();
@@ -58,9 +59,10 @@
             this.btnXl,
             this.btnSat,
             this.btnTx,
-            this.btnRef});
+            this.btnRef,
+            this.btnHistoryTask});
             this.ribbon.Location = new System.Drawing.Point(0, 0);
-            this.ribbon.MaxItemId = 6;
+            this.ribbon.MaxItemId = 7;
             this.ribbon.Name = "ribbon";
             this.ribbon.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] {
             this.ribbonPage1});
@@ -127,6 +129,7 @@
             // ribbonPageGroup1
             // 
             this.ribbonPageGroup1.ItemLinks.Add(this.btnTask);
+            this.ribbonPageGroup1.ItemLinks.Add(this.btnHistoryTask);
             this.ribbonPageGroup1.Name = "ribbonPageGroup1";
             // 
             // ribbonPageGroup2
@@ -163,6 +166,14 @@
             this.documentManager1.ViewCollection.AddRange(new DevExpress.XtraBars.Docking2010.Views.BaseView[] {
             this.tabbedView1});
             // 
+            // btnHistoryTask
+            // 
+            this.btnHistoryTask.Caption = "历史任务";
+            this.btnHistoryTask.Id = 6;
+            this.btnHistoryTask.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnHistoryTask.ImageOptions.SvgImage")));
+            this.btnHistoryTask.Name = "btnHistoryTask";
+            this.btnHistoryTask.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btn_ItemClick);
+            // 
             // MainForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
@@ -174,6 +185,7 @@
             this.Name = "MainForm";
             this.Ribbon = this.ribbon;
             this.Text = "数据仿真";
+            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
             ((System.ComponentModel.ISupportInitialize)(this.ribbon)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.dockManager1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.documentManager1)).EndInit();
@@ -197,6 +209,7 @@
         private DevExpress.XtraBars.Docking2010.DocumentManager documentManager1;
         private DevExpress.XtraBars.Docking2010.Views.Tabbed.TabbedView tabbedView1;
         private DevExpress.XtraBars.BarButtonItem btnRef;
+        private DevExpress.XtraBars.BarButtonItem btnHistoryTask;
     }
 }
 

+ 1 - 0
DataSimulation.Forms/MainForm.cs

@@ -23,6 +23,7 @@ namespace DataSimulation.Forms
             ribbon.UseDefault();
             tabbedView1.UseDefault();
             ctrlTypes.Add("任务管理", typeof(CtrlHome));
+            ctrlTypes.Add("历史任务", typeof(CtrlHistoryTask));
             ctrlTypes.Add("星历管理", typeof(CtrlXl));
             ctrlTypes.Add("卫星管理", typeof(CtrlSat));
             ctrlTypes.Add("天线管理", typeof(CtrlAnt));

+ 28 - 0
DataSimulation.Forms/MainForm.resx

@@ -319,6 +319,34 @@
         Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iQ2hhcnRTdGVw
         QXJlYSI+DQogICAgPHBvbHlnb24gcG9pbnRzPSIyMiw4IDIyLDQgMTYsNCAxNiwxMCAxMCwxMCAxMCwx
         NiA0LDE2IDQsMjggMjgsMjggMjgsOCAgIiBjbGFzcz0iQmx1ZSIgLz4NCiAgPC9nPg0KPC9zdmc+Cw==
+</value>
+  </data>
+  <data name="btnHistoryTask.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi4z
+        LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
+        dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAANQEAAAC77u/
+        PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
+        IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
+        MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
+        Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
+        MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z
+        ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5SZWR7ZmlsbDojRDExQzFDO30KCS5HcmVlbntmaWxsOiMwMzlD
+        MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh
+        Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQoJLnN0MntkaXNwbGF5Om5vbmU7fQoJLnN0M3tk
+        aXNwbGF5OmlubGluZTtmaWxsOiNGRkIxMTU7fQoJLnN0NHtkaXNwbGF5OmlubGluZTt9Cgkuc3Q1e2Rp
+        c3BsYXk6aW5saW5lO29wYWNpdHk6MC43NTt9Cgkuc3Q2e2Rpc3BsYXk6aW5saW5lO29wYWNpdHk6MC41
+        O30KCS5zdDd7ZGlzcGxheTppbmxpbmU7ZmlsbDojMDM5QzIzO30KCS5zdDh7ZGlzcGxheTppbmxpbmU7
+        ZmlsbDojRDExQzFDO30KCS5zdDl7ZGlzcGxheTppbmxpbmU7ZmlsbDojMTE3N0Q3O30KCS5zdDEwe2Rp
+        c3BsYXk6aW5saW5lO2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU+DQogIDxwYXRoIGQ9Ik0yNi4yLDExLjhs
+        LTEsMC44QzI1LDEyLjgsMjMuNCwxNCwyMS40LDE0Yy0xLjQsMC0yLjctMC42LTMuNi0xLjhDMTcuNiwx
+        MiwxNy41LDEyLDE3LjQsMTJjMCwwLTAuMSwwLTAuMSwwICBsMS4yLDMuNmMwLjIsMC41LTAuMSwxLjEt
+        MC42LDEuM2wtMy44LDEuNGMtMC41LDAuMi0xLjEtMC4xLTEuMy0wLjZsLTEuOS01LjJMOS40LDhDNi4x
+        LDEwLjEsNCwxMy44LDQsMThjMCw2LjYsNS40LDEyLDEyLDEyICBzMTItNS40LDEyLTEyQzI4LDE1Ljcs
+        MjcuMywxMy42LDI2LjIsMTEuOHoiIGNsYXNzPSJCbHVlIiAvPg0KICA8cGF0aCBkPSJNMjEuMiwzYzAs
+        MC0yLjgsMi4zLTQuNiwwYy0xLjgtMi4yLTQuNS0wLjEtNC42LDBsLTIsMC42bDIuOCw4LjFsMS42LDQu
+        M2wxLjktMC43TDE0LjgsMTEgIGMwLjEtMC4xLDIuOC0yLjIsNC42LDBjMS44LDIuMyw0LjYsMCw0LjYs
+        MEwyMS4yLDN6IiBjbGFzcz0iUmVkIiAvPg0KPC9zdmc+Cw==
 </value>
   </data>
   <metadata name="dockManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">

+ 14 - 14
DataSimulation.Forms/Program.cs

@@ -101,27 +101,27 @@ namespace DataSimulation.Forms
             }
             if (IsRunningAsAdmin())
             {
-                string screenTitle = ConfigurationManager.AppSettings["SystemName"];
-                string screenCompany = ConfigurationManager.AppSettings["Company"];
-                DxHelper.WaitHelper.SetSplashTips("Tips.txt");
-                ChsLocalizer.UseChs();
+                //string screenTitle = ConfigurationManager.AppSettings["SystemName"];
+                //string screenCompany = ConfigurationManager.AppSettings["Company"];
+                //DxHelper.WaitHelper.SetSplashTips("Tips.txt");
+                //ChsLocalizer.UseChs();
 
 
-                DxHelper.WaitHelper.ShowSplashScreen(screenTitle, screenCompany);
-                DxHelper.WaitHelper.UpdateSplashMessage("正在加载程序资源文件...");
-                MainForm mainForm = new MainForm() { Text = screenTitle };
-                DxHelper.WaitHelper.UpdateSplashMessage("正在初始化...");
-                System.Windows.Forms.Application.Run(mainForm);
+                //DxHelper.WaitHelper.ShowSplashScreen(screenTitle, screenCompany);
+                //DxHelper.WaitHelper.UpdateSplashMessage("正在加载程序资源文件...");
+                //MainForm mainForm = new MainForm() { Text = screenTitle };
+                //DxHelper.WaitHelper.UpdateSplashMessage("正在初始化...");
+                //System.Windows.Forms.Application.Run(mainForm);
             }
             else
             {
-                RestartAsAdmin();
+               // RestartAsAdmin();
              }
 
-            //ChsLocalizer.UseChs();
-            //Application.EnableVisualStyles();
-            //Application.SetCompatibleTextRenderingDefault(false);
-            //Application.Run(new MainForm());
+            ChsLocalizer.UseChs();
+            Application.EnableVisualStyles();
+            Application.SetCompatibleTextRenderingDefault(false);
+            Application.Run(new MainForm());
         }
     }
 }

+ 157 - 0
DataSimulation.Forms/UserControl/CtrlHistoryTask.Designer.cs

@@ -0,0 +1,157 @@
+namespace DataSimulation.Forms.UserControl
+{
+    partial class CtrlHistoryTask
+    {
+        /// <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 Component 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();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CtrlHistoryTask));
+            this.gridHistoryTask = new DevExpress.XtraGrid.GridControl();
+            this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
+            this.barManager1 = new DevExpress.XtraBars.BarManager(this.components);
+            this.barDockControlTop = new DevExpress.XtraBars.BarDockControl();
+            this.barDockControlBottom = new DevExpress.XtraBars.BarDockControl();
+            this.barDockControlLeft = new DevExpress.XtraBars.BarDockControl();
+            this.barDockControlRight = new DevExpress.XtraBars.BarDockControl();
+            this.btnDel = new DevExpress.XtraBars.BarButtonItem();
+            this.popupMenu1 = new DevExpress.XtraBars.PopupMenu(this.components);
+            ((System.ComponentModel.ISupportInitialize)(this.gridHistoryTask)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.barManager1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.popupMenu1)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // gridHistoryTask
+            // 
+            this.gridHistoryTask.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.gridHistoryTask.Location = new System.Drawing.Point(0, 0);
+            this.gridHistoryTask.MainView = this.gridView1;
+            this.gridHistoryTask.Name = "gridHistoryTask";
+            this.gridHistoryTask.Size = new System.Drawing.Size(647, 422);
+            this.gridHistoryTask.TabIndex = 0;
+            this.gridHistoryTask.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
+            this.gridView1});
+            // 
+            // gridView1
+            // 
+            this.gridView1.GridControl = this.gridHistoryTask;
+            this.gridView1.Name = "gridView1";
+            this.gridView1.PopupMenuShowing += new DevExpress.XtraGrid.Views.Grid.PopupMenuShowingEventHandler(this.gridView1_PopupMenuShowing);
+            this.gridView1.CustomDrawEmptyForeground += new DevExpress.XtraGrid.Views.Base.CustomDrawEventHandler(this.gridView1_CustomDrawEmptyForeground);
+            // 
+            // barManager1
+            // 
+            this.barManager1.DockControls.Add(this.barDockControlTop);
+            this.barManager1.DockControls.Add(this.barDockControlBottom);
+            this.barManager1.DockControls.Add(this.barDockControlLeft);
+            this.barManager1.DockControls.Add(this.barDockControlRight);
+            this.barManager1.Form = this;
+            this.barManager1.Items.AddRange(new DevExpress.XtraBars.BarItem[] {
+            this.btnDel});
+            this.barManager1.MaxItemId = 3;
+            // 
+            // barDockControlTop
+            // 
+            this.barDockControlTop.CausesValidation = false;
+            this.barDockControlTop.Dock = System.Windows.Forms.DockStyle.Top;
+            this.barDockControlTop.Location = new System.Drawing.Point(0, 0);
+            this.barDockControlTop.Manager = this.barManager1;
+            this.barDockControlTop.Size = new System.Drawing.Size(647, 0);
+            // 
+            // barDockControlBottom
+            // 
+            this.barDockControlBottom.CausesValidation = false;
+            this.barDockControlBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.barDockControlBottom.Location = new System.Drawing.Point(0, 422);
+            this.barDockControlBottom.Manager = this.barManager1;
+            this.barDockControlBottom.Size = new System.Drawing.Size(647, 0);
+            // 
+            // barDockControlLeft
+            // 
+            this.barDockControlLeft.CausesValidation = false;
+            this.barDockControlLeft.Dock = System.Windows.Forms.DockStyle.Left;
+            this.barDockControlLeft.Location = new System.Drawing.Point(0, 0);
+            this.barDockControlLeft.Manager = this.barManager1;
+            this.barDockControlLeft.Size = new System.Drawing.Size(0, 422);
+            // 
+            // barDockControlRight
+            // 
+            this.barDockControlRight.CausesValidation = false;
+            this.barDockControlRight.Dock = System.Windows.Forms.DockStyle.Right;
+            this.barDockControlRight.Location = new System.Drawing.Point(647, 0);
+            this.barDockControlRight.Manager = this.barManager1;
+            this.barDockControlRight.Size = new System.Drawing.Size(0, 422);
+            // 
+            // btnDel
+            // 
+            this.btnDel.Caption = "删除";
+            this.btnDel.Id = 1;
+            this.btnDel.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnDel.ImageOptions.SvgImage")));
+            this.btnDel.Name = "btnDel";
+            this.btnDel.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnDel_ItemClick);
+            // 
+            // popupMenu1
+            // 
+            this.popupMenu1.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] {
+            new DevExpress.XtraBars.LinkPersistInfo(this.btnDel)});
+            this.popupMenu1.Manager = this.barManager1;
+            this.popupMenu1.Name = "popupMenu1";
+            // 
+            // CtrlHistoryTask
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.gridHistoryTask);
+            this.Controls.Add(this.barDockControlLeft);
+            this.Controls.Add(this.barDockControlRight);
+            this.Controls.Add(this.barDockControlBottom);
+            this.Controls.Add(this.barDockControlTop);
+            this.Name = "CtrlHistoryTask";
+            this.Size = new System.Drawing.Size(647, 422);
+            this.Load += new System.EventHandler(this.CtrlAnt_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.gridHistoryTask)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.barManager1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.popupMenu1)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private DevExpress.XtraGrid.GridControl gridHistoryTask;
+        private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
+        private DevExpress.XtraBars.BarManager barManager1;
+        private DevExpress.XtraBars.BarDockControl barDockControlTop;
+        private DevExpress.XtraBars.BarDockControl barDockControlBottom;
+        private DevExpress.XtraBars.BarDockControl barDockControlLeft;
+        private DevExpress.XtraBars.BarDockControl barDockControlRight;
+        private DevExpress.XtraBars.BarButtonItem btnDel;
+        private DevExpress.XtraBars.PopupMenu popupMenu1;
+    }
+}

+ 101 - 0
DataSimulation.Forms/UserControl/CtrlHistoryTask.cs

@@ -0,0 +1,101 @@
+using DataSimulation.Repostory.Model;
+using DevExpress.Utils.Html;
+using DevExpress.XtraEditors;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Data.Entity;
+using System.Drawing;
+using System.Linq;
+using System.Windows.Forms;
+using DataSimulation.Repostory.EFContext;
+using DataSimulation.Forms.EditForms;
+using DataSimulation.Repostory;
+using System.Threading.Tasks;
+using static System.Windows.Forms.VisualStyles.VisualStyleElement.TextBox;
+
+namespace DataSimulation.Forms.UserControl
+{
+    public partial class CtrlHistoryTask : DevExpress.XtraEditors.XtraUserControl
+    {
+        List<TaskInfo> list = new List<TaskInfo>();
+        public CtrlHistoryTask()
+        {
+            InitializeComponent();
+        }
+        private async void CtrlAnt_Load(object sender, EventArgs e)
+        {
+            try
+            {
+                gridHistoryTask.Init<TaskInfo>().UseSort().UseFilter().UseMultiSelect().UseRowNumber();
+                gridHistoryTask.DataSource = list;
+                var taskListCache = await TaskCache.GetAllAsync();
+                list.AddRange(taskListCache.Where(w=>w.isHistory));
+                gridView1.RefreshData();
+            }
+            catch (Exception ex)
+            {
+                Serilog.Log.Error(ex, "查询历史任务信息异常");
+                DxHelper.MsgBoxHelper.ShowError("查询历史任务信息异常");
+            }
+        }
+        private void gridView1_PopupMenuShowing(object sender, DevExpress.XtraGrid.Views.Grid.PopupMenuShowingEventArgs e)
+        {
+            if (gridView1.GetSelectedRows().Any())
+            {
+                btnDel.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
+            }
+            else
+            {
+                btnDel.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
+            }
+            popupMenu1.ShowPopup(MousePosition);
+        }
+
+      
+        private async void btnDel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+        {
+            try
+            {
+                if (XtraMessageBox.Show("确认删除选择的历史任务信息?", "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
+                {
+                    return;
+                }
+                var ids = gridView1.GetSelectedRows();
+
+                foreach (var id in ids)
+                {
+                    var info = gridView1.GetRow(id) as TaskInfo;
+                    using (SimulationPartContext db = SimulationPartContext.GetContext(info.CreateTime))
+                    {
+                        var items = db.TaskInfos.Where(p => p.ID == id);
+                        if (items == null) return;
+                        db.TaskInfos.RemoveRange(items);
+                        await db.SaveChangesAsync();
+                    }
+                }
+                gridView1.DeleteSelectedRows();
+            }
+            catch (Exception ex)
+            {
+                Serilog.Log.Error(ex, "删除历史任务信息异常");
+                DxHelper.MsgBoxHelper.ShowError("删除历史任务信息异常");
+            }
+        }
+        private void gridView1_CustomDrawEmptyForeground(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e)
+        {
+            if (gridView1.RowCount == 0)
+            {
+                string txt = "暂无历史任务";
+                var s = e.Appearance.CalcTextSize(e.Cache, txt, e.Bounds.Width).ToSize();
+                var x = (e.Bounds.Width - s.Width) / 2;
+                var y = (e.Bounds.Height - s.Height) / 2;
+                e.Appearance.ForeColor = Color.Gray;
+                e.Appearance.DrawString(e.Cache, txt, new Rectangle(x, y, s.Width, s.Height));
+            }
+        }
+
+
+    }
+}

+ 148 - 0
DataSimulation.Forms/UserControl/CtrlHistoryTask.resx

@@ -0,0 +1,148 @@
+<?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="barManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+  <data name="btnDel.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi4z
+        LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
+        dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAD4DAAAC77u/
+        PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
+        IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
+        MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
+        Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
+        MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsYWNre2ZpbGw6IzczNzM3NDt9Cgku
+        WWVsbG93e2ZpbGw6I0ZDQjAxQjt9CgkuR3JlZW57ZmlsbDojMTI5QzQ5O30KCS5CbHVle2ZpbGw6IzM4
+        N0NCNzt9CgkuUmVke2ZpbGw6I0QwMjEyNzt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh
+        Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQoJLnN0MntvcGFjaXR5OjAuMjU7fQoJLnN0M3tk
+        aXNwbGF5Om5vbmU7ZmlsbDojNzM3Mzc0O30KPC9zdHlsZT4NCiAgPHBhdGggZD0iTTE4LjgsMTZsOC45
+        LTguOWMwLjQtMC40LDAuNC0xLDAtMS40bC0xLjQtMS40Yy0wLjQtMC40LTEtMC40LTEuNCwwTDE2LDEz
+        LjJMNy4xLDQuM2MtMC40LTAuNC0xLTAuNC0xLjQsMCAgTDQuMyw1LjdjLTAuNCwwLjQtMC40LDEsMCwx
+        LjRsOC45LDguOWwtOC45LDguOWMtMC40LDAuNC0wLjQsMSwwLDEuNGwxLjQsMS40YzAuNCwwLjQsMSww
+        LjQsMS40LDBsOC45LTguOWw4LjksOC45ICBjMC40LDAuNCwxLDAuNCwxLjQsMGwxLjQtMS40YzAuNC0w
+        LjQsMC40LTEsMC0xLjRMMTguOCwxNnoiIGNsYXNzPSJSZWQiIC8+DQo8L3N2Zz4L
+</value>
+  </data>
+  <metadata name="popupMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>152, 17</value>
+  </metadata>
+</root>

+ 28 - 12
DataSimulation.Forms/UserControl/CtrlHome.Designer.cs

@@ -29,10 +29,10 @@
         private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
-            DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions buttonImageOptions1 = new DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions();
+            DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions buttonImageOptions4 = new DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CtrlHome));
-            DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions buttonImageOptions2 = new DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions();
-            DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions buttonImageOptions3 = new DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions();
+            DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions buttonImageOptions5 = new DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions();
+            DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions buttonImageOptions6 = new DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions();
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
             this.mapControl = new DevExpress.XtraMap.MapControl();
             this.gridControl = new DevExpress.XtraGrid.GridControl();
@@ -49,6 +49,7 @@
             this.barDockControlLeft = new DevExpress.XtraBars.BarDockControl();
             this.barDockControlRight = new DevExpress.XtraBars.BarDockControl();
             this.popupMenu = new DevExpress.XtraBars.PopupMenu(this.components);
+            this.btnStart = new DevExpress.XtraBars.BarButtonItem();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.mapControl)).BeginInit();
@@ -97,6 +98,7 @@
             // 
             this.gridView.GridControl = this.gridControl;
             this.gridView.Name = "gridView";
+            this.gridView.CustomColumnDisplayText += new DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventHandler(this.gridView_CustomColumnDisplayText);
             // 
             // Root
             // 
@@ -121,16 +123,16 @@
             // 
             // layoutControlGroup
             // 
-            buttonImageOptions1.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("buttonImageOptions1.SvgImage")));
-            buttonImageOptions1.SvgImageSize = new System.Drawing.Size(20, 20);
-            buttonImageOptions2.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("buttonImageOptions2.SvgImage")));
-            buttonImageOptions2.SvgImageSize = new System.Drawing.Size(20, 20);
-            buttonImageOptions3.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("buttonImageOptions3.SvgImage")));
-            buttonImageOptions3.SvgImageSize = new System.Drawing.Size(20, 20);
+            buttonImageOptions4.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("buttonImageOptions4.SvgImage")));
+            buttonImageOptions4.SvgImageSize = new System.Drawing.Size(20, 20);
+            buttonImageOptions5.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("buttonImageOptions5.SvgImage")));
+            buttonImageOptions5.SvgImageSize = new System.Drawing.Size(20, 20);
+            buttonImageOptions6.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("buttonImageOptions6.SvgImage")));
+            buttonImageOptions6.SvgImageSize = new System.Drawing.Size(20, 20);
             this.layoutControlGroup.CustomHeaderButtons.AddRange(new DevExpress.XtraEditors.ButtonPanel.IBaseButton[] {
-            new DevExpress.XtraEditors.ButtonsPanelControl.GroupBoxButton("新建任务", false, buttonImageOptions1, DevExpress.XtraBars.Docking2010.ButtonStyle.PushButton, "新建任务", -1, true, null, true, false, true, null, -1),
-            new DevExpress.XtraEditors.ButtonsPanelControl.GroupBoxButton("编辑任务", false, buttonImageOptions2, DevExpress.XtraBars.Docking2010.ButtonStyle.PushButton, "编辑任务", -1, true, null, true, false, true, null, -1),
-            new DevExpress.XtraEditors.ButtonsPanelControl.GroupBoxButton("删除任务", false, buttonImageOptions3, DevExpress.XtraBars.Docking2010.ButtonStyle.PushButton, "删除任务", -1, true, null, true, false, true, null, -1)});
+            new DevExpress.XtraEditors.ButtonsPanelControl.GroupBoxButton("新建任务", false, buttonImageOptions4, DevExpress.XtraBars.Docking2010.ButtonStyle.PushButton, "新建任务", -1, true, null, true, false, true, null, -1),
+            new DevExpress.XtraEditors.ButtonsPanelControl.GroupBoxButton("编辑任务", false, buttonImageOptions5, DevExpress.XtraBars.Docking2010.ButtonStyle.PushButton, "编辑任务", -1, true, null, true, false, true, null, -1),
+            new DevExpress.XtraEditors.ButtonsPanelControl.GroupBoxButton("删除任务", false, buttonImageOptions6, DevExpress.XtraBars.Docking2010.ButtonStyle.PushButton, "删除任务", -1, true, null, true, false, true, null, -1)});
             this.layoutControlGroup.HeaderButtonsLocation = DevExpress.Utils.GroupElementLocation.AfterText;
             this.layoutControlGroup.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
             this.layoutControlItem1});
@@ -164,6 +166,9 @@
             this.barManager.DockControls.Add(this.barDockControlLeft);
             this.barManager.DockControls.Add(this.barDockControlRight);
             this.barManager.Form = this;
+            this.barManager.Items.AddRange(new DevExpress.XtraBars.BarItem[] {
+            this.btnStart});
+            this.barManager.MaxItemId = 1;
             // 
             // barDockControlTop
             // 
@@ -199,9 +204,19 @@
             // 
             // popupMenu
             // 
+            this.popupMenu.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] {
+            new DevExpress.XtraBars.LinkPersistInfo(this.btnStart)});
             this.popupMenu.Manager = this.barManager;
             this.popupMenu.Name = "popupMenu";
             // 
+            // btnStart
+            // 
+            this.btnStart.Caption = "启动任务";
+            this.btnStart.Id = 0;
+            this.btnStart.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnStart.ImageOptions.SvgImage")));
+            this.btnStart.Name = "btnStart";
+            this.btnStart.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnStart_ItemClick);
+            // 
             // CtrlHome
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
@@ -250,5 +265,6 @@
         private DevExpress.XtraBars.BarDockControl barDockControlLeft;
         private DevExpress.XtraBars.BarDockControl barDockControlRight;
         private DevExpress.XtraBars.PopupMenu popupMenu;
+        private DevExpress.XtraBars.BarButtonItem btnStart;
     }
 }

+ 127 - 33
DataSimulation.Forms/UserControl/CtrlHome.cs

@@ -3,6 +3,8 @@ using DataSimulation.Repostory;
 using DataSimulation.Repostory.EFContext;
 using DataSimulation.Repostory.Model;
 using DevExpress.Utils;
+using DevExpress.Utils.About;
+using DevExpress.XtraBars.Customization;
 using DevExpress.XtraEditors.ButtonsPanelControl;
 using DevExpress.XtraMap;
 using DxHelper;
@@ -10,14 +12,17 @@ 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.IO;
 using System.Linq;
+using System.Reflection;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
+using static System.Windows.Forms.VisualStyles.VisualStyleElement;
 
 namespace DataSimulation.Forms.UserControl
 {
@@ -29,9 +34,8 @@ namespace DataSimulation.Forms.UserControl
             InitializeComponent();
             gridControl.Init<TaskInfo>().UseFilter();
             layoutControl1.UseDefault();
-            mapControl
-                .UseDefalutOptions()
-          .UseClearAll()
+            mapControl.UseDefalutOptions()
+           .UseClearAll()
           .UseDistanceLine()
           .UseMarkDot()
           .UseExportImg()
@@ -59,8 +63,8 @@ namespace DataSimulation.Forms.UserControl
                     {
                         using (SimulationPartContext db = SimulationPartContext.GetContext(dayFile))
                         {
-                            taskList.AddRange(await db.TaskInfos.ToListAsync());
-                            var runningList = await db.TaskInfos.Where(p => p.TaskState == EnumTaskState.Running).ToListAsync();
+                            taskList.AddRange(await db.TaskInfos.Where(w => !w.isHistory).ToListAsync());
+                            var runningList = await db.TaskInfos.Where(p => p.TaskState == EnumTaskState.Running && !p.isHistory).ToListAsync();
                             foreach (var item in runningList)
                             {
                                 item.TaskState = EnumTaskState.Stopped;
@@ -94,34 +98,20 @@ namespace DataSimulation.Forms.UserControl
                     TaskEditor frm = new TaskEditor();
                     if (frm.ShowDialog() != DialogResult.OK) return;
                     var addItem = frm.info;
-                    var taskList = await TaskCache.GetAllAsync();
-                    //if (await taskList.ToList().(p => p.TaskName == addItem.TaskName))
-                    //{
-                    //    DxHelper.MsgBoxHelper.ShowWarning("任务名称重复");
-                    //    return;
-                    //}
-                    //using (SimulationContext db = new RHDWContext())
-                    //{
-                    //    if (await db.TaskInfos.AnyAsync(p => p.TaskName == addItem.TaskName))
-                    //    {
-                    //        DxHelper.MsgBoxHelper.ShowWarning("任务名称重复");
-                    //        return;
-                    //    }
-                    //    if (addItem.PosType == EnumPosType.X1D1CX)
-                    //    {
-                    //        addItem.Adja1Sat = null;
-                    //        addItem.Adja2Sat = null;
-                    //    }
-                    //    else if (addItem.PosType == EnumPosType.X2D1 || addItem.PosType == EnumPosType.X2Dfo || addItem.PosType == EnumPosType.RH)
-                    //    {
-                    //        addItem.Adja2Sat = null;
-                    //    }
-                    //    db.TaskInfos.Add(addItem);
-                    //    await db.SaveChangesAsync();
-                    //}
-                    //list.Insert(0, addItem);
-                    //gridView1.RefreshData();
-                    //gridView1.FocusedRowHandle = 0;
+                    // var taskListCache = await TaskCache.GetAllAsync();
+                    if (taskList.ToList().Any(p => p.TaskName == addItem.TaskName))
+                    {
+                        DxHelper.MsgBoxHelper.ShowWarning("任务名称重复");
+                        return;
+                    }
+                    using (SimulationPartContext db = SimulationPartContext.GetContext(DateTime.Now))
+                    {
+                        db.TaskInfos.Add(addItem);
+                        await db.SaveChangesAsync();
+                    }
+                    taskList.Insert(0, addItem);
+                    gridView.RefreshData();
+                    gridView.FocusedRowHandle = 0;
                 }
                 catch (Exception ex)
                 {
@@ -129,6 +119,110 @@ namespace DataSimulation.Forms.UserControl
                     DxHelper.MsgBoxHelper.ShowError("保存任务异常");
                 }
             }
+            else if (txt == "编辑任务")
+            {
+                try
+                {
+                    var editItem = gridView.GetFocusedRow() as TaskInfo;
+                    TaskEditor frm = new TaskEditor(editItem);
+                    if (frm.ShowDialog() != DialogResult.OK) return;
+                    editItem = frm.info;
+                    var taskListCache = await TaskCache.GetAllAsync();
+                    if (taskListCache.ToList().Any(p => p.TaskName == editItem.TaskName))
+                    {
+                        DxHelper.MsgBoxHelper.ShowWarning("任务名称重复");
+                        return;
+                    }
+                    using (SimulationPartContext db = SimulationPartContext.GetContext(editItem.CreateTime))
+                    {
+                        var find = db.TaskInfos.Where(p => p.ID == editItem.ID).ToList().FirstOrDefault();
+                        if (find == null) return;
+                        find.TaskName = editItem.TaskName;
+                        find.SimulationType = editItem.SimulationType;
+                        find.UpdateTime = DateTime.Now;
+                        find.Freq = editItem.Freq;
+                        find.Band = editItem.Band;
+                        find.MainSat = editItem.MainSat;
+                        if (find.SimulationType == EnumSimulationType.X3TwoDto)
+                        {
+                            find.Adja1Sat = editItem.Adja1Sat;
+                            find.Adja2Sat = editItem.Adja2Sat;
+                        }
+                        await db.SaveChangesAsync();
+                    }
+                    gridView.RefreshData();
+                }
+                catch (Exception ex)
+                {
+                    Serilog.Log.Error(ex, "保存任务异常");
+                    DxHelper.MsgBoxHelper.ShowError("保存任务异常");
+                }
+            }
+            else
+            {
+                try
+                {
+                    var tsk = gridView.GetFocusedRow() as TaskInfo;
+                    if (tsk == null) return;
+                    if (!DxHelper.MsgBoxHelper.ShowConfirm($"删除任务[{tsk.TaskName}]?"))
+                        return;
+                    using (SimulationPartContext db = SimulationPartContext.GetContext(tsk.CreateTime))
+                    {
+                        var item = db.TaskInfos.FirstOrDefault(p => p.ID == tsk.ID);
+                        if (item == null) return;
+                        db.TaskInfos.Remove(item);
+                        await db.SaveChangesAsync();
+                    }
+                    gridView.DeleteSelectedRows();
+                }
+                catch (Exception ex)
+                {
+                    Serilog.Log.Error(ex, "删除任务异常");
+                    DxHelper.MsgBoxHelper.ShowError("删除任务异常");
+                }
+            }
+        }
+
+        private void gridView_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
+        {
+            if (e.Column.FieldName == nameof(TaskInfo.Freq))
+            {
+                e.DisplayText = $"{(long)e.Value / 1e6}MHz";
+            }
+            else if (e.Column.FieldName == nameof(TaskInfo.Band))
+            {
+                e.DisplayText = $"{(long)e.Value / 1e6}MHz";
+            }
+        }
+
+        private async void btnStart_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+        {
+            var tsk = gridView.GetFocusedRow() as TaskInfo;
+            if (e.Item.Caption == "启动任务")
+            {
+                try
+                {
+                    if (tsk.TaskState == EnumTaskState.Running)
+                    {
+                        DxHelper.MsgBoxHelper.ShowWarning($"该任务正在执行!");
+                        return;
+                    }
+                    using (SimulationPartContext db = SimulationPartContext.GetContext(tsk.CreateTime))
+                    {
+                        var item = await db.TaskInfos.FirstOrDefaultAsync(p => p.ID == tsk.ID);
+                        item.TaskState = EnumTaskState.Running;
+                        item.isHistory = true;
+                        //gridView.DeleteSelectedRows();
+                        await db.SaveChangesAsync();
+                        Serilog.Log.Information($"用户启动了任务,ID={tsk.ID}");
+                    }
+                }
+                catch (Exception ex)
+                {
+                    Serilog.Log.Error(ex, "启动任务异常");
+                    DxHelper.MsgBoxHelper.ShowError($"启动任务异常.{ex.Message}");
+                }
+            }
         }
     }
 

+ 25 - 3
DataSimulation.Forms/UserControl/CtrlHome.resx

@@ -118,7 +118,7 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
-  <data name="buttonImageOptions1.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="buttonImageOptions4.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi4z
         LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
@@ -137,7 +137,7 @@
         DQogIDwvZz4NCjwvc3ZnPgs=
 </value>
   </data>
-  <data name="buttonImageOptions2.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="buttonImageOptions5.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi4z
         LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
@@ -158,7 +158,7 @@
         ICA8L2c+DQo8L3N2Zz4L
 </value>
   </data>
-  <data name="buttonImageOptions3.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="buttonImageOptions6.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi4z
         LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
@@ -181,6 +181,28 @@
   <metadata name="barManager.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>193, 17</value>
   </metadata>
+  <data name="btnStart.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi4z
+        LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
+        dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAH4DAAAC77u/
+        PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
+        IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
+        MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
+        Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
+        MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z
+        ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5SZWR7ZmlsbDojRDExQzFDO30KCS5HcmVlbntmaWxsOiMwMzlD
+        MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh
+        Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQoJLnN0MntkaXNwbGF5Om5vbmU7fQoJLnN0M3tk
+        aXNwbGF5OmlubGluZTtmaWxsOiNGRkIxMTU7fQoJLnN0NHtkaXNwbGF5OmlubGluZTt9Cgkuc3Q1e2Rp
+        c3BsYXk6aW5saW5lO29wYWNpdHk6MC43NTt9Cgkuc3Q2e2Rpc3BsYXk6aW5saW5lO29wYWNpdHk6MC41
+        O30KCS5zdDd7ZGlzcGxheTppbmxpbmU7ZmlsbDojMDM5QzIzO30KCS5zdDh7ZGlzcGxheTppbmxpbmU7
+        ZmlsbDojRDExQzFDO30KCS5zdDl7ZGlzcGxheTppbmxpbmU7ZmlsbDojMTE3N0Q3O30KCS5zdDEwe2Rp
+        c3BsYXk6aW5saW5lO2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU+DQogIDxnIGlkPSJWYWxpZGF0aW9uIj4N
+        CiAgICA8Zz4NCiAgICAgIDxwb2x5Z29uIHBvaW50cz0iMjcsNCAxMSwyMCA1LDE0IDIsMTcgMTEsMjYg
+        MzAsNyAgICIgY2xhc3M9IkdyZWVuIiAvPg0KICAgIDwvZz4NCiAgPC9nPg0KPC9zdmc+Cw==
+</value>
+  </data>
   <metadata name="popupMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>321, 17</value>
   </metadata>

+ 6 - 2
DataSimulation.Repostory/Model/TaskInfo.cs

@@ -44,14 +44,18 @@ namespace DataSimulation.Repostory.Model
         [Display(Name = "仿真编号", AutoGenerateField = false)]
         public long SimulationID { get; set; }
 
-        [Display(Name = "上行频点(Hz)")]
+        [Display(Name = "上行频点")]
         public long Freq { get; set; }
 
-        [Display(Name = "信号带宽(Hz)")]
+        [Display(Name = "信号带宽")]
         public long Band { get; set; }
 
         [Display(Name = "速度(m/s)")]
         public long Speed { get; set; }
 
+        [Display(Name = "是否历史任务", AutoGenerateField = false)]
+        public bool isHistory { get; set; }
+
+
     }
 }