瀏覽代碼

添加星历分页控件

wyq 2 年之前
父節點
當前提交
bc2e0ac283

+ 25 - 26
XdCxRhDW.App/CorTools/XlCalculateForm.Designer.cs

@@ -95,7 +95,7 @@
             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(800, 450);
+            this.layoutControl1.Size = new System.Drawing.Size(1015, 663);
             this.layoutControl1.TabIndex = 0;
             this.layoutControl1.Text = "layoutControl1";
             // 
@@ -104,7 +104,7 @@
             this.gridControl.Location = new System.Drawing.Point(12, 64);
             this.gridControl.MainView = this.gridView;
             this.gridControl.Name = "gridControl";
-            this.gridControl.Size = new System.Drawing.Size(776, 374);
+            this.gridControl.Size = new System.Drawing.Size(991, 587);
             this.gridControl.TabIndex = 10;
             this.gridControl.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
             this.gridView});
@@ -116,7 +116,7 @@
             // 
             // btnCalculate
             // 
-            this.btnCalculate.Location = new System.Drawing.Point(692, 37);
+            this.btnCalculate.Location = new System.Drawing.Point(907, 37);
             this.btnCalculate.Name = "btnCalculate";
             this.btnCalculate.Size = new System.Drawing.Size(96, 24);
             this.btnCalculate.StyleController = this.layoutControl1;
@@ -126,19 +126,19 @@
             // 
             // txtSpanSeconds
             // 
-            this.txtSpanSeconds.Location = new System.Drawing.Point(405, 38);
+            this.txtSpanSeconds.Location = new System.Drawing.Point(513, 38);
             this.txtSpanSeconds.Name = "txtSpanSeconds";
             this.txtSpanSeconds.Properties.AutoHeight = false;
             this.txtSpanSeconds.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "秒", -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.txtSpanSeconds.Size = new System.Drawing.Size(113, 22);
+            this.txtSpanSeconds.Size = new System.Drawing.Size(166, 22);
             this.txtSpanSeconds.StyleController = this.layoutControl1;
             this.txtSpanSeconds.TabIndex = 8;
             // 
             // txtEndTime
             // 
             this.txtEndTime.EditValue = null;
-            this.txtEndTime.Location = new System.Drawing.Point(235, 38);
+            this.txtEndTime.Location = new System.Drawing.Point(289, 38);
             this.txtEndTime.Name = "txtEndTime";
             this.txtEndTime.Properties.AutoHeight = false;
             this.txtEndTime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
@@ -150,7 +150,7 @@
             this.txtEndTime.Properties.EditFormat.FormatString = "yyyy-MM-dd HH:mm:ss";
             this.txtEndTime.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
             this.txtEndTime.Properties.MaskSettings.Set("mask", "yyyy-MM-dd HH:mm:ss");
-            this.txtEndTime.Size = new System.Drawing.Size(113, 22);
+            this.txtEndTime.Size = new System.Drawing.Size(167, 22);
             this.txtEndTime.StyleController = this.layoutControl1;
             this.txtEndTime.TabIndex = 7;
             // 
@@ -169,7 +169,7 @@
             this.txtStartTime.Properties.EditFormat.FormatString = "yyyy-MM-dd HH:mm:ss";
             this.txtStartTime.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
             this.txtStartTime.Properties.MaskSettings.Set("mask", "yyyy-MM-dd HH:mm:ss");
-            this.txtStartTime.Size = new System.Drawing.Size(113, 22);
+            this.txtStartTime.Size = new System.Drawing.Size(167, 22);
             this.txtStartTime.StyleController = this.layoutControl1;
             this.txtStartTime.TabIndex = 6;
             // 
@@ -181,7 +181,7 @@
             this.txtTle.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
             this.txtTle.Properties.PopupView = this.searchLookUpEdit1View;
-            this.txtTle.Size = new System.Drawing.Size(723, 22);
+            this.txtTle.Size = new System.Drawing.Size(938, 22);
             this.txtTle.StyleController = this.layoutControl1;
             this.txtTle.TabIndex = 5;
             this.txtTle.ToolTip = "填写卫星的双行根数";
@@ -196,12 +196,12 @@
             // txtTimeout
             // 
             this.txtTimeout.EditValue = "30";
-            this.txtTimeout.Location = new System.Drawing.Point(575, 38);
+            this.txtTimeout.Location = new System.Drawing.Point(736, 38);
             this.txtTimeout.Name = "txtTimeout";
             this.txtTimeout.Properties.AutoHeight = false;
             this.txtTimeout.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "秒", -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.txtTimeout.Size = new System.Drawing.Size(113, 22);
+            this.txtTimeout.Size = new System.Drawing.Size(167, 22);
             this.txtTimeout.StyleController = this.layoutControl1;
             this.txtTimeout.TabIndex = 8;
             // 
@@ -215,7 +215,7 @@
             this.layoutControlItem6,
             this.layoutControlGroup1});
             this.Root.Name = "Root";
-            this.Root.Size = new System.Drawing.Size(800, 450);
+            this.Root.Size = new System.Drawing.Size(1015, 663);
             this.Root.TextVisible = false;
             // 
             // layoutControlItem2
@@ -225,7 +225,7 @@
             this.layoutControlItem2.MaxSize = new System.Drawing.Size(0, 26);
             this.layoutControlItem2.MinSize = new System.Drawing.Size(107, 26);
             this.layoutControlItem2.Name = "layoutControlItem2";
-            this.layoutControlItem2.Size = new System.Drawing.Size(780, 26);
+            this.layoutControlItem2.Size = new System.Drawing.Size(995, 26);
             this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem2.Text = "双行根数";
             this.layoutControlItem2.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize;
@@ -235,7 +235,7 @@
             // layoutControlItem5
             // 
             this.layoutControlItem5.Control = this.btnCalculate;
-            this.layoutControlItem5.Location = new System.Drawing.Point(680, 26);
+            this.layoutControlItem5.Location = new System.Drawing.Point(895, 26);
             this.layoutControlItem5.MaxSize = new System.Drawing.Size(100, 26);
             this.layoutControlItem5.MinSize = new System.Drawing.Size(100, 26);
             this.layoutControlItem5.Name = "layoutControlItem5";
@@ -250,7 +250,7 @@
             this.layoutControlItem6.Control = this.gridControl;
             this.layoutControlItem6.Location = new System.Drawing.Point(0, 52);
             this.layoutControlItem6.Name = "layoutControlItem6";
-            this.layoutControlItem6.Size = new System.Drawing.Size(780, 378);
+            this.layoutControlItem6.Size = new System.Drawing.Size(995, 591);
             this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem6.TextVisible = false;
             // 
@@ -262,7 +262,7 @@
             this.layoutControlGroup1.Location = new System.Drawing.Point(0, 26);
             this.layoutControlGroup1.Name = "layoutControlGroup1";
             this.layoutControlGroup1.ShowInCustomizationForm = false;
-            this.layoutControlGroup1.Size = new System.Drawing.Size(680, 26);
+            this.layoutControlGroup1.Size = new System.Drawing.Size(895, 26);
             // 
             // layoutControlGroup2
             // 
@@ -274,7 +274,7 @@
             this.layoutControlItem7});
             this.layoutControlGroup2.Location = new System.Drawing.Point(0, 0);
             this.layoutControlGroup2.Name = "layoutControlGroup2";
-            this.layoutControlGroup2.Size = new System.Drawing.Size(680, 26);
+            this.layoutControlGroup2.Size = new System.Drawing.Size(895, 26);
             // 
             // layoutControlItem1
             // 
@@ -283,7 +283,7 @@
             this.layoutControlItem1.MaxSize = new System.Drawing.Size(0, 26);
             this.layoutControlItem1.MinSize = new System.Drawing.Size(107, 26);
             this.layoutControlItem1.Name = "layoutControlItem1";
-            this.layoutControlItem1.Size = new System.Drawing.Size(170, 26);
+            this.layoutControlItem1.Size = new System.Drawing.Size(224, 26);
             this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem1.Text = "开始时间";
             this.layoutControlItem1.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize;
@@ -293,11 +293,11 @@
             // layoutControlItem3
             // 
             this.layoutControlItem3.Control = this.txtEndTime;
-            this.layoutControlItem3.Location = new System.Drawing.Point(170, 0);
+            this.layoutControlItem3.Location = new System.Drawing.Point(224, 0);
             this.layoutControlItem3.MaxSize = new System.Drawing.Size(0, 26);
             this.layoutControlItem3.MinSize = new System.Drawing.Size(107, 26);
             this.layoutControlItem3.Name = "layoutControlItem3";
-            this.layoutControlItem3.Size = new System.Drawing.Size(170, 26);
+            this.layoutControlItem3.Size = new System.Drawing.Size(224, 26);
             this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem3.Text = "结束时间";
             this.layoutControlItem3.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize;
@@ -307,11 +307,11 @@
             // layoutControlItem4
             // 
             this.layoutControlItem4.Control = this.txtSpanSeconds;
-            this.layoutControlItem4.Location = new System.Drawing.Point(340, 0);
+            this.layoutControlItem4.Location = new System.Drawing.Point(448, 0);
             this.layoutControlItem4.MaxSize = new System.Drawing.Size(0, 26);
             this.layoutControlItem4.MinSize = new System.Drawing.Size(107, 26);
             this.layoutControlItem4.Name = "layoutControlItem4";
