zoule 5 月之前
父節點
當前提交
c4761e124d

+ 87 - 98
DW5S.App/UserControl/CtrlHome.Designer.cs

@@ -46,7 +46,8 @@ namespace DW5S.App.UserControl
             SuperToolTip superToolTip3 = new SuperToolTip();
             ToolTipItem toolTipItem3 = new ToolTipItem();
             layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
-            ctrlPage1 = new CtrlPage();
+            ctrlPagePos = new CtrlPage();
+            ctrlPageTask = new CtrlPage();
             txtTimeCho = new ImageComboBoxEdit();
             barManager1 = new DevExpress.XtraBars.BarManager(components);
             barDockControlTop = new DevExpress.XtraBars.BarDockControl();
@@ -55,7 +56,6 @@ namespace DW5S.App.UserControl
             barDockControlRight = new DevExpress.XtraBars.BarDockControl();
             btnStart = new DevExpress.XtraBars.BarButtonItem();
             btnStop = new DevExpress.XtraBars.BarButtonItem();
-            btnSearch = new SimpleButton();
             txtEndTime = new DateEdit();
             txtStartTime = new DateEdit();
             mapControl1 = new DevExpress.XtraMap.MapControl();
@@ -74,14 +74,13 @@ namespace DW5S.App.UserControl
             layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
             layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
             layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
-            layoutControlItemSearch = new DevExpress.XtraLayout.LayoutControlItem();
             layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup();
             layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
             itemStart = new DevExpress.XtraLayout.LayoutControlItem();
             itemEnd = new DevExpress.XtraLayout.LayoutControlItem();
             layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
             layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
-            emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
+            layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
             splitterItem1 = new DevExpress.XtraLayout.SplitterItem();
             splitterItem2 = new DevExpress.XtraLayout.SplitterItem();
             svgImageCollection1 = new SvgImageCollection(components);
@@ -111,14 +110,13 @@ namespace DW5S.App.UserControl
             ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit();
             ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).BeginInit();
             ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)layoutControlItemSearch).BeginInit();
             ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).BeginInit();
             ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit();
             ((System.ComponentModel.ISupportInitialize)itemStart).BeginInit();
             ((System.ComponentModel.ISupportInitialize)itemEnd).BeginInit();
             ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit();
             ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit();
             ((System.ComponentModel.ISupportInitialize)splitterItem1).BeginInit();
             ((System.ComponentModel.ISupportInitialize)splitterItem2).BeginInit();
             ((System.ComponentModel.ISupportInitialize)svgImageCollection1).BeginInit();
@@ -127,9 +125,9 @@ namespace DW5S.App.UserControl
             // 
             // layoutControl1
             // 
-            layoutControl1.Controls.Add(ctrlPage1);
+            layoutControl1.Controls.Add(ctrlPagePos);
+            layoutControl1.Controls.Add(ctrlPageTask);
             layoutControl1.Controls.Add(txtTimeCho);
-            layoutControl1.Controls.Add(btnSearch);
             layoutControl1.Controls.Add(txtEndTime);
             layoutControl1.Controls.Add(txtStartTime);
             layoutControl1.Controls.Add(mapControl1);
@@ -142,32 +140,43 @@ namespace DW5S.App.UserControl
             layoutControl1.Name = "layoutControl1";
             layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(1088, 144, 650, 400);
             layoutControl1.Root = Root;
-            layoutControl1.Size = new System.Drawing.Size(1096, 523);
+            layoutControl1.Size = new System.Drawing.Size(1659, 523);
             layoutControl1.TabIndex = 0;
             layoutControl1.Text = "layoutControl1";
             // 
-            // ctrlPage1
+            // ctrlPagePos
             // 
-            ctrlPage1.Compact = true;
-            ctrlPage1.Location = new System.Drawing.Point(5, 492);
-            ctrlPage1.Margin = new System.Windows.Forms.Padding(0);
-            ctrlPage1.MinimumSize = new System.Drawing.Size(100, 26);
-            ctrlPage1.Name = "ctrlPage1";
-            ctrlPage1.ShowGoto = false;
-            ctrlPage1.Size = new System.Drawing.Size(127, 26);
-            ctrlPage1.TabIndex = 10;
+            ctrlPagePos.AlignRight = true;
+            ctrlPagePos.Compact = true;
+            ctrlPagePos.Location = new System.Drawing.Point(1050, 166);
+            ctrlPagePos.Margin = new System.Windows.Forms.Padding(0);
+            ctrlPagePos.MinimumSize = new System.Drawing.Size(100, 26);
+            ctrlPagePos.Name = "ctrlPagePos";
+            ctrlPagePos.Size = new System.Drawing.Size(604, 26);
+            ctrlPagePos.TabIndex = 10;
+            // 
+            // ctrlPageTask
+            // 
+            ctrlPageTask.Compact = true;
+            ctrlPageTask.Location = new System.Drawing.Point(5, 492);
+            ctrlPageTask.Margin = new System.Windows.Forms.Padding(0);
+            ctrlPageTask.MinimumSize = new System.Drawing.Size(100, 26);
+            ctrlPageTask.Name = "ctrlPageTask";
+            ctrlPageTask.ShowGoto = false;
+            ctrlPageTask.Size = new System.Drawing.Size(194, 26);
+            ctrlPageTask.TabIndex = 2;
             // 
             // txtTimeCho
             // 
             txtTimeCho.EditValue = 1;
-            txtTimeCho.Location = new System.Drawing.Point(369, 212);
+            txtTimeCho.Location = new System.Drawing.Point(436, 168);
             txtTimeCho.MenuManager = barManager1;
             txtTimeCho.Name = "txtTimeCho";
             txtTimeCho.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
             txtTimeCho.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.ImageComboBoxItem[] { new DevExpress.XtraEditors.Controls.ImageComboBoxItem("最近1小时", 1, -1), new DevExpress.XtraEditors.Controls.ImageComboBoxItem("最近6小时", 6, -1), new DevExpress.XtraEditors.Controls.ImageComboBoxItem("最近12小时", 12, -1), new DevExpress.XtraEditors.Controls.ImageComboBoxItem("最近1天", 24, -1), new DevExpress.XtraEditors.Controls.ImageComboBoxItem("最近3天", 72, -1), new DevExpress.XtraEditors.Controls.ImageComboBoxItem("自定义", 0, -1) });
             txtTimeCho.Size = new System.Drawing.Size(99, 20);
             txtTimeCho.StyleController = layoutControl1;