-            this.layoutControlItem4.Size = new System.Drawing.Size(170, 26);
+            this.layoutControlItem4.Size = new System.Drawing.Size(223, 26);
             this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem4.Text = "推算间隔";
             this.layoutControlItem4.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize;
@@ -323,11 +323,11 @@
             this.layoutControlItem7.Control = this.txtTimeout;
             this.layoutControlItem7.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem7.CustomizationFormText = "推算间隔";
-            this.layoutControlItem7.Location = new System.Drawing.Point(510, 0);
+            this.layoutControlItem7.Location = new System.Drawing.Point(671, 0);
             this.layoutControlItem7.MaxSize = new System.Drawing.Size(0, 26);
             this.layoutControlItem7.MinSize = new System.Drawing.Size(107, 26);
             this.layoutControlItem7.Name = "layoutControlItem7";
-            this.layoutControlItem7.Size = new System.Drawing.Size(170, 26);
+            this.layoutControlItem7.Size = new System.Drawing.Size(224, 26);
             this.layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem7.Text = "超时时间";
             this.layoutControlItem7.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize;
@@ -338,11 +338,10 @@
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(800, 450);
+            this.ClientSize = new System.Drawing.Size(1015, 663);
             this.Controls.Add(this.layoutControl1);
             this.Name = "XlCalculateForm";
             this.Text = "XlCalculate";
-            this.Load += new System.EventHandler(this.XlCalculateForm_Load);
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
             this.layoutControl1.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.gridControl)).EndInit();

+ 12 - 5
XdCxRhDW.App/CorTools/XlCalculateForm.cs

@@ -23,17 +23,24 @@ namespace XdCxRhDW.App.CorTools
     public partial class XlCalculateForm : DevExpress.XtraEditors.XtraForm
     {
         List<ModelSatEphRes> listEph = new List<ModelSatEphRes>();
-        public XlCalculateForm()
+
+        public XlCalculateForm(List<XlInfo> xlInfos)
         {
             InitializeComponent();
-        }
-        private async void XlCalculateForm_Load(object sender, EventArgs e)
-        {
+            this.Text = "星历推算";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             gridControl.UseDefault(listEph).UseMultiSelect().UseRowNumber();
             txtStartTime.UseDefault();
             txtEndTime.UseDefault();
             txtTle.UseDoubleClickToSelectAll();
-            txtTle.UseDefault().SetData(await XlRepository.GetAllAsync(), nameof(XlInfo.TwoLine));
+            txtTle.UseDefault().SetData(xlInfos, nameof(XlInfo.TwoLine));
+            if (xlInfos.Count > 0)
+            {
+                var xlinfo= xlInfos.First();
+                this.txtTle.EditValue = xlinfo.TwoLine;
+                this.txtStartTime.EditValue = xlinfo.TimeUTC;
+                this.txtEndTime.EditValue = xlinfo.TimeUTC.AddDays(1);
+            }
         }
 
 

+ 28 - 1
XdCxRhDW.App/ExtensionsDev/GridControlEx.cs

@@ -439,7 +439,34 @@ public static class GridControlEx
         tag.PopupMenu = popupMenu;
         return grid;
     }
-
+    public static GridControl AddMenu(this GridControl grid, string menuText, SvgImage meunImage, Action onClick)
+    {
+        GridTag tag = grid.Tag as GridTag;
+        if (tag.BarM == null)
+        {
+            tag.BarM = new BarManager();
+            tag.BarM.Form = grid;
+        }
+        if (tag.PopupMenu == null)
+        {
+            tag.PopupMenu = new PopupMenu();
+        }
+        PopupMenu popupMenu = tag.PopupMenu;
+        BarButtonItem item = new BarButtonItem();
+        item.ItemClick += (sender, e) =>
+        {
+            item.Enabled = false;
+            onClick?.Invoke();
+            item.Enabled = true;
+        };
+        item.ImageOptions.SvgImage = meunImage;
+        item.Caption = menuText;
+        tag.BarM.Items.Add(item);
+        popupMenu.AddItem(item);
+        popupMenu.Manager = tag.BarM;
+        tag.PopupMenu = popupMenu;
+        return grid;
+    }
     public static GridControl UseExportXlsx(this GridControl grid)
     {
         GridTag tag = grid.Tag as GridTag;

+ 32 - 0
XdCxRhDW.App/Image/XlCalc.svg

@@ -0,0 +1,32 @@
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
+<style type="text/css">
+	.Yellow{fill:#FFB115;}
+	.Red{fill:#D11C1C;}
+	.Black{fill:#727272;}
+	.Blue{fill:#1177D7;}
+	.White{fill:#FFFFFF;}
+	.Green{fill:#039C23;}
+	.st0{opacity:0.75;}
+	.st1{opacity:0.5;}
+	.st2{opacity:0.25;}
+	.st3{fill:#FFB115;}
+</style>
+<g>
+</g>
+<g id="Currency">
+	<path class="Yellow" d="M11,2c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S16,2,11,2z M15,8.5c-0.7-0.4-1.5-0.6-2.3-0.6c-1,0-1.7,0.3-2.3,0.9
+		C10,9.1,9.7,9.5,9.6,10H13v2H9.6c0.1,0.5,0.4,0.9,0.7,1.3c0.6,0.6,1.3,0.8,2.3,0.8c0.9,0,1.7-0.2,2.5-0.6v2
+		c-0.7,0.3-1.7,0.5-2.9,0.5c-1.6,0-2.8-0.4-3.7-1.3C7.6,14,7.2,13.1,7.1,12H6v-2h1.1c0.2-1,0.7-1.9,1.4-2.6c1-1,2.3-1.4,3.9-1.4
+		c1,0,1.8,0.1,2.5,0.4v2.1H15z"/>
+	<path class="Green" d="M21,12c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S26,12,21,12z M24.3,24.5c-0.2,0.4-0.5,0.7-0.8,0.9
+		c-0.4,0.2-0.8,0.4-1.2,0.5c-0.1,0-0.2,0-0.3,0V27h-2v-1c-0.2,0-0.5-0.1-0.7-0.1c-0.5-0.1-0.9-0.2-1.3-0.4v-2.2
+		c0.4,0.3,0.9,0.6,1.3,0.7c0.5,0.2,0.9,0.2,1.4,0.2c0.3,0,0.5,0,0.7-0.1c0.2,0,0.4-0.1,0.5-0.2s0.2-0.2,0.3-0.3
+		c0.1-0.1,0.1-0.2,0.1-0.4c0-0.2-0.1-0.4-0.2-0.5s-0.3-0.3-0.4-0.4c-0.2-0.1-0.4-0.2-0.7-0.4c-0.3-0.1-0.5-0.2-0.8-0.4
+		c-0.8-0.3-1.3-0.7-1.7-1.2c-0.4-0.5-0.6-1-0.6-1.6c0-0.5,0.1-0.9,0.3-1.3c0.2-0.4,0.5-0.7,0.8-0.9c0.3-0.2,0.6-0.3,0.9-0.4V15h2v1
+		c0.4,0,0.8,0,1.1,0.1c0.4,0.1,0.5,0.1,0.9,0.2v2c-0.2-0.1-0.1-0.1-0.3-0.2c-0.2-0.1-0.4-0.2-0.6-0.2c-0.2-0.1-0.4-0.1-0.6-0.1
+		s-0.4,0-0.6,0s-0.5,0-0.7,0.1c-0.2,0-0.4,0.1-0.5,0.2s-0.2,0.2-0.3,0.3c-0.1,0.1-0.1,0.3-0.1,0.4c0,0.2,0,0.3,0.1,0.4
+		s0.2,0.2,0.4,0.4c0.2,0.1,0.3,0.2,0.6,0.3c0.2,0.1,0.5,0.2,0.8,0.3c0.4,0.2,0.7,0.3,1,0.5s0.6,0.4,0.8,0.6c0.2,0.2,0.4,0.5,0.5,0.8
+		s0.2,0.6,0.2,1C24.6,23.7,24.5,24.1,24.3,24.5z"/>
+</g>
+</svg>

+ 1 - 1
XdCxRhDW.App/MainForm.Designer.cs

@@ -292,7 +292,7 @@
             this.ribbonPageGroup3.ItemLinks.Add(this.barButtonItem1);
             this.ribbonPageGroup3.ItemLinks.Add(this.btnCocTool);
             this.ribbonPageGroup3.ItemLinks.Add(this.btnDetectTool);
-            this.ribbonPageGroup3.ItemLinks.Add(this.btnXlCalculate);
+            //this.ribbonPageGroup3.ItemLinks.Add(this.btnXlCalculate);
             this.ribbonPageGroup3.ItemLinks.Add(this.btnSignalEmulation);
             this.ribbonPageGroup3.Name = "ribbonPageGroup3";
             this.ribbonPageGroup3.Text = "手动工具";

+ 1 - 1
XdCxRhDW.App/MainForm.cs

@@ -62,7 +62,7 @@ namespace XdCxRhDW
             ctrlTypes.Add("变采样", typeof(ResampleForm));
             ctrlTypes.Add("GPU参估", typeof(GpuCalcForm));
             ctrlTypes.Add("检测参估", typeof(DetectToolForm));
-            ctrlTypes.Add("星历推算", typeof(XlCalculateForm));
+            //ctrlTypes.Add("星历推算", typeof(XlCalculateForm));
             ctrlTypes.Add("信号仿真", typeof(SignalEmulation));
             ctrlTypes.Add("服务状态", typeof(CtrlSvrs));
             ctrlTypes.Add("服务日志", typeof(CtrlSvrLog));

+ 37 - 6
XdCxRhDW.App/UserControl/CtrlXl.Designer.cs

@@ -30,6 +30,7 @@
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CtrlXl));
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
+            this.ucCtrlPage = new XdCxRhDW.App.UserControl.UcCtrlPage();
             this.btnImp = new DevExpress.XtraEditors.SimpleButton();
             this.gridXl = new DevExpress.XtraGrid.GridControl();
             this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
@@ -38,6 +39,7 @@
             this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.gridXl)).BeginInit();
@@ -47,10 +49,12 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
             // 
+            this.layoutControl1.Controls.Add(this.ucCtrlPage);
             this.layoutControl1.Controls.Add(this.btnImp);
             this.layoutControl1.Controls.Add(this.gridXl);
             this.layoutControl1.Controls.Add(this.btnOpen);
@@ -58,10 +62,21 @@
             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(647, 422);
+            this.layoutControl1.Size = new System.Drawing.Size(647, 473);
             this.layoutControl1.TabIndex = 0;
             this.layoutControl1.Text = "layoutControl1";
             // 
+            // ucCtrlPage
+            // 
+            this.ucCtrlPage.CurrentPage = 0;
+            this.ucCtrlPage.Location = new System.Drawing.Point(12, 428);
+            this.ucCtrlPage.Margin = new System.Windows.Forms.Padding(4);
+            this.ucCtrlPage.Name = "ucCtrlPage";
+            this.ucCtrlPage.PageSize = 0;
+            this.ucCtrlPage.Size = new System.Drawing.Size(623, 33);
+            this.ucCtrlPage.TabIndex = 7;
+            this.ucCtrlPage.TotalPages = 0;
+            // 
             // btnImp
             // 
             this.btnImp.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnImp.ImageOptions.SvgImage")));
@@ -78,7 +93,7 @@
             this.gridXl.Location = new System.Drawing.Point(10, 38);
             this.gridXl.MainView = this.gridView1;
             this.gridXl.Name = "gridXl";
-            this.gridXl.Size = new System.Drawing.Size(627, 374);
+            this.gridXl.Size = new System.Drawing.Size(627, 388);
             this.gridXl.TabIndex = 5;
             this.gridXl.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
             this.gridView1});
@@ -106,9 +121,10 @@
             this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
             this.layoutControlItem1,
             this.layoutControlItem2,
-            this.layoutControlItem3});
+            this.layoutControlItem3,
+            this.layoutControlItem4});
             this.Root.Name = "Root";
-            this.Root.Size = new System.Drawing.Size(647, 422);
+            this.Root.Size = new System.Drawing.Size(647, 473);
             this.Root.TextVisible = false;
             // 
             // layoutControlItem1
@@ -129,7 +145,7 @@
             this.layoutControlItem2.Location = new System.Drawing.Point(0, 28);
             this.layoutControlItem2.Name = "layoutControlItem2";
             this.layoutControlItem2.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
-            this.layoutControlItem2.Size = new System.Drawing.Size(627, 374);
+            this.layoutControlItem2.Size = new System.Drawing.Size(627, 388);
             this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem2.TextVisible = false;
             // 
@@ -145,13 +161,25 @@
             this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem3.TextVisible = false;
             // 
+            // layoutControlItem4
+            // 
+            this.layoutControlItem4.Control = this.ucCtrlPage;
+            this.layoutControlItem4.Location = new System.Drawing.Point(0, 416);
+            this.layoutControlItem4.MaxSize = new System.Drawing.Size(0, 37);
+            this.layoutControlItem4.MinSize = new System.Drawing.Size(5, 37);
+            this.layoutControlItem4.Name = "layoutControlItem4";
+            this.layoutControlItem4.Size = new System.Drawing.Size(627, 37);
+            this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem4.TextVisible = false;
+            // 
             // CtrlXl
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.Controls.Add(this.layoutControl1);
             this.Name = "CtrlXl";
-            this.Size = new System.Drawing.Size(647, 422);
+            this.Size = new System.Drawing.Size(647, 473);
             this.Load += new System.EventHandler(this.CtrlXl_Load);
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
             this.layoutControl1.ResumeLayout(false);
@@ -162,6 +190,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -177,5 +206,7 @@
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
         private DevExpress.XtraEditors.SimpleButton btnImp;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
+        private UcCtrlPage ucCtrlPage;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
     }
 }

+ 105 - 14
XdCxRhDW.App/UserControl/CtrlXl.cs

@@ -1,21 +1,16 @@
 using DevExpress.XtraEditors;
+using DxHelper;
+using ExtensionsDev;
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
 using System.Data.Entity;
-using System.Drawing;
-using System.IO;
 using System.Linq;
-using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
-using ExtensionsDev;
-using System.Windows.Documents;
-using XdCxRhDW.Repostory;
+using XdCxRhDW.App.CorTools;
 using XdCxRhDW.Dto;
-using DxHelper;
 using XdCxRhDW.Entity;