-            txtTimeCho.TabIndex = 4;
+            txtTimeCho.TabIndex = 5;
             txtTimeCho.SelectedIndexChanged += txtTimeCho_SelectedIndexChanged;
             // 
             // barManager1
@@ -187,7 +196,7 @@ namespace DW5S.App.UserControl
             barDockControlTop.Location = new System.Drawing.Point(0, 0);
             barDockControlTop.Manager = barManager1;
             barDockControlTop.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            barDockControlTop.Size = new System.Drawing.Size(1096, 0);
+            barDockControlTop.Size = new System.Drawing.Size(1659, 0);
             // 
             // barDockControlBottom
             // 
@@ -196,7 +205,7 @@ namespace DW5S.App.UserControl
             barDockControlBottom.Location = new System.Drawing.Point(0, 523);
             barDockControlBottom.Manager = barManager1;
             barDockControlBottom.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            barDockControlBottom.Size = new System.Drawing.Size(1096, 0);
+            barDockControlBottom.Size = new System.Drawing.Size(1659, 0);
             // 
             // barDockControlLeft
             // 
@@ -211,7 +220,7 @@ namespace DW5S.App.UserControl
             // 
             barDockControlRight.CausesValidation = false;
             barDockControlRight.Dock = System.Windows.Forms.DockStyle.Right;
-            barDockControlRight.Location = new System.Drawing.Point(1096, 0);
+            barDockControlRight.Location = new System.Drawing.Point(1659, 0);
             barDockControlRight.Manager = barManager1;
             barDockControlRight.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             barDockControlRight.Size = new System.Drawing.Size(0, 523);
@@ -232,53 +241,43 @@ namespace DW5S.App.UserControl
             btnStop.Name = "btnStop";
             btnStop.ItemClick += btn_ItemClick;
             // 
-            // btnSearch
-            // 
-            btnSearch.Location = new System.Drawing.Point(985, 212);
-            btnSearch.Name = "btnSearch";
-            btnSearch.Size = new System.Drawing.Size(84, 21);
-            btnSearch.StyleController = layoutControl1;
-            btnSearch.TabIndex = 8;
-            btnSearch.Text = "查询";
-            btnSearch.Click += btnSearch_Click;
-            // 
             // txtEndTime
             // 
             txtEndTime.EditValue = null;
-            txtEndTime.Location = new System.Drawing.Point(739, 212);
+            txtEndTime.Location = new System.Drawing.Point(806, 168);
             txtEndTime.MenuManager = barManager1;
             txtEndTime.Name = "txtEndTime";
             txtEndTime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
             txtEndTime.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
             txtEndTime.Size = new System.Drawing.Size(149, 20);
             txtEndTime.StyleController = layoutControl1;
-            txtEndTime.TabIndex = 6;
+            txtEndTime.TabIndex = 7;
             // 
             // txtStartTime
             // 
             txtStartTime.EditValue = null;
-            txtStartTime.Location = new System.Drawing.Point(529, 212);
+            txtStartTime.Location = new System.Drawing.Point(596, 168);
             txtStartTime.MenuManager = barManager1;
             txtStartTime.Name = "txtStartTime";
             txtStartTime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
             txtStartTime.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
             txtStartTime.Size = new System.Drawing.Size(149, 20);
             txtStartTime.StyleController = layoutControl1;
-            txtStartTime.TabIndex = 5;
+            txtStartTime.TabIndex = 6;
             // 
             // mapControl1
             // 
-            mapControl1.Location = new System.Drawing.Point(149, 2);
+            mapControl1.Location = new System.Drawing.Point(216, 2);
             mapControl1.Name = "mapControl1";
-            mapControl1.Size = new System.Drawing.Size(945, 170);
-            mapControl1.TabIndex = 2;
+            mapControl1.Size = new System.Drawing.Size(1441, 126);
+            mapControl1.TabIndex = 3;
             // 
             // gridHomePosRes
             // 
-            gridHomePosRes.Location = new System.Drawing.Point(150, 236);
+            gridHomePosRes.Location = new System.Drawing.Point(217, 194);
             gridHomePosRes.MainView = gridView2;
             gridHomePosRes.Name = "gridHomePosRes";
-            gridHomePosRes.Size = new System.Drawing.Size(943, 284);
+            gridHomePosRes.Size = new System.Drawing.Size(1439, 326);
             gridHomePosRes.TabIndex = 9;
             gridHomePosRes.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView2 });
             // 
@@ -294,7 +293,7 @@ namespace DW5S.App.UserControl
             gridHomeTask.MainView = gridView1;
             gridHomeTask.Name = "gridHomeTask";
             gridHomeTask.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { repositoryItemImageEdit1 });
-            gridHomeTask.Size = new System.Drawing.Size(131, 464);
+            gridHomeTask.Size = new System.Drawing.Size(198, 464);
             gridHomeTask.TabIndex = 0;
             gridHomeTask.ToolTipController = toolTipController1;
             gridHomeTask.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 });
@@ -317,23 +316,24 @@ namespace DW5S.App.UserControl
             // 
             // btnIncludeInvalidate
             // 
-            btnIncludeInvalidate.Location = new System.Drawing.Point(896, 212);
+            btnIncludeInvalidate.Location = new System.Drawing.Point(963, 168);
             btnIncludeInvalidate.Name = "btnIncludeInvalidate";