+using XdCxRhDW.Repostory;
 
 namespace XdCxRhDW.App.UserControl
 {
@@ -27,18 +22,113 @@ namespace XdCxRhDW.App.UserControl
             InitializeComponent();
             this.layoutControl1.UseDefault();
             btnOpen.UseChooseFile().UseDoubleClickToSelectAll();
+
+            this.ucCtrlPage.CurrentPage = 1;
+            this.ucCtrlPage.PageSize = Convert.ToInt32(this.ucCtrlPage.CboPageSize.Text);
+            this.ucCtrlPage.TotalPages = 1;
+            this.ucCtrlPage.ClickPageButtonEvent += ucPageDemo_ClickPageButtonEvent;
+            this.ucCtrlPage.ChangedPageSizeEvent += ucPageDemo_ChangedPageSizeEvent;
+            this.ucCtrlPage.JumpPageEvent += ucPageDemo_JumpPageEvent;
+        }
+
+        /// <summary>
+        /// 页数跳转
+        /// </summary>
+        /// <param name="jumpPage">跳转页</param>
+        void ucPageDemo_JumpPageEvent(int jumpPage)
+        {
+            if (jumpPage <= this.ucCtrlPage.TotalPages)
+            {
+                if (jumpPage > 0)
+                {
+                    this.ucCtrlPage.JumpPageCtrl.Text = string.Empty;
+                    this.ucCtrlPage.JumpPageCtrl.Text = jumpPage.ToString();
+                    this.ShowDatas(jumpPage);
+                }
+                else
+                {
+                    jumpPage = 1;
+                    this.ucCtrlPage.JumpPageCtrl.Text = string.Empty;
+                    this.ucCtrlPage.JumpPageCtrl.Text = jumpPage.ToString();
+                    this.ShowDatas(jumpPage);
+                }
+            }
+            else
+            {
+                this.ucCtrlPage.JumpPageCtrl.Text = string.Empty;
+                MessageBox.Show(@"超出当前最大页数", @"提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
+            }
+        }
+        /// <summary>
+        /// 改变每页展示数据长度
+        /// </summary>
+        void ucPageDemo_ChangedPageSizeEvent()
+        {
+            this.ShowDatas(1);
+        }
+        /// <summary>
+        /// 页数改变按钮(最前页,最后页,上一页,下一页)
+        /// </summary>
+        /// <param name="current"></param>
+        void ucPageDemo_ClickPageButtonEvent(int current)
+        {
+            this.ShowDatas(current);
+        }
+       
+        /// <summary>
+        /// 数据展示
+        /// </summary>
+        /// <param name="currentPage">当前页</param>
+        private async void ShowDatas(int currentPage)
+        {
+            await LoadData(currentPage);
         }
         private async void CtrlXl_Load(object sender, EventArgs e)
         {
-            gridXl.UseDefault(list).UseRowNumber().UseDeleteAsync<XlInfo>(Del).UseExportXlsx();
-            await LoadData();
+             gridXl.UseDefault(list).UseRowNumber().UseDeleteAsync<XlInfo>(Del).UseExportXlsx()
+             .AddMenu("星历推算", SvgHelper.LoadFromFile("Image\\XlCalc.svg"), () =>
+             {
+                 var ids = gridView1.GetSelectedRows();
+                 if (ids.Length <= 0)
+                 {
+                     XtraMessageBox.Show("请选择需要星历推算的数据信息!");
+                     return;
+                 }
+                 var item = gridView1.GetRow(ids[0]) as XlInfo;
+
+                 List<XlInfo> xlInfos = new List<XlInfo>();
+                 xlInfos.Add(item);
+
+                 XlCalculateForm form = new XlCalculateForm(xlInfos);
+                 form.ShowDialog();
+             });
+             await LoadData(1);
         }
-        public async Task LoadData()
+        public async Task LoadData(int currentPage)
         {
             try
             {
+                var dtResult = await XlRepository.GetPageAsync(currentPage, this.ucCtrlPage.PageSize);
+                int totalPages = 0;
+                int totalRows = 0;
+                if (null == dtResult || dtResult.Count == 0)
+                {
+                    this.ucCtrlPage.PageInfo.Text = string.Format("第{0}/{1}页", "1", "1");
+                    this.ucCtrlPage.TotalRows.Text = @"0";
+                    this.ucCtrlPage.CurrentPage = 1;
+                    this.ucCtrlPage.TotalPages = 1;
+                }
+                else
+                {
+                    totalRows = Convert.ToInt32(dtResult.First().TotalRows);
+                    totalPages = totalRows % this.ucCtrlPage.PageSize == 0 ? totalRows / this.ucCtrlPage.PageSize : (totalRows / this.ucCtrlPage.PageSize) + 1;
+                    this.ucCtrlPage.PageInfo.Text = string.Format("第{0}/{1}页", currentPage, totalPages);
+                    this.ucCtrlPage.TotalRows.Text = totalRows.ToString();
+                    this.ucCtrlPage.CurrentPage = currentPage;
+                    this.ucCtrlPage.TotalPages = totalPages;
+                }
                 list.Clear();
-                list.AddRange(await XlRepository.GetAllAsync());
+                list.AddRange(dtResult);
                 gridView1.RefreshData();
             }
             catch (Exception ex)
@@ -77,7 +167,7 @@ namespace XdCxRhDW.App.UserControl
                 if (result.code == 200)
                 {
                     DxHelper.MsgBoxHelper.ShowInfo($"星历导入成功.共导入{result.data.Count}条");
-                    await LoadData();
+                    await LoadData(1);
                 }
                 else
                 {
@@ -112,6 +202,7 @@ namespace XdCxRhDW.App.UserControl
                     db.XlInfos.RemoveRange(delItems);
                     await db.SaveChangesAsync();
                 }
+                await LoadData(1);
                 return true;
             }
             catch (Exception ex)

+ 174 - 539
XdCxRhDW.App/UserControl/UcCtrlPage.Designer.cs

@@ -1,13 +1,11 @@
 namespace XdCxRhDW.App.UserControl
 {
     partial class UcCtrlPage
-    {
-        /// <summary> 
-        /// 必需的设计器变量。
-        /// </summary>
+    {/// <summary> 
+     /// 必需的设计器变量。
+     /// </summary>
         private System.ComponentModel.IContainer components = null;
-
-        /// <summary> 
+        /// <summary>
         /// 清理所有正在使用的资源。
         /// </summary>
         /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
@@ -22,556 +20,193 @@
 
         #region 组件设计器生成的代码
 
-        /// <summary> 
-        /// 设计器支持所需的方法 - 不要修改
+        /// <summary>
+        /// 设计器支持所需的方法 - 不要
         /// 使用代码编辑器修改此方法的内容。
         /// </summary>
         private void InitializeComponent()
         {
-            this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl();
-            this.linkGo = new DevExpress.XtraEditors.SimpleButton();
-            this.labelControl3 = new DevExpress.XtraEditors.LabelControl();
-            this.txtPageNum = new DevExpress.XtraEditors.TextEdit();
-            this.labelControl2 = new DevExpress.XtraEditors.LabelControl();
-            this.cbbPageSize = new DevExpress.XtraEditors.ComboBoxEdit();
-            this.lblTotalPage = new DevExpress.XtraEditors.LabelControl();
-            this.linkNext = new DevExpress.XtraEditors.SimpleButton();
-            this.linkPrev = new DevExpress.XtraEditors.SimpleButton();
-            this.linkFirst = new DevExpress.XtraEditors.SimpleButton();
-            this.linkLast = new DevExpress.XtraEditors.SimpleButton();
-            this.labelControl21 = new DevExpress.XtraEditors.LabelControl();
-            this.lblTotalCount = new DevExpress.XtraEditors.LabelControl();
-            this.labelControl211 = new DevExpress.XtraEditors.LabelControl();
-            this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
-            this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
-            this.emptySpaceItem4 = new DevExpress.XtraLayout.EmptySpaceItem();
-            this.emptySpaceItem5 = new DevExpress.XtraLayout.EmptySpaceItem();
-            this.emptySpaceItem8 = new DevExpress.XtraLayout.EmptySpaceItem();
-            this.emptySpaceItem9 = new DevExpress.XtraLayout.EmptySpaceItem();
-            this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.emptySpaceItem3 = new DevExpress.XtraLayout.EmptySpaceItem();
-            this.emptySpaceItem6 = new DevExpress.XtraLayout.EmptySpaceItem();
-            this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
-            this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.emptySpaceItem7 = new DevExpress.XtraLayout.EmptySpaceItem();
-            this.emptySpaceItem11 = new DevExpress.XtraLayout.EmptySpaceItem();
-            ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit();
-            this.dataLayoutControl1.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.txtPageNum.Properties)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.cbbPageSize.Properties)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem4)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem5)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem8)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem9)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem3)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem6)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem7)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem11)).BeginInit();
+            this.btnFrist = new System.Windows.Forms.Button();
+            this.lblPage = new System.Windows.Forms.Label();
+            this.btnPreviou = new System.Windows.Forms.Button();
+            this.btnNext = new System.Windows.Forms.Button();
+            this.btnLast = new System.Windows.Forms.Button();
+            this.cboPageSize = new System.Windows.Forms.ComboBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.lblTotalRows = new System.Windows.Forms.Label();
+            this.txtJumpPage = new System.Windows.Forms.TextBox();
             this.SuspendLayout();
             // 