+            btnIncludeInvalidate.Properties.AutoHeight = false;
             btnIncludeInvalidate.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default;
             btnIncludeInvalidate.Properties.Caption = "包含无效点";
-            btnIncludeInvalidate.Size = new System.Drawing.Size(83, 20);
+            btnIncludeInvalidate.Size = new System.Drawing.Size(83, 21);
             btnIncludeInvalidate.StyleController = layoutControl1;
-            btnIncludeInvalidate.TabIndex = 7;
+            btnIncludeInvalidate.TabIndex = 8;
             // 
             // txtFrequpMHz
             // 
             txtFrequpMHz.EditValue = 1;
-            txtFrequpMHz.Location = new System.Drawing.Point(209, 212);
+            txtFrequpMHz.Location = new System.Drawing.Point(276, 168);
             txtFrequpMHz.Name = "txtFrequpMHz";
             txtFrequpMHz.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
             txtFrequpMHz.Size = new System.Drawing.Size(99, 20);
             txtFrequpMHz.StyleController = layoutControl1;
-            txtFrequpMHz.TabIndex = 3;
+            txtFrequpMHz.TabIndex = 4;
             txtFrequpMHz.SelectedIndexChanged += txtFrequpMHz_SelectedIndexChanged;
             // 
             // Root
@@ -343,15 +343,15 @@ namespace DW5S.App.UserControl
             Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem3, layoutControlGroup1, layoutControlGroup2, splitterItem1, splitterItem2 });
             Root.Name = "Root";
             Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
-            Root.Size = new System.Drawing.Size(1096, 523);
+            Root.Size = new System.Drawing.Size(1659, 523);
             Root.TextVisible = false;
             // 
             // layoutControlItem3
             // 
             layoutControlItem3.Control = mapControl1;
-            layoutControlItem3.Location = new System.Drawing.Point(147, 0);
+            layoutControlItem3.Location = new System.Drawing.Point(214, 0);
             layoutControlItem3.Name = "layoutControlItem3";
-            layoutControlItem3.Size = new System.Drawing.Size(949, 174);
+            layoutControlItem3.Size = new System.Drawing.Size(1445, 130);
             layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
             layoutControlItem3.TextVisible = false;
             // 
@@ -375,7 +375,7 @@ namespace DW5S.App.UserControl
             layoutControlGroup1.Location = new System.Drawing.Point(0, 0);
             layoutControlGroup1.Name = "layoutControlGroup1";
             layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
-            layoutControlGroup1.Size = new System.Drawing.Size(137, 523);
+            layoutControlGroup1.Size = new System.Drawing.Size(204, 523);
             layoutControlGroup1.Text = "任务管理";
             layoutControlGroup1.CustomButtonClick += layoutControlGroup1_CustomButtonClick;
             // 
@@ -385,62 +385,48 @@ namespace DW5S.App.UserControl
             layoutControlItem1.Location = new System.Drawing.Point(0, 0);
             layoutControlItem1.Name = "layoutControlItem1";
             layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
-            layoutControlItem1.Size = new System.Drawing.Size(131, 464);
+            layoutControlItem1.Size = new System.Drawing.Size(198, 464);
             layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
             layoutControlItem1.TextVisible = false;
             // 
             // layoutControlItem6
             // 
-            layoutControlItem6.Control = ctrlPage1;
+            layoutControlItem6.Control = ctrlPageTask;
             layoutControlItem6.Location = new System.Drawing.Point(0, 464);
             layoutControlItem6.MaxSize = new System.Drawing.Size(0, 30);
             layoutControlItem6.MinSize = new System.Drawing.Size(104, 30);
             layoutControlItem6.Name = "layoutControlItem6";
-            layoutControlItem6.Size = new System.Drawing.Size(131, 30);
+            layoutControlItem6.Size = new System.Drawing.Size(198, 30);
             layoutControlItem6.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
             layoutControlItem6.TextVisible = false;
             // 
             // layoutControlGroup2
             // 
-            layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2, layoutControlItemSearch, layoutControlGroup3, emptySpaceItem1 });
-            layoutControlGroup2.Location = new System.Drawing.Point(147, 184);
+            layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2, layoutControlGroup3, layoutControlItem7 });
+            layoutControlGroup2.Location = new System.Drawing.Point(214, 140);
             layoutControlGroup2.Name = "layoutControlGroup2";
             layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
-            layoutControlGroup2.Size = new System.Drawing.Size(949, 339);
+            layoutControlGroup2.Size = new System.Drawing.Size(1445, 383);
             layoutControlGroup2.Text = "定位结果";
             // 
             // layoutControlItem2
             // 
             layoutControlItem2.Control = gridHomePosRes;
-            layoutControlItem2.Location = new System.Drawing.Point(0, 28);
+            layoutControlItem2.Location = new System.Drawing.Point(0, 30);
             layoutControlItem2.Name = "layoutControlItem2";
             layoutControlItem2.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
-            layoutControlItem2.Size = new System.Drawing.Size(943, 284);
+            layoutControlItem2.Size = new System.Drawing.Size(1439, 326);
             layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
             layoutControlItem2.TextVisible = false;
             // 
-            // layoutControlItemSearch
-            // 
-            layoutControlItemSearch.Control = btnSearch;
-            layoutControlItemSearch.Location = new System.Drawing.Point(831, 0);
-            layoutControlItemSearch.MaxSize = new System.Drawing.Size(90, 26);
-            layoutControlItemSearch.MinSize = new System.Drawing.Size(90, 26);
-            layoutControlItemSearch.Name = "layoutControlItemSearch";
-            layoutControlItemSearch.Padding = new DevExpress.XtraLayout.Utils.Padding(4, 2, 4, 1);
-            layoutControlItemSearch.Size = new System.Drawing.Size(90, 28);
-            layoutControlItemSearch.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            layoutControlItemSearch.TextSize = new System.Drawing.Size(0, 0);
-            layoutControlItemSearch.TextVisible = false;
-            layoutControlItemSearch.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
-            // 
             // layoutControlGroup3
             // 
             layoutControlGroup3.GroupBordersVisible = false;
             layoutControlGroup3.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem8, itemStart, itemEnd, layoutControlItem4, layoutControlItem5 });
             layoutControlGroup3.Location = new System.Drawing.Point(0, 0);
             layoutControlGroup3.Name = "layoutControlGroup3";
-            layoutControlGroup3.Size = new System.Drawing.Size(831, 28);
+            layoutControlGroup3.Size = new System.Drawing.Size(831, 30);
             // 
             // layoutControlItem8
             // 
@@ -449,7 +435,7 @@ namespace DW5S.App.UserControl
             layoutControlItem8.MaxSize = new System.Drawing.Size(160, 28);
             layoutControlItem8.MinSize = new System.Drawing.Size(160, 28);
             layoutControlItem8.Name = "layoutControlItem8";
-            layoutControlItem8.Size = new System.Drawing.Size(160, 28);
+            layoutControlItem8.Size = new System.Drawing.Size(160, 30);
             layoutControlItem8.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             layoutControlItem8.Spacing = new DevExpress.XtraLayout.Utils.Padding(4, 0, 2, 0);
             layoutControlItem8.Text = "时间选择";
@@ -464,7 +450,7 @@ namespace DW5S.App.UserControl
             itemStart.MaxSize = new System.Drawing.Size(210, 28);
             itemStart.MinSize = new System.Drawing.Size(210, 28);
             itemStart.Name = "itemStart";
-            itemStart.Size = new System.Drawing.Size(210, 28);
+            itemStart.Size = new System.Drawing.Size(210, 30);
             itemStart.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             itemStart.Spacing = new DevExpress.XtraLayout.Utils.Padding(4, 0, 2, 0);
             itemStart.Text = "开始时间";
@@ -480,7 +466,7 @@ namespace DW5S.App.UserControl
             itemEnd.MaxSize = new System.Drawing.Size(210, 28);
             itemEnd.MinSize = new System.Drawing.Size(210, 28);
             itemEnd.Name = "itemEnd";
-            itemEnd.Size = new System.Drawing.Size(210, 28);
+            itemEnd.Size = new System.Drawing.Size(210, 30);
             itemEnd.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             itemEnd.Spacing = new DevExpress.XtraLayout.Utils.Padding(4, 0, 2, 0);
             itemEnd.Text = "结束时间";
@@ -495,10 +481,11 @@ namespace DW5S.App.UserControl
             layoutControlItem4.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             layoutControlItem4.CustomizationFormText = "时间选择";
             layoutControlItem4.Location = new System.Drawing.Point(740, 0);
-            layoutControlItem4.MaxSize = new System.Drawing.Size(91, 28);
-            layoutControlItem4.MinSize = new System.Drawing.Size(91, 28);
+            layoutControlItem4.MaxSize = new System.Drawing.Size(91, 0);
+            layoutControlItem4.MinSize = new System.Drawing.Size(91, 26);
             layoutControlItem4.Name = "layoutControlItem4";
-            layoutControlItem4.Size = new System.Drawing.Size(91, 28);
+            layoutControlItem4.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 5);
+            layoutControlItem4.Size = new System.Drawing.Size(91, 30);
             layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             layoutControlItem4.Spacing = new DevExpress.XtraLayout.Utils.Padding(4, 0, 2, 0);
             layoutControlItem4.Text = "时间选择";
@@ -516,7 +503,7 @@ namespace DW5S.App.UserControl
             layoutControlItem5.MaxSize = new System.Drawing.Size(160, 28);
             layoutControlItem5.MinSize = new System.Drawing.Size(160, 28);
             layoutControlItem5.Name = "layoutControlItem5";
-            layoutControlItem5.Size = new System.Drawing.Size(160, 28);
+            layoutControlItem5.Size = new System.Drawing.Size(160, 30);
             layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             layoutControlItem5.Spacing = new DevExpress.XtraLayout.Utils.Padding(4, 0, 2, 0);
             layoutControlItem5.Text = "上行频点";
@@ -524,27 +511,31 @@ namespace DW5S.App.UserControl
             layoutControlItem5.TextSize = new System.Drawing.Size(48, 14);
             layoutControlItem5.TextToControlDistance = 5;
             // 
-            // emptySpaceItem1
+            // layoutControlItem7
             // 
-            emptySpaceItem1.AllowHotTrack = false;
-            emptySpaceItem1.Location = new System.Drawing.Point(921, 0);
-            emptySpaceItem1.Name = "emptySpaceItem1";
-            emptySpaceItem1.Size = new System.Drawing.Size(22, 28);
-            emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
+            layoutControlItem7.Control = ctrlPagePos;
+            layoutControlItem7.Location = new System.Drawing.Point(831, 0);
+            layoutControlItem7.MaxSize = new System.Drawing.Size(0, 30);
+            layoutControlItem7.MinSize = new System.Drawing.Size(104, 30);
+            layoutControlItem7.Name = "layoutControlItem7";
+            layoutControlItem7.Size = new System.Drawing.Size(608, 30);
+            layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
+            layoutControlItem7.TextVisible = false;
             // 
             // splitterItem1
             // 
             splitterItem1.AllowHotTrack = true;
-            splitterItem1.Location = new System.Drawing.Point(137, 0);
+            splitterItem1.Location = new System.Drawing.Point(204, 0);
             splitterItem1.Name = "splitterItem1";
             splitterItem1.Size = new System.Drawing.Size(10, 523);
             // 
             // splitterItem2
             // 
             splitterItem2.AllowHotTrack = true;
-            splitterItem2.Location = new System.Drawing.Point(147, 174);
+            splitterItem2.Location = new System.Drawing.Point(214, 130);
             splitterItem2.Name = "splitterItem2";
-            splitterItem2.Size = new System.Drawing.Size(949, 10);
+            splitterItem2.Size = new System.Drawing.Size(1445, 10);
             // 
             // svgImageCollection1
             // 