-            // dataLayoutControl1
-            // 
-            this.dataLayoutControl1.Controls.Add(this.linkGo);
-            this.dataLayoutControl1.Controls.Add(this.labelControl3);
-            this.dataLayoutControl1.Controls.Add(this.txtPageNum);
-            this.dataLayoutControl1.Controls.Add(this.labelControl2);
-            this.dataLayoutControl1.Controls.Add(this.cbbPageSize);
-            this.dataLayoutControl1.Controls.Add(this.lblTotalPage);
-            this.dataLayoutControl1.Controls.Add(this.linkNext);
-            this.dataLayoutControl1.Controls.Add(this.linkPrev);
-            this.dataLayoutControl1.Controls.Add(this.linkFirst);
-            this.dataLayoutControl1.Controls.Add(this.linkLast);
-            this.dataLayoutControl1.Controls.Add(this.labelControl21);
-            this.dataLayoutControl1.Controls.Add(this.lblTotalCount);
-            this.dataLayoutControl1.Controls.Add(this.labelControl211);
-            this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0);
-            this.dataLayoutControl1.Name = "dataLayoutControl1";
-            this.dataLayoutControl1.Root = this.Root;
-            this.dataLayoutControl1.Size = new System.Drawing.Size(738, 48);
-            this.dataLayoutControl1.TabIndex = 0;
-            this.dataLayoutControl1.Text = "dataLayoutControl1";
-            this.dataLayoutControl1.Paint += new System.Windows.Forms.PaintEventHandler(this.PageControl_Paint);
-            // 
-            // linkGo
-            // 
-            this.linkGo.Location = new System.Drawing.Point(490, 12);
-            this.linkGo.MaximumSize = new System.Drawing.Size(0, 20);
-            this.linkGo.Name = "linkGo";
-            this.linkGo.Size = new System.Drawing.Size(61, 20);
-            this.linkGo.StyleController = this.dataLayoutControl1;
-            this.linkGo.TabIndex = 12;
-            this.linkGo.Text = "跳转";
-            this.linkGo.Click += new System.EventHandler(this.linkGo_LinkClicked);
-            // 
-            // labelControl3
-            // 
-            this.labelControl3.Location = new System.Drawing.Point(439, 12);
-            this.labelControl3.Name = "labelControl3";
-            this.labelControl3.Size = new System.Drawing.Size(12, 14);
-            this.labelControl3.StyleController = this.dataLayoutControl1;
-            this.labelControl3.TabIndex = 11;
-            this.labelControl3.Text = "页";
-            // 
-            // txtPageNum
-            // 
-            this.txtPageNum.Location = new System.Drawing.Point(381, 12);
-            this.txtPageNum.Name = "txtPageNum";
-            this.txtPageNum.Size = new System.Drawing.Size(54, 20);
-            this.txtPageNum.StyleController = this.dataLayoutControl1;
-            this.txtPageNum.TabIndex = 10;
-            this.txtPageNum.EditValueChanged += new System.EventHandler(this.txtPageNum_TextChanged);
-            // 
-            // labelControl2
-            // 
-            this.labelControl2.Location = new System.Drawing.Point(647, 12);
-            this.labelControl2.Name = "labelControl2";
-            this.labelControl2.Size = new System.Drawing.Size(12, 14);
-            this.labelControl2.StyleController = this.dataLayoutControl1;
-            this.labelControl2.TabIndex = 9;
-            this.labelControl2.Text = "条";
-            // 
-            // cbbPageSize
-            // 
-            this.cbbPageSize.Location = new System.Drawing.Point(593, 12);
-            this.cbbPageSize.Name = "cbbPageSize";
-            this.cbbPageSize.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
-            this.cbbPageSize.Size = new System.Drawing.Size(50, 20);
-            this.cbbPageSize.StyleController = this.dataLayoutControl1;
-            this.cbbPageSize.TabIndex = 8;
-            this.cbbPageSize.SelectedIndexChanged += new System.EventHandler(this.cbbPageSize_SelectedIndexChanged);
-            // 
-            // lblTotalPage
-            // 
-            this.lblTotalPage.Location = new System.Drawing.Point(156, 12);
-            this.lblTotalPage.Name = "lblTotalPage";
-            this.lblTotalPage.Size = new System.Drawing.Size(43, 14);
-            this.lblTotalPage.StyleController = this.dataLayoutControl1;
-            this.lblTotalPage.TabIndex = 7;
-            this.lblTotalPage.Text = "第1/3页";
-            // 
-            // linkNext
-            // 
-            this.linkNext.Location = new System.Drawing.Point(232, 12);
-            this.linkNext.MaximumSize = new System.Drawing.Size(0, 22);
-            this.linkNext.Name = "linkNext";
-            this.linkNext.Size = new System.Drawing.Size(44, 22);
-            this.linkNext.StyleController = this.dataLayoutControl1;
-            this.linkNext.TabIndex = 6;
-            this.linkNext.Text = "下一页";
-            this.linkNext.Click += new System.EventHandler(this.linkNext_LinkClicked);
-            // 
-            // linkPrev
-            // 
-            this.linkPrev.Location = new System.Drawing.Point(94, 12);
-            this.linkPrev.MaximumSize = new System.Drawing.Size(0, 22);
-            this.linkPrev.Name = "linkPrev";
-            this.linkPrev.Size = new System.Drawing.Size(45, 22);
-            this.linkPrev.StyleController = this.dataLayoutControl1;
-            this.linkPrev.TabIndex = 5;
-            this.linkPrev.Text = "上一页";
-            this.linkPrev.Click += new System.EventHandler(this.linkPrev_LinkClicked);
-            // 
-            // linkFirst
-            // 
-            this.linkFirst.Location = new System.Drawing.Point(29, 12);
-            this.linkFirst.MaximumSize = new System.Drawing.Size(0, 22);
-            this.linkFirst.Name = "linkFirst";
-            this.linkFirst.Size = new System.Drawing.Size(50, 22);
-            this.linkFirst.StyleController = this.dataLayoutControl1;
-            this.linkFirst.TabIndex = 4;
-            this.linkFirst.Text = "首页";
-            this.linkFirst.Click += new System.EventHandler(this.linkFirst_LinkClicked);
-            // 
-            // linkLast
-            // 
-            this.linkLast.Location = new System.Drawing.Point(290, 12);
-            this.linkLast.MaximumSize = new System.Drawing.Size(0, 22);
-            this.linkLast.Name = "linkLast";
-            this.linkLast.Size = new System.Drawing.Size(44, 22);
-            this.linkLast.StyleController = this.dataLayoutControl1;
-            this.linkLast.TabIndex = 5;
-            this.linkLast.Text = "尾页";
-            this.linkLast.Click += new System.EventHandler(this.linkLast_LinkClicked);
-            // 
-            // labelControl21
-            // 
-            this.labelControl21.Location = new System.Drawing.Point(565, 12);
-            this.labelControl21.Name = "labelControl21";
-            this.labelControl21.Size = new System.Drawing.Size(24, 14);
-            this.labelControl21.StyleController = this.dataLayoutControl1;
-            this.labelControl21.TabIndex = 9;
-            this.labelControl21.Text = "每页";
-            // 
-            // lblTotalCount
-            // 
-            this.lblTotalCount.Location = new System.Drawing.Point(673, 12);
-            this.lblTotalCount.Name = "lblTotalCount";
-            this.lblTotalCount.Size = new System.Drawing.Size(39, 14);
-            this.lblTotalCount.StyleController = this.dataLayoutControl1;
-            this.lblTotalCount.TabIndex = 9;
-            this.lblTotalCount.Text = "共 3 条";
-            // 
-            // labelControl211
-            // 
-            this.labelControl211.Location = new System.Drawing.Point(353, 12);
-            this.labelControl211.Name = "labelControl211";
-            this.labelControl211.Size = new System.Drawing.Size(24, 14);
-            this.labelControl211.StyleController = this.dataLayoutControl1;
-            this.labelControl211.TabIndex = 9;
-            this.labelControl211.Text = "前往";
-            // 
-            // Root
-            // 
-            this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
-            this.Root.GroupBordersVisible = false;
-            this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
-            this.layoutControlItem1,
-            this.layoutControlItem3,
-            this.layoutControlItem5,
-            this.layoutControlItem6,
-            this.layoutControlItem7,
-            this.layoutControlItem8,
-            this.layoutControlItem9,
-            this.emptySpaceItem1,
-            this.emptySpaceItem4,
-            this.emptySpaceItem5,
-            this.emptySpaceItem8,
-            this.emptySpaceItem9,
-            this.layoutControlItem2,
-            this.layoutControlItem4,
-            this.emptySpaceItem3,
-            this.emptySpaceItem6,
-            this.layoutControlItem10,
-            this.layoutControlItem11,
-            this.emptySpaceItem2,
-            this.layoutControlItem12,
-            this.layoutControlItem13,
-            this.emptySpaceItem7,
-            this.emptySpaceItem11});
-            this.Root.Name = "Root";
-            this.Root.Size = new System.Drawing.Size(738, 48);
-            this.Root.TextVisible = false;
-            // 
-            // layoutControlItem1
-            // 
-            this.layoutControlItem1.Control = this.linkFirst;
-            this.layoutControlItem1.Location = new System.Drawing.Point(17, 0);
-            this.layoutControlItem1.Name = "layoutControlItem1";
-            this.layoutControlItem1.Size = new System.Drawing.Size(54, 28);
-            this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem1.TextVisible = false;
-            // 
-            // layoutControlItem3
-            // 
-            this.layoutControlItem3.Control = this.linkLast;
-            this.layoutControlItem3.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem3.CustomizationFormText = "layoutControlItem2";
-            this.layoutControlItem3.Location = new System.Drawing.Point(278, 0);
-            this.layoutControlItem3.Name = "layoutControlItem3";
-            this.layoutControlItem3.Size = new System.Drawing.Size(48, 28);
-            this.layoutControlItem3.Text = "layoutControlItem2";
-            this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem3.TextVisible = false;
-            // 
-            // layoutControlItem5
-            // 
-            this.layoutControlItem5.Control = this.lblTotalPage;
-            this.layoutControlItem5.Location = new System.Drawing.Point(144, 0);
-            this.layoutControlItem5.Name = "layoutControlItem5";
-            this.layoutControlItem5.Size = new System.Drawing.Size(47, 28);
-            this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem5.TextVisible = false;
-            // 
-            // layoutControlItem6
-            // 
-            this.layoutControlItem6.Control = this.cbbPageSize;
-            this.layoutControlItem6.Location = new System.Drawing.Point(581, 0);
-            this.layoutControlItem6.Name = "layoutControlItem6";
-            this.layoutControlItem6.Size = new System.Drawing.Size(54, 28);
-            this.layoutControlItem6.Text = "每页";
-            this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem6.TextVisible = false;
-            // 
-            // layoutControlItem7
-            // 
-            this.layoutControlItem7.Control = this.labelControl2;
-            this.layoutControlItem7.Location = new System.Drawing.Point(635, 0);
-            this.layoutControlItem7.Name = "layoutControlItem7";
-            this.layoutControlItem7.Size = new System.Drawing.Size(16, 28);
-            this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem7.TextVisible = false;
-            // 
-            // layoutControlItem8
-            // 
-            this.layoutControlItem8.Control = this.labelControl21;
-            this.layoutControlItem8.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem8.CustomizationFormText = "layoutControlItem7";
-            this.layoutControlItem8.Location = new System.Drawing.Point(553, 0);
-            this.layoutControlItem8.Name = "layoutControlItem8";
-            this.layoutControlItem8.Size = new System.Drawing.Size(28, 28);
-            this.layoutControlItem8.Text = "layoutControlItem7";
-            this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem8.TextVisible = false;
-            // 
-            // layoutControlItem9
-            // 
-            this.layoutControlItem9.Control = this.lblTotalCount;
-            this.layoutControlItem9.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem9.CustomizationFormText = "layoutControlItem7";
-            this.layoutControlItem9.Location = new System.Drawing.Point(661, 0);
-            this.layoutControlItem9.Name = "layoutControlItem9";
-            this.layoutControlItem9.Size = new System.Drawing.Size(43, 28);
-            this.layoutControlItem9.Text = "layoutControlItem7";
-            this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem9.TextVisible = false;
-            // 
-            // emptySpaceItem1
-            // 
-            this.emptySpaceItem1.AllowHotTrack = false;
-            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 0);
-            this.emptySpaceItem1.Name = "emptySpaceItem1";
-            this.emptySpaceItem1.Size = new System.Drawing.Size(17, 28);
-            this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
-            // 
-            // emptySpaceItem4
-            // 
-            this.emptySpaceItem4.AllowHotTrack = false;
-            this.emptySpaceItem4.Location = new System.Drawing.Point(131, 0);
-            this.emptySpaceItem4.Name = "emptySpaceItem4";
-            this.emptySpaceItem4.Size = new System.Drawing.Size(13, 28);
-            this.emptySpaceItem4.TextSize = new System.Drawing.Size(0, 0);
-            // 
-            // emptySpaceItem5
-            // 
-            this.emptySpaceItem5.AllowHotTrack = false;
-            this.emptySpaceItem5.Location = new System.Drawing.Point(191, 0);
-            this.emptySpaceItem5.Name = "emptySpaceItem5";
-            this.emptySpaceItem5.Size = new System.Drawing.Size(29, 28);
-            this.emptySpaceItem5.TextSize = new System.Drawing.Size(0, 0);
-            // 
-            // emptySpaceItem8
-            // 
-            this.emptySpaceItem8.AllowHotTrack = false;
-            this.emptySpaceItem8.Location = new System.Drawing.Point(651, 0);
-            this.emptySpaceItem8.Name = "emptySpaceItem8";
-            this.emptySpaceItem8.Size = new System.Drawing.Size(10, 28);
-            this.emptySpaceItem8.TextSize = new System.Drawing.Size(0, 0);
-            // 
-            // emptySpaceItem9
-            // 
-            this.emptySpaceItem9.AllowHotTrack = false;
-            this.emptySpaceItem9.Location = new System.Drawing.Point(704, 0);
-            this.emptySpaceItem9.Name = "emptySpaceItem9";
-            this.emptySpaceItem9.Size = new System.Drawing.Size(14, 28);
-            this.emptySpaceItem9.TextSize = new System.Drawing.Size(0, 0);
-            // 
-            // layoutControlItem2
-            // 
-            this.layoutControlItem2.Control = this.linkPrev;
-            this.layoutControlItem2.Location = new System.Drawing.Point(82, 0);
-            this.layoutControlItem2.Name = "layoutControlItem2";
-            this.layoutControlItem2.Size = new System.Drawing.Size(49, 28);
-            this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem2.TextVisible = false;
-            // 
-            // layoutControlItem4
-            // 
-            this.layoutControlItem4.Control = this.linkNext;
-            this.layoutControlItem4.Location = new System.Drawing.Point(220, 0);
-            this.layoutControlItem4.Name = "layoutControlItem4";
-            this.layoutControlItem4.Size = new System.Drawing.Size(48, 28);
-            this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem4.TextVisible = false;
-            // 
-            // emptySpaceItem3
-            // 
-            this.emptySpaceItem3.AllowHotTrack = false;
-            this.emptySpaceItem3.Location = new System.Drawing.Point(71, 0);
-            this.emptySpaceItem3.Name = "emptySpaceItem3";
-            this.emptySpaceItem3.Size = new System.Drawing.Size(11, 28);
-            this.emptySpaceItem3.TextSize = new System.Drawing.Size(0, 0);
-            // 
-            // emptySpaceItem6
-            // 
-            this.emptySpaceItem6.AllowHotTrack = false;
-            this.emptySpaceItem6.Location = new System.Drawing.Point(268, 0);
-            this.emptySpaceItem6.Name = "emptySpaceItem6";
-            this.emptySpaceItem6.Size = new System.Drawing.Size(10, 28);
-            this.emptySpaceItem6.TextSize = new System.Drawing.Size(0, 0);
-            // 
-            // layoutControlItem10
-            // 
-            this.layoutControlItem10.Control = this.txtPageNum;
-            this.layoutControlItem10.Location = new System.Drawing.Point(369, 0);
-            this.layoutControlItem10.Name = "layoutControlItem10";
-            this.layoutControlItem10.Size = new System.Drawing.Size(58, 28);
-            this.layoutControlItem10.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem10.TextVisible = false;
-            // 
-            // layoutControlItem11
-            // 
-            this.layoutControlItem11.Control = this.labelControl211;
-            this.layoutControlItem11.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem11.CustomizationFormText = "layoutControlItem7";
-            this.layoutControlItem11.Location = new System.Drawing.Point(341, 0);
-            this.layoutControlItem11.Name = "layoutControlItem11";
-            this.layoutControlItem11.Size = new System.Drawing.Size(28, 28);
-            this.layoutControlItem11.Text = "layoutControlItem7";
-            this.layoutControlItem11.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem11.TextVisible = false;
-            // 
-            // emptySpaceItem2
-            // 
-            this.emptySpaceItem2.AllowHotTrack = false;
-            this.emptySpaceItem2.Location = new System.Drawing.Point(326, 0);
-            this.emptySpaceItem2.Name = "emptySpaceItem2";
-            this.emptySpaceItem2.Size = new System.Drawing.Size(15, 28);
-            this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
-            // 
-            // layoutControlItem12
-            // 
-            this.layoutControlItem12.Control = this.labelControl3;
-            this.layoutControlItem12.Location = new System.Drawing.Point(427, 0);
-            this.layoutControlItem12.Name = "layoutControlItem12";
-            this.layoutControlItem12.Size = new System.Drawing.Size(16, 28);
-            this.layoutControlItem12.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem12.TextVisible = false;
-            // 
-            // layoutControlItem13
-            // 
-            this.layoutControlItem13.Control = this.linkGo;
-            this.layoutControlItem13.Location = new System.Drawing.Point(478, 0);
-            this.layoutControlItem13.MaxSize = new System.Drawing.Size(0, 26);
-            this.layoutControlItem13.MinSize = new System.Drawing.Size(35, 24);
-            this.layoutControlItem13.Name = "layoutControlItem13";
-            this.layoutControlItem13.Size = new System.Drawing.Size(65, 28);
-            this.layoutControlItem13.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.layoutControlItem13.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem13.TextVisible = false;
-            // 
-            // emptySpaceItem7
-            // 
-            this.emptySpaceItem7.AllowHotTrack = false;
-            this.emptySpaceItem7.Location = new System.Drawing.Point(543, 0);
-            this.emptySpaceItem7.Name = "emptySpaceItem7";
-            this.emptySpaceItem7.Size = new System.Drawing.Size(10, 28);
-            this.emptySpaceItem7.TextSize = new System.Drawing.Size(0, 0);
-            // 
-            // emptySpaceItem11
-            // 
-            this.emptySpaceItem11.AllowHotTrack = false;
-            this.emptySpaceItem11.Location = new System.Drawing.Point(443, 0);
-            this.emptySpaceItem11.Name = "emptySpaceItem11";
-            this.emptySpaceItem11.Size = new System.Drawing.Size(35, 28);
-            this.emptySpaceItem11.TextSize = new System.Drawing.Size(0, 0);
+            // btnFrist
+            // 
+            this.btnFrist.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnFrist.ImageIndex = 0;
+            this.btnFrist.Location = new System.Drawing.Point(9, 6);
+            this.btnFrist.Margin = new System.Windows.Forms.Padding(4);
+            this.btnFrist.Name = "btnFrist";
+            this.btnFrist.Size = new System.Drawing.Size(31, 22);
+            this.btnFrist.TabIndex = 0;
+            this.btnFrist.Text = "<<";
+            // 
+            // lblPage
+            // 
+            this.lblPage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.lblPage.AutoSize = true;
+            this.lblPage.Location = new System.Drawing.Point(95, 10);
+            this.lblPage.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.lblPage.Name = "lblPage";
+            this.lblPage.Size = new System.Drawing.Size(50, 14);
+            this.lblPage.TabIndex = 1;
+            this.lblPage.Text = "第1/1页";
+            // 
+            // btnPreviou
+            // 
+            this.btnPreviou.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnPreviou.ImageIndex = 3;
+            this.btnPreviou.Location = new System.Drawing.Point(48, 6);
+            this.btnPreviou.Margin = new System.Windows.Forms.Padding(4);
+            this.btnPreviou.Name = "btnPreviou";
+            this.btnPreviou.Size = new System.Drawing.Size(31, 22);
+            this.btnPreviou.TabIndex = 2;
+            this.btnPreviou.Text = "<";
+            // 
+            // btnNext
+            // 
+            this.btnNext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnNext.ImageIndex = 2;
+            this.btnNext.Location = new System.Drawing.Point(159, 6);
+            this.btnNext.Margin = new System.Windows.Forms.Padding(4);
+            this.btnNext.Name = "btnNext";
+            this.btnNext.Size = new System.Drawing.Size(31, 22);
+            this.btnNext.TabIndex = 3;
+            this.btnNext.Text = ">";
+            // 
+            // btnLast
+            // 
+            this.btnLast.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnLast.ImageIndex = 1;
+            this.btnLast.Location = new System.Drawing.Point(199, 6);
+            this.btnLast.Margin = new System.Windows.Forms.Padding(4);
+            this.btnLast.Name = "btnLast";
+            this.btnLast.Size = new System.Drawing.Size(31, 22);
+            this.btnLast.TabIndex = 4;
+            this.btnLast.Text = ">>";
+            // 
+            // cboPageSize
+            // 
+            this.cboPageSize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.cboPageSize.FormattingEnabled = true;
+            this.cboPageSize.Location = new System.Drawing.Point(314, 6);
+            this.cboPageSize.Margin = new System.Windows.Forms.Padding(4);
+            this.cboPageSize.Name = "cboPageSize";
+            this.cboPageSize.Size = new System.Drawing.Size(53, 22);
+            this.cboPageSize.TabIndex = 5;
+            // 
+            // label1
+            // 
+            this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(275, 10);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(31, 14);
+            this.label1.TabIndex = 6;
+            this.label1.Text = "每页";
+            // 
+            // label2
+            // 
+            this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(372, 10);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(19, 14);
+            this.label2.TabIndex = 7;
+            this.label2.Text = "条";
+            // 
+            // label3
+            // 
+            this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(413, 10);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(19, 14);
+            this.label3.TabIndex = 8;
+            this.label3.Text = "共";
+            // 
+            // label4
+            // 
+            this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(479, 10);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(19, 14);
+            this.label4.TabIndex = 9;
+            this.label4.Text = "条";
+            // 
+            // lblTotalRows
+            // 
+            this.lblTotalRows.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.lblTotalRows.AutoSize = true;
+            this.lblTotalRows.Location = new System.Drawing.Point(441, 10);
+            this.lblTotalRows.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.lblTotalRows.Name = "lblTotalRows";
+            this.lblTotalRows.Size = new System.Drawing.Size(14, 14);
+            this.lblTotalRows.TabIndex = 10;
+            this.lblTotalRows.Text = "0";
+            // 
+            // txtJumpPage
+            // 
+            this.txtJumpPage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.txtJumpPage.Location = new System.Drawing.Point(238, 6);
+            this.txtJumpPage.Margin = new System.Windows.Forms.Padding(4);
+            this.txtJumpPage.Multiline = true;
+            this.txtJumpPage.Name = "txtJumpPage";
+            this.txtJumpPage.Size = new System.Drawing.Size(34, 18);
+            this.txtJumpPage.TabIndex = 11;
             // 
             // UcCtrlPage
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.Controls.Add(this.dataLayoutControl1);
+            this.Controls.Add(this.txtJumpPage);
+            this.Controls.Add(this.lblTotalRows);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.cboPageSize);
+            this.Controls.Add(this.btnLast);
+            this.Controls.Add(this.btnNext);
+            this.Controls.Add(this.btnPreviou);
+            this.Controls.Add(this.lblPage);
+            this.Controls.Add(this.btnFrist);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "UcCtrlPage";
-            this.Size = new System.Drawing.Size(738, 48);
-            ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit();
-            this.dataLayoutControl1.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.txtPageNum.Properties)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.cbbPageSize.Properties)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem4)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem5)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem8)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem9)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem3)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem6)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem7)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem11)).EndInit();
+            this.Size = new System.Drawing.Size(516, 34);
             this.ResumeLayout(false);
+            this.PerformLayout();
 
         }
 
         #endregion
 
-        private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1;
-        private DevExpress.XtraLayout.LayoutControlGroup Root;
-        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
-        private DevExpress.XtraEditors.SimpleButton linkFirst;
-        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
-        private DevExpress.XtraEditors.SimpleButton linkPrev;
-        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
-        private DevExpress.XtraEditors.SimpleButton linkLast;
-        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
-        private DevExpress.XtraEditors.SimpleButton linkNext;
-        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
-        private DevExpress.XtraEditors.LabelControl labelControl2;
-        private DevExpress.XtraEditors.ComboBoxEdit cbbPageSize;
-        private DevExpress.XtraEditors.LabelControl lblTotalPage;
-        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
-        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
-        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
-        private DevExpress.XtraEditors.LabelControl labelControl21;
-        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
-        private DevExpress.XtraEditors.LabelControl lblTotalCount;
-        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9;
-        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem3;
-        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem4;
-        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem5;
-        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem6;
-        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem8;
-        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem9;
-        private DevExpress.XtraEditors.TextEdit txtPageNum;
-        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10;
-        private DevExpress.XtraEditors.SimpleButton linkGo;
-        private DevExpress.XtraEditors.LabelControl labelControl3;
-        private DevExpress.XtraEditors.LabelControl labelControl211;
-        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11;
-        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2;
-        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12;
-        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13;
-        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem7;
-        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem11;
+        private System.Windows.Forms.Button btnFrist;
+        private System.Windows.Forms.Label lblPage;
+        private System.Windows.Forms.Button btnPreviou;
+        private System.Windows.Forms.Button btnNext;
+        private System.Windows.Forms.Button btnLast;
+        private System.Windows.Forms.ComboBox cboPageSize;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label lblTotalRows;
+        private System.Windows.Forms.TextBox txtJumpPage;
     }
 }