@@ -576,7 +567,7 @@ namespace DW5S.App.UserControl
             Controls.Add(barDockControlBottom);
             Controls.Add(barDockControlTop);
             Name = "CtrlHome";
-            Size = new System.Drawing.Size(1096, 523);
+            Size = new System.Drawing.Size(1659, 523);
             Load += CtrlHome_Load;
             ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit();
             layoutControl1.ResumeLayout(false);
@@ -601,14 +592,13 @@ namespace DW5S.App.UserControl
             ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit();
             ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).EndInit();
             ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit();
-            ((System.ComponentModel.ISupportInitialize)layoutControlItemSearch).EndInit();
             ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).EndInit();
             ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit();
             ((System.ComponentModel.ISupportInitialize)itemStart).EndInit();
             ((System.ComponentModel.ISupportInitialize)itemEnd).EndInit();
             ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit();
             ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit();
-            ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit();
+            ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit();
             ((System.ComponentModel.ISupportInitialize)splitterItem1).EndInit();
             ((System.ComponentModel.ISupportInitialize)splitterItem2).EndInit();
             ((System.ComponentModel.ISupportInitialize)svgImageCollection1).EndInit();
@@ -646,21 +636,20 @@ namespace DW5S.App.UserControl
         public DevExpress.XtraGrid.GridControl gridHomePosRes;
         public DevExpress.XtraGrid.Views.Grid.GridView gridView2;
         public DevExpress.XtraGrid.Views.Grid.GridView gridView1;
-        private SimpleButton btnSearch;
         private DateEdit txtEndTime;
         private DateEdit txtStartTime;
         private DevExpress.XtraLayout.LayoutControlItem itemStart;
         private DevExpress.XtraLayout.LayoutControlItem itemEnd;
-        private DevExpress.XtraLayout.LayoutControlItem layoutControlItemSearch;
         private ImageComboBoxEdit txtTimeCho;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
         private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3;
-        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
         private CheckEdit btnIncludeInvalidate;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
         private ImageComboBoxEdit txtFrequpMHz;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
-        private CtrlPage ctrlPage1;
+        private CtrlPage ctrlPageTask;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
+        private CtrlPage ctrlPagePos;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
     }
 }

+ 45 - 94
DW5S.App/UserControl/CtrlHome.cs