+ 148 - 182
XdCxRhDW.App/UserControl/UcCtrlPage.cs

@@ -3,6 +3,7 @@ using DevExpress.XtraPrinting;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
+using System.Configuration;
 using System.Data;
 using System.Drawing;
 using System.Linq;
@@ -14,236 +15,201 @@ namespace XdCxRhDW.App.UserControl
 {
     public partial class UcCtrlPage : DevExpress.XtraEditors.XtraUserControl
     {
-        public event EventHandler OnPageChanged;
-        public UcCtrlPage()
-        {
-            InitializeComponent();
 
-        }
-
-        //每页显示记录数
-        private int pageSize = 10;
-        //当前页
-        private int pageIndex = 1;
-        //总页数
-        private int pageCount = 0;
-        //总记录数
-        private int totalCount = 0;
-
-        public int PageSize { get => pageSize; set => pageSize = value; }
-        public int PageIndex { get => pageIndex; set => pageIndex = value; }
-        public int PageCount
-        {
-            get
-            {
-                if (pageSize != 0)
-                {
-                    pageCount = GetPageCount();
-                }
-                return pageCount;
-            }
-            set { pageCount = value; }
-        }
-        public int TotalCount { get => totalCount; set => totalCount = value; }
+        private string _cfgPageSize = "100,200,300,500,1000,2000";
 
+        public event EventHandler OnPageChanged;
 
-        /// <summary>
-        /// 计算总页数
-        /// </summary>
-        /// <returns></returns>
-        private int GetPageCount()
-        {
-            if (PageSize == 0)
-            {
-                return 0;
-            }
-            int pageCount = TotalCount / PageSize;
-            if (TotalCount % PageSize == 0)
-            {
-                pageCount = TotalCount / PageSize;
-            }
-            else
-            {
-                pageCount = TotalCount / PageSize + 1;
-            }
-            return pageCount;
-        }
+        public delegate void ClickPageButton(int current);
+        public event ClickPageButton ClickPageButtonEvent;
 
-        /// <summary>
-        /// 首页
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void linkFirst_LinkClicked(object sender, EventArgs e)
-        {
-            PageIndex = 1;
-            DrawControl(true);
-        }
+        public delegate void ChangedPageSize();
+        public event ChangedPageSize ChangedPageSizeEvent;
 
-        /// <summary>
-        /// 上一页
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void linkPrev_LinkClicked(object sender, EventArgs e)
-        {
-            PageIndex = Math.Max(1, PageIndex - 1);
-            DrawControl(true);
-        }
+        public delegate void JumpPage(int jumpPage);
+        public event JumpPage JumpPageEvent;
 
+        public int TotalPages { get; set; }
 
-        /// <summary>
-        /// 下一页
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void linkNext_LinkClicked(object sender, EventArgs e)
+        private int currentPage;
+        public int CurrentPage
         {
-            PageIndex = Math.Min(PageCount, PageIndex + 1);
-            DrawControl(true);
+            get { return this.currentPage; }
+            set { this.currentPage = value; }
         }
 
-        /// <summary>
-        /// 末页
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void linkLast_LinkClicked(object sender, EventArgs e)
+        private int pageSize;
+        public int PageSize
         {
-
-            PageIndex = PageCount;
-            DrawControl(true);
+            get { return this.pageSize; }
+            set { this.pageSize = value; }
         }
 
-        public void DrawControl(int count)
+        public System.Windows.Forms.ComboBox CboPageSize
         {
-            TotalCount = count;
-            DrawControl(false);
+            set { this.cboPageSize = value; }
+            get { return this.cboPageSize; }
         }
 
-        /// <summary>
-        /// 页面控件呈现
-        /// </summary>
-        private void DrawControl(bool callEvent)
+        public Label PageInfo
         {
-            lblTotalPage.Text = new StringBuilder("第 ").Append(PageIndex.ToString()).Append(" / ").Append(PageCount.ToString()).Append(" 页").ToString();
-            lblTotalCount.Text = new StringBuilder("共 ").Append(TotalCount.ToString()).Append(" 条").ToString();
-            cbbPageSize.Text = PageSize.ToString();
-
-            if (callEvent && OnPageChanged != null)
-            {
-                OnPageChanged(this, null);//当前分页数字改变时,触发委托事件
-            }
-            SetFormCtrEnabled();
-            if (PageCount <= 1)//有且仅有一页
-            {
-                linkFirst.Enabled = false;
-                linkPrev.Enabled = false;
-                linkNext.Enabled = false;
-                linkLast.Enabled = false;
-                linkGo.Enabled = false;
-            }
-            else if (PageIndex == 1)//第一页
-            {
-                linkFirst.Enabled = false;
-                linkPrev.Enabled = false;
-            }
-            else if (PageIndex == PageCount)//最后一页
-            {
-                linkNext.Enabled = false;
-                linkLast.Enabled = false;
-            }
+            set { this.lblPage = value; }
+            get { return this.lblPage; }
         }
 
-        private void SetFormCtrEnabled()
+        public Label TotalRows
         {
-            linkFirst.Enabled = true;
-            linkPrev.Enabled = true;
-            linkNext.Enabled = true;
-            linkLast.Enabled = true;
-            linkGo.Enabled = true;
+            get { return this.lblTotalRows; }
+            set { this.lblTotalRows = value; }
         }
 
-        /// <summary>
-        /// enter键功能
-        /// </summary>
-        private void txtPageNum_KeyPress(object sender, KeyPressEventArgs e)
+        public TextBox JumpPageCtrl
         {
-            linkGo_LinkClicked(null, null);
+            get { return this.txtJumpPage; }
+            set { this.txtJumpPage = value; }
         }
 
-        /// <summary>
-        /// 跳转页数限制
-        /// </summary>
-        private void txtPageNum_TextChanged(object sender, EventArgs e)
+        public UcCtrlPage()
         {
-            int num = 0;
-            if (int.TryParse(txtPageNum.Text.Trim(), out num) && num > 0)
+            InitializeComponent();
+            this.InitCboCtrl();
+            this.cboPageSize.TextChanged += cboPageSize_TextChanged;
+            this.cboPageSize.KeyPress += cboPageSize_KeyPress;
+           
+            this.btnFrist.Tag = "F";
+            this.btnPreviou.Tag = "P";
+            this.btnNext.Tag = "N";
+            this.btnLast.Tag = "L";
+            this.btnFrist.Click += btn_Click;
+            this.btnPreviou.Click += btn_Click;
+            this.btnNext.Click += btn_Click;
+            this.btnLast.Click += btn_Click;
+            this.cboPageSize.KeyPress += cboPageSize_KeyPress;
+            this.txtJumpPage.KeyPress += txtJumpPage_KeyPress;
+        }
+
+        void txtJumpPage_KeyPress(object sender, KeyPressEventArgs e)
+        {
+            //text输入验证
+            if (e.KeyChar == 13)
+            {
+                if (null != this.JumpPageEvent)
+                {
+                    if (int.TryParse(this.txtJumpPage.Text, out int pagecount))
+                    {
+                        this.JumpPageEvent(pagecount);
+                    }
+                 
+                }
+            }
+            else
             {
-                if (num > PageCount)
+                if (e.KeyChar != 8)
                 {
-                    txtPageNum.Text = PageCount.ToString();
+                    int len = this.txtJumpPage.Text.Length;
+                    if (len < 1 && e.KeyChar == '0')
+                    {
+                        e.Handled = true;
+                    }
+                    else if ((e.KeyChar < '0') || (e.KeyChar > '9'))//这是允许输入0-9数字
+                    {
+                        e.Handled = true;
+                    }
                 }
             }
         }
-
-        /// <summary>
-        /// 跳转指定页
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void linkGo_LinkClicked(object sender, EventArgs e)
+        void btn_Click(object sender, EventArgs e)
         {
-            int num = 0;
-            if (int.TryParse(txtPageNum.Text.Trim(), out num) && num > 0)
+            Button btn = sender as Button;
+            if (null != this.ClickPageButtonEvent)
             {
-                PageIndex = num;
-                DrawControl(true);
+                if (null != btn)
+                {
+                    switch (btn.Tag.ToString())
+                    {
+                        case "F":
+                            this.CurrentPage = 1;
+                            break;
+                        case "P":
+                            this.CurrentPage = this.CurrentPage <= 1 ? 1 : this.CurrentPage - 1;
+                            break;
+                        case "N":
+                            this.CurrentPage = this.CurrentPage >= this.TotalPages ? this.TotalPages : this.currentPage + 1;
+                            break;
+                        case "L":
+                            this.CurrentPage = this.TotalPages;
+                            break;
+                        default:
+                            this.CurrentPage = 1;
+                            break;
+                    }
+                    this.ClickPageButtonEvent(this.CurrentPage);
+                }
             }
         }
-
-
-
-        private void PageControl_Paint(object sender, PaintEventArgs e)
+        void cboPageSize_KeyPress(object sender, KeyPressEventArgs e)
         {
-            drawBorder(e);
+            e.Handled = true;
         }
-
-        private void drawBorder(PaintEventArgs e)
+        void cboPageSize_TextChanged(object sender, EventArgs e)
         {
-            Color _lineColor = Color.FromArgb(0, 123, 255);
-            ControlPaint.DrawBorder(e.Graphics, this.ClientRectangle,
-            _lineColor, 1, ButtonBorderStyle.Solid, //左边
-          _lineColor, 1, ButtonBorderStyle.Solid, //上边
-          _lineColor, 1, ButtonBorderStyle.Solid, //右边
-          _lineColor, 1, ButtonBorderStyle.Solid);//底边
-
+            this.PageSize = Convert.ToInt32(this.cboPageSize.Text);
+            if (null != ChangedPageSizeEvent)
+            {
+                this.ChangedPageSizeEvent();
+            }
         }
-
-        /// <summary>
-        /// 每页显示记录数更改事件
-        /// </summary>
-        bool isTextChanged = false;
-        private void cbbPageSize_SelectedIndexChanged(object sender, EventArgs e)
+        private void InitCboCtrl()
         {
-            int num = 0;
-            if (!int.TryParse(cbbPageSize.Text.Trim(), out num) || num <= 0)
+            this.cboPageSize.ValueMember = "MValue";
+            this.cboPageSize.DisplayMember = "MText";
+            this.cboPageSize.Text = string.Empty;
+            if (!string.IsNullOrEmpty(_cfgPageSize))
             {
-                num = 10;
-                cbbPageSize.Text = "10";
+                string cfgPageSize = _cfgPageSize.Replace(",", ",");
+                if (cfgPageSize.EndsWith(","))
+                {
+                    cfgPageSize = cfgPageSize.Remove(cfgPageSize.Length - 1);
+                }
+                string[] strPageSize = cfgPageSize.Split(new char[] { ',' });
+                List<string> listPageSize = new List<string>();
+                for (int x = 0; x < strPageSize.Length; x++)
+                {
+                    if (!listPageSize.Contains(strPageSize[x]) && !string.IsNullOrEmpty(strPageSize[x]))
+                    {
+                        listPageSize.Add(strPageSize[x]);
+                    }
+                }
+                List<KeyAndValueEntity> kve = new List<KeyAndValueEntity>();
+                for (int i = 0; i < listPageSize.Count; i++)
+                {
+                    kve.Add(new KeyAndValueEntity() { MValue = i, MText = listPageSize[i] });
+                }
+                this.cboPageSize.DataSource = kve;
             }
             else
             {
-                isTextChanged = true;
-            }
-            pageSize = num;
-            if (isTextChanged)
+                this.cboPageSize.DataSource = new List<KeyAndValueEntity>()
             {
-                isTextChanged = false;
-                linkFirst_LinkClicked(null, null);
+                new KeyAndValueEntity() {MValue = 0,MText = "100"},
+                new KeyAndValueEntity() {MValue = 1,MText = "200"},
+                new KeyAndValueEntity() {MValue = 2,MText = "500"},
+                new KeyAndValueEntity() {MValue = 3,MText = "1000"}
+            };
             }
+            this.cboPageSize.SelectedText = ((KeyAndValueEntity)cboPageSize.Items[0]).MText;
         }
 
     }