@@ -30,9 +30,9 @@ namespace DW5S.App.UserControl
     public partial class CtrlHome : DevExpress.XtraEditors.XtraUserControl
     {
         List<TaskViewModel> list = new List<TaskViewModel>();
+        List<ModelPosRes> listPos = new List<ModelPosRes>();
+
         TaskViewModel tsk;
-        List<CancellationTokenSource> listCts = new List<CancellationTokenSource>();
-        Dictionary<int, CancellationTokenSource> dicCts = new Dictionary<int, CancellationTokenSource>();
         List<ModelPosRes> cache = new List<ModelPosRes>();//定位点缓存,最多1000条记录
         public CtrlHome()
         {
@@ -48,7 +48,8 @@ namespace DW5S.App.UserControl
 
         private async void CtrlHome_Load(object sender, EventArgs e)
         {
-            this.ctrlPage1.SetOnQuery(LoadPageData);
+            this.ctrlPageTask.SetOnQuery(LoadPageData);
+            this.ctrlPagePos.SetOnQuery(LoadPageDataPos);
             gridView2.ColumnFilterChanged += GridView2_ColumnFilterChanged;
             Messenger.Defalut.Sub<ModelPosRes>("新增定位点", OnPosAdd);
             Messenger.Defalut.Sub<SysSetings>("地图类型改变", OnSysSetingsChanged);
@@ -61,12 +62,6 @@ namespace DW5S.App.UserControl
                 var item = await repsTask.FirstOrDefaultAsync(p => p.Id == id);
                 if (item == null) return;
                 find.TaskState = item.TaskState;
-                //停止查找参考信号
-                if (dicCts.ContainsKey(id))
-                {
-                    dicCts[id]?.Cancel();
-                    dicCts.Remove(id);
-                }
                 this.Invoke(new Action(() =>
                 {
                     var idx = gridView1.FindRow(find);
@@ -83,7 +78,7 @@ namespace DW5S.App.UserControl
             });
             gridHomeTask.UseDefault(list, showScrollH: true).UseEmptyText("点击+创建任务");
             gridView1.BestFitColumns();
-            gridHomePosRes.UseDefault(new List<ModelPosRes>()).UseMultiSelect().UseRowNumber()
+            gridHomePosRes.UseDefault(listPos).UseMultiSelect().UseRowNumber()
                 .AddRowMenu<ModelPosRes>("绘制时差线", SvgHelper.CreateDtoLine(), DrawDtoLine)
                 .AddRowMenu<ModelPosRes>("GDOP分析", SvgHelper.CreateGDOP(), DrawGdopLine)//, item => item.PosResType != EnumPosResType.RH
                 .AddRowMenu<ModelPosRes>("查看参估", SvgHelper.CreateShowCafRes(), ShowCafRes)
@@ -246,7 +241,40 @@ namespace DW5S.App.UserControl
             gridView1.RefreshData();
             return pageData;
         }
+        private async Task<PageData> LoadPageDataPos(PageQueryDto arg)
+        {
+            if (tsk == null) return null;
+            var repsPos = IocContainer.UnitOfWork.OfLong<PosRes>();
+            var queryable = repsPos.AsQueryable();
+            queryable = queryable.Where(p => p.TaskInfoID == tsk.Id);
+
+            if (txtFrequpMHz.EditValue != null)
+                queryable = queryable.Where(p => p.FreqUpHz == (long)txtFrequpMHz.EditValue);
+            if (!btnIncludeInvalidate.Checked)
+            {
+                //???无效点怎么不见了
+                //queryable = queryable.Where(p => p.Validate == true);
+            }
+            if (txtTimeCho.Text == "自定义")
+            {
+                if (txtStartTime.DateTime == DateTime.MinValue || txtEndTime.DateTime == DateTime.MinValue) return null;
+                queryable = queryable.Where(p => p.SigTime >= txtStartTime.DateTime && p.SigTime <= txtEndTime.DateTime);
+            }
+            else
+            {
+                var endTime = queryable.Max(p => (DateTime?)p.SigTime);
+                if (endTime == null) return null;
+                var beginTime = endTime.Value.AddHours(-Convert.ToInt32(txtTimeCho.EditValue));
+                queryable = queryable.Where(p => p.SigTime >= beginTime && p.SigTime <= endTime);
 
+            }
+            queryable = queryable.OrderByDescending(p => p.SigTime).ThenBy(p => p.FreqUpHz);
+            var pageData = await repsPos.GetPageData(arg, queryable);
+            listPos.Clear();
+            listPos.AddRange(pageData.Data.To<List<ModelPosRes>>());
+            gridView2.RefreshData();
+            return pageData;
+        }
         private void GridView2_ColumnFilterChanged(object sender, EventArgs e)
         {
             try
@@ -306,10 +334,6 @@ namespace DW5S.App.UserControl
         private async void GridView1_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e)
         {
             gridHomePosRes.DataSource = new List<ModelPosRes>();
-            listCts.ForEach(t => t.Cancel());
-            listCts.Clear();
-            var cts = new CancellationTokenSource();
-            listCts.Add(cts);
             mapControl1.DelFixedImg("Sat");
             mapControl1.DelFixedImg("Tx");
             tsk = (e.Row as TaskViewModel);
@@ -341,19 +365,6 @@ namespace DW5S.App.UserControl
             var btnEdit = (layoutControlGroup1.CustomHeaderButtons[1] as GroupBoxButton);
             var btnDel = (layoutControlGroup1.CustomHeaderButtons[2] as GroupBoxButton);
             btnDel.Enabled = btnEdit.Enabled = tsk.TaskState != EnumTaskState.Running;
-            List<ModelPosRes> listPos = null;
-            if (txtTimeCho.Text == "自定义" && (txtStartTime.EditValue == null || txtEndTime.EditValue == null || txtStartTime.DateTime > txtEndTime.DateTime))
-            {
-                listPos = new List<ModelPosRes>();
-                this.gridHomePosRes.DataSource = listPos;
-                mapControl1.SetPosDataSource(listPos);
-            }
-            else
-            {
-                listPos = await searchPos(cts.Token);
-                this.gridHomePosRes.DataSource = listPos;
-                mapControl1.SetPosDataSource(listPos);
-            }
             var unitOfWork = IocContainer.UnitOfWork;
             var repsSat = unitOfWork.Of<SatInfo>();
             var sat1 = await repsSat.FirstOrDefaultAsync(p => p.SatCode == tsk.MainSat);
@@ -365,6 +376,7 @@ namespace DW5S.App.UserControl
                 mapControl1.DrawFixedImg("Sat", "Sat2", 0, sat2.SatLon.Value, DxHelper.SvgHelper.CreateSat(width: 16, height: 16), $"邻1星\r\n{sat2.Sat}");
             if (sat3 != null && sat3.SatLon != null)
                 mapControl1.DrawFixedImg("Sat", "Sat3", 0, sat3.SatLon.Value, DxHelper.SvgHelper.CreateSat(width: 16, height: 16), $"邻2星\r\n{sat3.Sat}");
+            this.ctrlPagePos.RefreshData();
 
         }
         private void GridView1_DoubleClick(object sender, EventArgs e)
@@ -700,7 +712,6 @@ namespace DW5S.App.UserControl
                             var cts = new CancellationTokenSource();
                             PosWithRefFind refFind = new PosWithRefFind();
                             refFind.Start(dto.ID, cts.Token);
-                            dicCts[dto.ID] = cts;
                         }
 
                     }
@@ -757,15 +768,6 @@ namespace DW5S.App.UserControl
                         DxHelper.MsgBoxHelper.ShowError(res.msg);
                     }
 
-                    //停止查找参考信号
-                    if (dicCts.ContainsKey(dto.ID))
-                    {
-                        dicCts[dto.ID]?.Cancel();
-                        dicCts.Remove(dto.ID);
-                    }
-
-
-
                     IocContainer.Logger.Warning($"用户停止了任务,ID={tsk.Id}");
                 }
                 catch (Exception ex)
@@ -783,20 +785,10 @@ namespace DW5S.App.UserControl
 
         private void txtFrequpMHz_SelectedIndexChanged(object sender, EventArgs e)
         {
-            txtTimeCho_SelectedIndexChanged(null, null);
+            this.ctrlPagePos.RefreshData();
         }
-        private async void txtTimeCho_SelectedIndexChanged(object sender, EventArgs e)
+        private void txtTimeCho_SelectedIndexChanged(object sender, EventArgs e)
         {
-            listCts.ForEach(t => t.Cancel());
-            listCts.Clear();
-            this.gridHomePosRes.DataSource = new List<ModelPosRes>();//先设为空,数据相同时便于观察结果有没有变化
-            this.mapControl1.SetPosDataSource(new List<ModelPosRes>());
-            if (tsk == null)
-            {
-                return;
-            }
-            var cts = new CancellationTokenSource();
-            listCts.Add(cts);
             switch (txtTimeCho.Text)
             {
                 case "最近1小时":
@@ -806,60 +798,19 @@ namespace DW5S.App.UserControl
                 case "最近3天":
                     itemStart.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
                     itemEnd.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
-                    layoutControlItemSearch.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
-                    var list = await searchPos(cts.Token);
-                    this.gridHomePosRes.DataSource = list;
-                    this.mapControl1.SetPosDataSource(list);
                     break;
                 case "自定义":
                     itemStart.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
                     itemEnd.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
-                    layoutControlItemSearch.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
                     break;
             }
-
+            this.ctrlPagePos.RefreshData();
         }
-        private async void BtnIncludeInvalidate_CheckedChanged(object sender, EventArgs e)
+        private void BtnIncludeInvalidate_CheckedChanged(object sender, EventArgs e)
         {
-            if (txtTimeCho.Text != "自定义")
-            {
-                listCts.ForEach(t => t.Cancel());
-                listCts.Clear();
-                this.gridHomePosRes.DataSource = new List<ModelPosRes>();//先设为空,数据相同时便于观察结果有没有变化
-                if (tsk == null)
-                {
-                    return;
-                }
-                var cts = new CancellationTokenSource();
-                listCts.Add(cts);
-                this.gridHomePosRes.DataSource = await searchPos(cts.Token);
-            }
-        }
-        private async void btnSearch_Click(object sender, EventArgs e)
-        {
-            if (txtStartTime.EditValue == null)
-            {
-                DxHelper.MsgBoxHelper.ShowError($"请选择信号开始时间!");
-                return;
-            }
-            if (txtEndTime.EditValue == null)
-            {
-                DxHelper.MsgBoxHelper.ShowError($"请选择信号结束时间!");
-                return;
-            }
-            if (txtStartTime.DateTime > txtEndTime.DateTime)
-            {
-                DxHelper.MsgBoxHelper.ShowError($"开始时间不能大于结束时间!");
-                return;
-            }
-            listCts.ForEach(t => t.Cancel());
-            listCts.Clear();
-            var cts = new CancellationTokenSource();
-            listCts.Add(cts);
-            var listPos = await searchPos(cts.Token);
-            this.gridHomePosRes.DataSource = listPos;
-            this.mapControl1.SetPosDataSource(listPos);
+            this.ctrlPagePos.RefreshData();
         }
+
         private async Task<List<ModelPosRes>> searchPos(CancellationToken ct = default)
         {
             gridView2.ClearSorting();

+ 28 - 19
DW5S.App/UserControl/CtrlPage.Designer.cs

@@ -38,6 +38,7 @@
             txtCountPerPage = new DevExpress.XtraEditors.ComboBoxEdit();
             stackPanel1 = new DevExpress.Utils.Layout.StackPanel();
             labelControl1 = new DevExpress.XtraEditors.LabelControl();
+            labelControl3 = new DevExpress.XtraEditors.LabelControl();
             labelControl2 = new DevExpress.XtraEditors.LabelControl();
             txtPageInfo = new DevExpress.XtraEditors.LabelControl();
             ((System.ComponentModel.ISupportInitialize)txtGoPage.Properties).BeginInit();
@@ -50,7 +51,7 @@
             // 
             btnLast.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("btnLast.ImageOptions.SvgImage");
             btnLast.ImageOptions.SvgImageSize = new System.Drawing.Size(12, 12);
-            btnLast.Location = new System.Drawing.Point(311, 10);
+            btnLast.Location = new System.Drawing.Point(315, 3);
             btnLast.Name = "btnLast";
             btnLast.PaintStyle = DevExpress.XtraEditors.Controls.PaintStyles.Light;
             btnLast.ShowFocusRectangle = DevExpress.Utils.DefaultBoolean.False;
@@ -63,7 +64,7 @@
             // 
             btnNext.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("btnNext.ImageOptions.SvgImage");
             btnNext.ImageOptions.SvgImageSize = new System.Drawing.Size(12, 12);
-            btnNext.Location = new System.Drawing.Point(287, 10);
+            btnNext.Location = new System.Drawing.Point(289, 3);
             btnNext.Name = "btnNext";
             btnNext.PaintStyle = DevExpress.XtraEditors.Controls.PaintStyles.Light;
             btnNext.ShowFocusRectangle = DevExpress.Utils.DefaultBoolean.False;
@@ -76,7 +77,7 @@
             // 
             btnPrev.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("btnPrev.ImageOptions.SvgImage");
             btnPrev.ImageOptions.SvgImageSize = new System.Drawing.Size(12, 12);
-            btnPrev.Location = new System.Drawing.Point(176, 10);
+            btnPrev.Location = new System.Drawing.Point(176, 3);
             btnPrev.Name = "btnPrev";
             btnPrev.PaintStyle = DevExpress.XtraEditors.Controls.PaintStyles.Light;
             btnPrev.ShowFocusRectangle = DevExpress.Utils.DefaultBoolean.False;
@@ -89,7 +90,7 @@
             // 
             btnFirst.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("btnFirst.ImageOptions.SvgImage");
             btnFirst.ImageOptions.SvgImageSize = new System.Drawing.Size(12, 12);
-            btnFirst.Location = new System.Drawing.Point(151, 10);
+            btnFirst.Location = new System.Drawing.Point(150, 3);
             btnFirst.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3);
             btnFirst.Name = "btnFirst";
             btnFirst.PaintStyle = DevExpress.XtraEditors.Controls.PaintStyles.Light;
@@ -103,7 +104,7 @@
             // 
             btnGo.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("btnGo.ImageOptions.SvgImage");
             btnGo.ImageOptions.SvgImageSize = new System.Drawing.Size(12, 12);
-            btnGo.Location = new System.Drawing.Point(434, 10);
+            btnGo.Location = new System.Drawing.Point(440, 3);
             btnGo.Name = "btnGo";
             btnGo.PaintStyle = DevExpress.XtraEditors.Controls.PaintStyles.Light;
             btnGo.ShowFocusRectangle = DevExpress.Utils.DefaultBoolean.False;
@@ -114,7 +115,7 @@
             // 
             // txtGoPage
             // 
-            txtGoPage.Location = new System.Drawing.Point(353, 10);
+            txtGoPage.Location = new System.Drawing.Point(358, 3);
             txtGoPage.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3);
             txtGoPage.Name = "txtGoPage";
             txtGoPage.Properties.AutoHeight = false;
@@ -125,7 +126,7 @@
             // txtCountPerPage
             // 
             txtCountPerPage.EditValue = "100";