+
+    internal class KeyAndValueEntity
+    {
+        public int MValue { get; set; }
+        public string MText { get; set; }
+    }
+
+
+
 }
 
+

+ 3 - 1
XdCxRhDW.App/XdCxRhDW.App.csproj

@@ -570,7 +570,6 @@
     <EmbeddedResource Include="PopupControl\ShowCxCtrl.resx">
       <DependentUpon>ShowCxCtrl.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="Properties\licenses.licx" />
     <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
@@ -686,6 +685,9 @@
     <EmbeddedResource Include="UserControl\X3DFGDOPParam .resx">
       <DependentUpon>X3DFGDOPParam .cs</DependentUpon>
     </EmbeddedResource>
+    <Content Include="Image\XlCalc.svg">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
     <Content Include="定位.ico" />
   </ItemGroup>
   <ItemGroup>

+ 5 - 0
XdCxRhDW.Entity/XlInfo.cs

@@ -11,6 +11,11 @@ namespace XdCxRhDW.Entity
     [Table("XlInfo")]
     public class XlInfo : BaseEntity
     {
+
+
+        [Display(Name = "总条数", AutoGenerateField = false)]
+        public int TotalRows { get; set; }
+
         [Display(Name = "卫星编号",AutoGenerateField = false)]
         public int SatCode { get; set; }
         [Display(Name = "卫星名称",AutoGenerateField = false)]

+ 30 - 0
XdCxRhDW.Repostory/XlRepository.cs

@@ -32,6 +32,36 @@ namespace XdCxRhDW.Repostory
             }
         }
 
+        /// <summary>
+        /// 获取数据库所有双行根数
+        /// </summary>
+        /// <returns></returns>
+        public static async Task<List<XlInfo>> GetPageAsync(int currentPage,int pageSize)
+        {
+            string sql = @" SELECT t.*
+                                    FROM
+                                    (
+                                        SELECT COUNT(1) OVER () AS TotalRows,
+                                        ROW_NUMBER() OVER (ORDER BY c.Id) AS Rn,
+                                        c.*
+                                        FROM XlInfo c
+                                    ) t
+                                    WHERE t.Rn BETWEEN ((" + currentPage + " - 1) * " + pageSize + ") + 1 AND " + currentPage + " *  " + pageSize;
+            try
+            {
+                using (RHDWContext db = new RHDWContext())
+                {
+                    var res = await db.XlInfos.SqlQuery(sql).ToListAsync();
+                    return res;
+                }
+            }
+            catch (Exception ex)
+            {
+                Serilog.Log.Error(ex, "加载星历信息异常");
+                return null;
+            }
+        }
+
 
         /// <summary>
         /// 获取某个星某个时刻最近的双行根(可能返回null)