-            txtCountPerPage.Location = new System.Drawing.Point(37, 10);
+            txtCountPerPage.Location = new System.Drawing.Point(33, 3);
             txtCountPerPage.Name = "txtCountPerPage";
             txtCountPerPage.Properties.AutoHeight = false;
             txtCountPerPage.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
@@ -138,6 +139,7 @@
             // stackPanel1
             // 
             stackPanel1.Controls.Add(labelControl1);
+            stackPanel1.Controls.Add(labelControl3);
             stackPanel1.Controls.Add(txtCountPerPage);
             stackPanel1.Controls.Add(labelControl2);
             stackPanel1.Controls.Add(btnFirst);
@@ -147,25 +149,31 @@
             stackPanel1.Controls.Add(btnLast);
             stackPanel1.Controls.Add(txtGoPage);
             stackPanel1.Controls.Add(btnGo);
-            stackPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
+            stackPanel1.Dock = System.Windows.Forms.DockStyle.Top;
             stackPanel1.Location = new System.Drawing.Point(0, 0);
             stackPanel1.Name = "stackPanel1";
-            stackPanel1.Size = new System.Drawing.Size(796, 42);
+            stackPanel1.Size = new System.Drawing.Size(910, 26);
             stackPanel1.TabIndex = 2;
-            stackPanel1.UseSkinIndents = true;
             // 
             // labelControl1
             // 
-            labelControl1.Location = new System.Drawing.Point(11, 13);
-            labelControl1.Margin = new System.Windows.Forms.Padding(0);
+            labelControl1.Location = new System.Drawing.Point(3, 6);
             labelControl1.Name = "labelControl1";
-            labelControl1.Size = new System.Drawing.Size(24, 14);
-            labelControl1.TabIndex = 0;
-            labelControl1.Text = "每页";
+            labelControl1.Size = new System.Drawing.Size(0, 14);
+            labelControl1.TabIndex = 9;
+            // 
+            // labelControl3
+            // 
+            labelControl3.Location = new System.Drawing.Point(6, 6);
+            labelControl3.Margin = new System.Windows.Forms.Padding(0);
+            labelControl3.Name = "labelControl3";
+            labelControl3.Size = new System.Drawing.Size(24, 14);
+            labelControl3.TabIndex = 0;
+            labelControl3.Text = "每页";
             // 
             // labelControl2
             // 
-            labelControl2.Location = new System.Drawing.Point(117, 13);
+            labelControl2.Location = new System.Drawing.Point(115, 6);
             labelControl2.Name = "labelControl2";
             labelControl2.Size = new System.Drawing.Size(12, 14);
             labelControl2.TabIndex = 0;
@@ -173,7 +181,7 @@
             // 
             // txtPageInfo
             // 
-            txtPageInfo.Location = new System.Drawing.Point(208, 13);
+            txtPageInfo.Location = new System.Drawing.Point(209, 6);
             txtPageInfo.Margin = new System.Windows.Forms.Padding(10, 3, 10, 3);
             txtPageInfo.Name = "txtPageInfo";
             txtPageInfo.Size = new System.Drawing.Size(67, 14);
@@ -187,7 +195,7 @@
             Controls.Add(stackPanel1);
             Margin = new System.Windows.Forms.Padding(0);
             Name = "CtrlPage";
-            Size = new System.Drawing.Size(796, 42);
+            Size = new System.Drawing.Size(910, 26);
             ((System.ComponentModel.ISupportInitialize)txtGoPage.Properties).EndInit();
             ((System.ComponentModel.ISupportInitialize)txtCountPerPage.Properties).EndInit();
             ((System.ComponentModel.ISupportInitialize)stackPanel1).EndInit();
@@ -205,8 +213,9 @@
         private DevExpress.XtraEditors.TextEdit txtGoPage;
         private DevExpress.XtraEditors.ComboBoxEdit txtCountPerPage;
         private DevExpress.Utils.Layout.StackPanel stackPanel1;
-        private DevExpress.XtraEditors.LabelControl labelControl1;
         private DevExpress.XtraEditors.LabelControl labelControl2;
         private DevExpress.XtraEditors.LabelControl txtPageInfo;
+        private DevExpress.XtraEditors.LabelControl labelControl3;
+        private DevExpress.XtraEditors.LabelControl labelControl1;
     }
 }

+ 39 - 0
DW5S.App/UserControl/CtrlPage.cs

@@ -93,6 +93,36 @@ namespace DW5S.App.UserControl
             }
         }
 
+        private bool alignRight = false;
+
+        /// <summary>
+        /// 是否右对齐(默认false)
+        /// </summary>
+        [ToolboxItem(false)]
+        [DefaultValue(false)]
+        [Category("Style"), Description("右对齐")]
+        public bool AlignRight
+        {
+            get
+            {
+                return alignRight;
+            }
+            set
+            {
+                alignRight = value;
+                if (alignRight)
+                {
+                    labelControl1.Text = " ";
+                    stackPanel1.SetStretched(labelControl1, true);
+                }
+                else
+                {
+                    labelControl1.Text = "";
+                    stackPanel1.SetStretched(labelControl1, false);
+                }
+            }
+        }
+
         /// <summary>
         /// 当前页数
         /// </summary>
@@ -153,6 +183,15 @@ namespace DW5S.App.UserControl
                     CountPerPage = countPerPage,
                     Page = CurrentPage,
                 });
+                if (pageData == null)
+                {
+                    pageData = new DTO.PageData()
+                    {
+                        CountPerPage = 100,
+                        Page = 1,
+                        TotalCount = 0,
+                    };
+                }
                 this.CurrentPage = pageData.Page;
                 txtPageInfo.Text = $"第{pageData.Page}页/共{pageData.TotalPage}页";
             }

+ 1 - 1
DW5S.DTO/PageQueryDto.cs

@@ -27,7 +27,7 @@ namespace DW5S.DTO
     /// <summary>
     /// 分页查询结果
     /// </summary>
-    public abstract class PageData
+    public  class PageData
     {
         /// <summary>
         /// 记录总条数