瀏覽代碼

星历分页

zoule 10 月之前
父節點
當前提交
6724f833c8

+ 15 - 15
XdCxRhDW.Api/AddIns/GDOP误差椭圆/GDOPAPi.cs

@@ -268,21 +268,21 @@ namespace XdCxRhDW.Api
 
 
 
-        ///
-        /// XD时差线
-        /// main_sat_pos 卫星星历 xyz
-        /// mbwx_rec_pos 目标接收站位置 llh
-        /// ckwx_rec_pos 参考接收站位置 llh
-        /// cdb_rec_pos 地面接收站位置 llh
-        /// ref_pos 参考位置 llh
-        /// target_dto 目标时差 llh
-        /// ref_dto 参考时差 llh
-        /// reslen 时差线个数
-        /// res 值
-        ///
-        [DllImport(GDOPDll, EntryPoint = "SCX_XD", CallingConvention = CallingConvention.Cdecl)]
-        public static extern int SCX_XD(double[] mainxyz, double[] mbrecPos, double[] ckrefPos, double[] cdbPos, double[] refPos,
-            double target_dto, double ref_dto,ref int resCount, out IntPtr res);
+        /////
+        ///// XD时差线
+        ///// main_sat_pos 卫星星历 xyz
+        ///// mbwx_rec_pos 目标接收站位置 llh
+        ///// ckwx_rec_pos 参考接收站位置 llh
+        ///// cdb_rec_pos 地面接收站位置 llh
+        ///// ref_pos 参考位置 llh
+        ///// target_dto 目标时差 llh
+        ///// ref_dto 参考时差 llh
+        ///// reslen 时差线个数
+        ///// res 值
+        /////
+        //[DllImport(GDOPDll, EntryPoint = "SCX_XD", CallingConvention = CallingConvention.Cdecl)]
+        //public static extern int SCX_XD(double[] mainxyz, double[] mbrecPos, double[] ckrefPos, double[] cdbPos, double[] refPos,
+        //    double target_dto, double ref_dto,ref int resCount, out IntPtr res);
 
 
         ///

二進制
XdCxRhDW.Api/AddIns/定位/Position-New-backup.dll


二進制
XdCxRhDW.Api/AddIns/定位/Position-New.dll


+ 24 - 24
XdCxRhDW.Api/AddIns/时差线/DrawDtoLineHelper.cs

@@ -104,30 +104,30 @@ namespace XdCxRhDW.Api
             return Lines;
         }
 
-        /// <summary>
-        /// 星地有参时差线
-        /// </summary>
-        /// <param name="opt"></param>
-        /// <returns></returns>
-        /// <exception cref="Exception"></exception>
-        public static IEnumerable<(double lon, double lat)> DtoLineXdEx(DtoLineXdOption opt)
-        {
-            List<DtoLinePoint> list = new List<DtoLinePoint>();
-
-            IntPtr LOP_ValuePtr;
-            int LOP_Len = 0;
-
-            GDOPApi.SCX_XD(opt.MsEph, opt.MsAnt, opt.MsAnt, opt.CDBAnt, opt.RefGeod, opt.xdDto * 1e-6, opt.RefDto * 1e-6, ref LOP_Len, out LOP_ValuePtr);
-            double[] LOP_Value = new double[LOP_Len];
-            if (LOP_Len > 0)
-            {
-                Marshal.Copy(LOP_ValuePtr, LOP_Value, 0, LOP_Value.Length);
-            }
-            GDOPApi.FreeGDOPBuf(LOP_ValuePtr);
-            var points = ParseResult(LOP_Value);
-            var mapDots = points.Select(p => p).Select(p => (p.Lon, p.Lat));
-            return mapDots;
-        }
+        ///// <summary>
+        ///// 星地有参时差线
+        ///// </summary>
+        ///// <param name="opt"></param>
+        ///// <returns></returns>
+        ///// <exception cref="Exception"></exception>
+        //public static IEnumerable<(double lon, double lat)> DtoLineXdEx(DtoLineXdOption opt)
+        //{
+        //    List<DtoLinePoint> list = new List<DtoLinePoint>();
+
+        //    IntPtr LOP_ValuePtr;
+        //    int LOP_Len = 0;
+
+        //    GDOPApi.SCX_XD(opt.MsEph, opt.MsAnt, opt.MsAnt, opt.CDBAnt, opt.RefGeod, opt.xdDto * 1e-6, opt.RefDto * 1e-6, ref LOP_Len, out LOP_ValuePtr);
+        //    double[] LOP_Value = new double[LOP_Len];
+        //    if (LOP_Len > 0)
+        //    {
+        //        Marshal.Copy(LOP_ValuePtr, LOP_Value, 0, LOP_Value.Length);
+        //    }
+        //    GDOPApi.FreeGDOPBuf(LOP_ValuePtr);
+        //    var points = ParseResult(LOP_Value);
+        //    var mapDots = points.Select(p => p).Select(p => (p.Lon, p.Lat));
+        //    return mapDots;
+        //}
 
         /// <summary>
         /// 星地有参时差线

+ 4 - 0
XdCxRhDW.App/Controllers/XlController.cs

@@ -38,6 +38,10 @@ namespace XdCxRhDW.App.Controllers
                  {
                      var lines = File.ReadAllLines(GetLocalFile(dto.File)).ToList();
                      lines.RemoveAll(p => string.IsNullOrWhiteSpace(p));
+                     for (int i = 0; i < 8; i++)
+                     {
+                         lines.AddRange(lines);
+                     }
                      List<XlInfo> tmp = new List<XlInfo>();
                      for (int i = 0; i < lines.Count; i += 3)
                      {

+ 0 - 2
XdCxRhDW.App/EditForms/X2D1DTOParamEditor.cs

@@ -352,10 +352,8 @@ namespace XdCxRhDW.App.EditForms
                         DtoCdb = dto.XdDto,
                         DfoCdb = dto.XdDfo,
                         SnrCdb = dto.XdSnr,
-                        //StationResID = StationRes.ID,
                         MainCode = dto.MainCode,
                         Adja1Code = dto.AdjaCode,
-                        //TaskID = runTask.ID,
                         MainX = dto.MainX,
                         MainY = dto.MainY,
                         MainZ = dto.MainZ,

+ 8 - 0
XdCxRhDW.App/Localizer/ChsLocalizer.cs

@@ -88,6 +88,14 @@ namespace XdCxRhDW
                     return "确定";
                 case StringId.Cancel:
                     return "取消";
+                case StringId.NavigatorNextPageButtonHint:
+                    return "下一页";
+                case StringId.NavigatorPreviousPageButtonHint:
+                    return "上一页";
+                case StringId.NavigatorLastButtonHint:
+                    return "尾页";
+                case StringId.NavigatorFirstButtonHint:
+                    return "首页";
             }
             var res = base.GetLocalizedString(id);
             return res;

+ 202 - 3
XdCxRhDW.App/UserControl/CtrlXl.Designer.cs

@@ -30,42 +30,105 @@
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CtrlXl));
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
+            this.btnGo = new DevExpress.XtraEditors.SimpleButton();
+            this.txtGoPage = new DevExpress.XtraEditors.TextEdit();
+            this.dataNavigator1 = new DevExpress.XtraEditors.DataNavigator();
             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();
             this.btnOpen = new DevExpress.XtraEditors.ButtonEdit();
+            this.txtCountPerPage = new DevExpress.XtraEditors.ComboBoxEdit();
             this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
             this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.simpleLabelItem1 = new DevExpress.XtraLayout.SimpleLabelItem();
+            this.simpleLabelItem2 = new DevExpress.XtraLayout.SimpleLabelItem();
+            this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.txtGoPage.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.gridXl)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.btnOpen.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtCountPerPage.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
             // 
+            this.layoutControl1.Controls.Add(this.btnGo);
+            this.layoutControl1.Controls.Add(this.txtGoPage);
+            this.layoutControl1.Controls.Add(this.dataNavigator1);
             this.layoutControl1.Controls.Add(this.ucCtrlPage);
             this.layoutControl1.Controls.Add(this.btnImp);
             this.layoutControl1.Controls.Add(this.gridXl);
             this.layoutControl1.Controls.Add(this.btnOpen);
+            this.layoutControl1.Controls.Add(this.txtCountPerPage);
             this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.layoutControl1.Location = new System.Drawing.Point(0, 0);
             this.layoutControl1.Name = "layoutControl1";
+            this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(1044, 185, 650, 400);
             this.layoutControl1.Root = this.Root;
             this.layoutControl1.Size = new System.Drawing.Size(647, 473);
             this.layoutControl1.TabIndex = 0;
             this.layoutControl1.Text = "layoutControl1";
             // 
+            // btnGo
+            // 
+            this.btnGo.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("simpleButton1.ImageOptions.SvgImage")));
+            this.btnGo.ImageOptions.SvgImageSize = new System.Drawing.Size(16, 16);
+            this.btnGo.Location = new System.Drawing.Point(615, 403);
+            this.btnGo.Name = "btnGo";
+            this.btnGo.Size = new System.Drawing.Size(20, 20);
+            this.btnGo.StyleController = this.layoutControl1;
+            this.btnGo.TabIndex = 11;
+            this.btnGo.ToolTip = "跳转";
+            // 
+            // txtGoPage
+            // 
+            this.txtGoPage.Location = new System.Drawing.Point(535, 403);
+            this.txtGoPage.Name = "txtGoPage";
+            this.txtGoPage.Properties.AutoHeight = false;
+            this.txtGoPage.Size = new System.Drawing.Size(76, 20);
+            this.txtGoPage.StyleController = this.layoutControl1;
+            this.txtGoPage.TabIndex = 9;
+            // 
+            // dataNavigator1
+            // 
+            this.dataNavigator1.Buttons.Append.Visible = false;
+            this.dataNavigator1.Buttons.CancelEdit.Visible = false;
+            this.dataNavigator1.Buttons.EndEdit.Visible = false;
+            this.dataNavigator1.Buttons.Next.Visible = false;
+            this.dataNavigator1.Buttons.Prev.Visible = false;
+            this.dataNavigator1.Buttons.Remove.Visible = false;
+            this.dataNavigator1.Location = new System.Drawing.Point(160, 403);
+            this.dataNavigator1.Name = "dataNavigator1";
+            this.dataNavigator1.Size = new System.Drawing.Size(152, 21);
+            this.dataNavigator1.StyleController = this.layoutControl1;
+            this.dataNavigator1.TabIndex = 8;
+            this.dataNavigator1.Text = "dataNavigator1";
+            this.dataNavigator1.TextLocation = DevExpress.XtraEditors.NavigatorButtonsTextLocation.Center;
+            this.dataNavigator1.TextStringFormat = "第{0}页/共{1}页";
+            this.dataNavigator1.ButtonClick += new DevExpress.XtraEditors.NavigatorButtonClickEventHandler(this.dataNavigator1_ButtonClick);
+            // 
             // ucCtrlPage
             // 
             this.ucCtrlPage.CurrentPage = 0;
@@ -90,10 +153,19 @@
             // 
             // gridXl
             // 
+            this.gridXl.EmbeddedNavigator.Buttons.Append.Visible = false;
+            this.gridXl.EmbeddedNavigator.Buttons.CancelEdit.Visible = false;
+            this.gridXl.EmbeddedNavigator.Buttons.Edit.Visible = false;
+            this.gridXl.EmbeddedNavigator.Buttons.EndEdit.Visible = false;
+            this.gridXl.EmbeddedNavigator.Buttons.Next.Visible = false;
+            this.gridXl.EmbeddedNavigator.Buttons.Prev.Visible = false;
+            this.gridXl.EmbeddedNavigator.Buttons.Remove.Visible = false;
+            this.gridXl.EmbeddedNavigator.TextLocation = DevExpress.XtraEditors.NavigatorButtonsTextLocation.Begin;
+            this.gridXl.EmbeddedNavigator.TextStringFormat = "第{0}页/共{1}页";
             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, 388);
+            this.gridXl.Size = new System.Drawing.Size(627, 363);
             this.gridXl.TabIndex = 5;
             this.gridXl.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
             this.gridView1});
@@ -114,6 +186,25 @@
             this.btnOpen.StyleController = this.layoutControl1;
             this.btnOpen.TabIndex = 4;
             // 
+            // txtCountPerPage
+            // 
+            this.txtCountPerPage.EditValue = "5000";
+            this.txtCountPerPage.Location = new System.Drawing.Point(42, 403);
+            this.txtCountPerPage.Name = "txtCountPerPage";
+            this.txtCountPerPage.Properties.AutoHeight = false;
+            this.txtCountPerPage.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.txtCountPerPage.Properties.Items.AddRange(new object[] {
+            "100",
+            "500",
+            "1000",
+            "2000",
+            "5000",
+            "10000"});
+            this.txtCountPerPage.Size = new System.Drawing.Size(76, 21);
+            this.txtCountPerPage.StyleController = this.layoutControl1;
+            this.txtCountPerPage.TabIndex = 10;
+            // 
             // Root
             // 
             this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
@@ -122,7 +213,14 @@
             this.layoutControlItem1,
             this.layoutControlItem2,
             this.layoutControlItem3,
-            this.layoutControlItem4});
+            this.layoutControlItem4,
+            this.layoutControlItem5,
+            this.layoutControlItem6,
+            this.layoutControlItem7,
+            this.simpleLabelItem1,
+            this.simpleLabelItem2,
+            this.layoutControlItem8,
+            this.emptySpaceItem1});
             this.Root.Name = "Root";
             this.Root.Size = new System.Drawing.Size(647, 473);
             this.Root.TextVisible = false;
@@ -145,7 +243,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, 388);
+            this.layoutControlItem2.Size = new System.Drawing.Size(627, 363);
             this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem2.TextVisible = false;
             // 
@@ -173,6 +271,87 @@
             this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem4.TextVisible = false;
             // 
+            // layoutControlItem5
+            // 
+            this.layoutControlItem5.Control = this.dataNavigator1;
+            this.layoutControlItem5.Location = new System.Drawing.Point(148, 391);
+            this.layoutControlItem5.MaxSize = new System.Drawing.Size(156, 25);
+            this.layoutControlItem5.MinSize = new System.Drawing.Size(156, 25);
+            this.layoutControlItem5.Name = "layoutControlItem5";
+            this.layoutControlItem5.Size = new System.Drawing.Size(156, 25);
+            this.layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem5.TextVisible = false;
+            // 
+            // layoutControlItem6
+            // 
+            this.layoutControlItem6.Control = this.txtGoPage;
+            this.layoutControlItem6.Location = new System.Drawing.Point(523, 391);
+            this.layoutControlItem6.MaxSize = new System.Drawing.Size(80, 24);
+            this.layoutControlItem6.MinSize = new System.Drawing.Size(80, 24);
+            this.layoutControlItem6.Name = "layoutControlItem6";
+            this.layoutControlItem6.Size = new System.Drawing.Size(80, 25);
+            this.layoutControlItem6.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem6.TextVisible = false;
+            // 
+            // layoutControlItem7
+            // 
+            this.layoutControlItem7.Control = this.txtCountPerPage;
+            this.layoutControlItem7.Location = new System.Drawing.Point(30, 391);
+            this.layoutControlItem7.MaxSize = new System.Drawing.Size(80, 25);
+            this.layoutControlItem7.MinSize = new System.Drawing.Size(80, 25);
+            this.layoutControlItem7.Name = "layoutControlItem7";
+            this.layoutControlItem7.Size = new System.Drawing.Size(80, 25);
+            this.layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem7.TextVisible = false;
+            // 
+            // simpleLabelItem1
+            // 
+            this.simpleLabelItem1.AllowHotTrack = false;
+            this.simpleLabelItem1.Location = new System.Drawing.Point(0, 391);
+            this.simpleLabelItem1.MaxSize = new System.Drawing.Size(30, 25);
+            this.simpleLabelItem1.MinSize = new System.Drawing.Size(30, 25);
+            this.simpleLabelItem1.Name = "simpleLabelItem1";
+            this.simpleLabelItem1.Size = new System.Drawing.Size(30, 25);
+            this.simpleLabelItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.simpleLabelItem1.Text = "每页";
+            this.simpleLabelItem1.TextSize = new System.Drawing.Size(52, 14);
+            // 
+            // simpleLabelItem2
+            // 
+            this.simpleLabelItem2.AllowHotTrack = false;
+            this.simpleLabelItem2.Location = new System.Drawing.Point(110, 391);
+            this.simpleLabelItem2.MaxSize = new System.Drawing.Size(38, 25);
+            this.simpleLabelItem2.MinSize = new System.Drawing.Size(38, 25);
+            this.simpleLabelItem2.Name = "simpleLabelItem2";
+            this.simpleLabelItem2.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 20, 2, 2);
+            this.simpleLabelItem2.Size = new System.Drawing.Size(38, 25);
+            this.simpleLabelItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.simpleLabelItem2.Text = "条";
+            this.simpleLabelItem2.TextSize = new System.Drawing.Size(52, 14);
+            // 
+            // layoutControlItem8
+            // 
+            this.layoutControlItem8.Control = this.btnGo;
+            this.layoutControlItem8.Location = new System.Drawing.Point(603, 391);
+            this.layoutControlItem8.MaxSize = new System.Drawing.Size(24, 24);
+            this.layoutControlItem8.MinSize = new System.Drawing.Size(24, 24);
+            this.layoutControlItem8.Name = "layoutControlItem8";
+            this.layoutControlItem8.Size = new System.Drawing.Size(24, 25);
+            this.layoutControlItem8.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem8.TextVisible = false;
+            // 
+            // emptySpaceItem1
+            // 
+            this.emptySpaceItem1.AllowHotTrack = false;
+            this.emptySpaceItem1.Location = new System.Drawing.Point(304, 391);
+            this.emptySpaceItem1.Name = "emptySpaceItem1";
+            this.emptySpaceItem1.Size = new System.Drawing.Size(219, 25);
+            this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
+            // 
             // CtrlXl
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
@@ -183,14 +362,23 @@
             this.Load += new System.EventHandler(this.CtrlXl_Load);
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
             this.layoutControl1.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.txtGoPage.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.gridXl)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.btnOpen.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtCountPerPage.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -208,5 +396,16 @@
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
         private UcCtrlPage ucCtrlPage;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
+        private DevExpress.XtraEditors.TextEdit txtGoPage;
+        private DevExpress.XtraEditors.DataNavigator dataNavigator1;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
+        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
+        private DevExpress.XtraLayout.SimpleLabelItem simpleLabelItem1;
+        private DevExpress.XtraLayout.SimpleLabelItem simpleLabelItem2;
+        private DevExpress.XtraEditors.SimpleButton btnGo;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
+        private DevExpress.XtraEditors.ComboBoxEdit txtCountPerPage;
     }
 }

+ 77 - 17
XdCxRhDW.App/UserControl/CtrlXl.cs

@@ -1,4 +1,5 @@
 using DevExpress.XtraEditors;
+using DevExpress.XtraScheduler;
 using DxHelper;
 using ExtensionsDev;
 using System;
@@ -17,6 +18,9 @@ namespace XdCxRhDW.App.UserControl
     public partial class CtrlXl : DevExpress.XtraEditors.XtraUserControl
     {
         List<XlInfo> list = new List<XlInfo>();
+        int maxCount = 0;
+        int maxPage = 0;
+        int currentPage = 1;
         public CtrlXl()
         {
             InitializeComponent();
@@ -29,6 +33,12 @@ namespace XdCxRhDW.App.UserControl
             this.ucCtrlPage.ClickPageButtonEvent += ucPageDemo_ClickPageButtonEvent;
             this.ucCtrlPage.ChangedPageSizeEvent += ucPageDemo_ChangedPageSizeEvent;
             this.ucCtrlPage.JumpPageEvent += ucPageDemo_JumpPageEvent;
+
+            //var customBtn=gridXl.EmbeddedNavigator.Buttons.CustomButtons.Add();
+            //customBtn.Hint = "跳转";
+            //customBtn.Visible = true;
+            //customBtn.Enabled = true;
+            //customBtn.ImageIndex = 11;
         }
 
         /// <summary>
@@ -74,7 +84,7 @@ namespace XdCxRhDW.App.UserControl
         {
             this.ShowDatas(current);
         }
-       
+
         /// <summary>
         /// 数据展示
         /// </summary>
@@ -85,24 +95,30 @@ namespace XdCxRhDW.App.UserControl
         }
         private async void CtrlXl_Load(object sender, EventArgs e)
         {
-             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;
+            this.maxCount = await XlRepository.GetCount();
+            var countPerPage = Convert.ToInt32(txtCountPerPage.Text);
+            this.maxPage = maxCount / countPerPage;
+            if (maxCount % countPerPage != 0)
+                maxPage++;
+            dataNavigator1.DataSource = list;
+            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);
+                List<XlInfo> xlInfos = new List<XlInfo>();
+                xlInfos.Add(item);
 
-                 XlCalculateForm form = new XlCalculateForm(xlInfos);
-                 form.ShowDialog();
-             });
-             await LoadData(1);
+                XlCalculateForm form = new XlCalculateForm(xlInfos);
+                form.ShowDialog();
+            });
+            await LoadData(1);
         }
         public async Task LoadData(int currentPage)
         {
@@ -216,5 +232,49 @@ namespace XdCxRhDW.App.UserControl
                 this.Enabled = true;
             }
         }
+
+        private void dataNavigator1_ButtonClick(object sender, NavigatorButtonClickEventArgs e)
+        {
+            if (e.Button.ButtonType == NavigatorButtonType.First)
+            {
+                currentPage = 1;
+                dataNavigator1.Buttons.First.Enabled = false;
+                dataNavigator1.Buttons.PrevPage.Enabled = false;
+                dataNavigator1.Buttons.Last.Enabled = true;
+                dataNavigator1.Buttons.NextPage.Enabled = true;
+            }
+            else if (e.Button.ButtonType == NavigatorButtonType.Last)
+            {
+                currentPage = maxPage;
+                dataNavigator1.Buttons.Last.Enabled = false;
+                dataNavigator1.Buttons.NextPage.Enabled = false;
+                dataNavigator1.Buttons.First.Enabled = true;
+                dataNavigator1.Buttons.PrevPage.Enabled = true;
+            }
+            else if (e.Button.ButtonType == NavigatorButtonType.NextPage)
+            {
+                currentPage++;
+                dataNavigator1.Buttons.First.Enabled = true;
+                dataNavigator1.Buttons.PrevPage.Enabled = true;
+                if (currentPage == maxPage)
+                {
+                    dataNavigator1.Buttons.Last.Enabled = false;
+                    dataNavigator1.Buttons.NextPage.Enabled = false;
+                }
+            }
+            else if (e.Button.ButtonType == NavigatorButtonType.PrevPage)
+            {
+                currentPage--;
+                dataNavigator1.Buttons.Last.Enabled = true;
+                dataNavigator1.Buttons.NextPage.Enabled = true;
+                if (currentPage == 1)
+                {
+                    dataNavigator1.Buttons.First.Enabled = false;
+                    dataNavigator1.Buttons.PrevPage.Enabled = false;
+                }
+
+            }
+            dataNavigator1.TextStringFormat = $"第{currentPage}页/共{maxPage}页";
+        }
     }
 }

+ 19 - 0
XdCxRhDW.App/UserControl/CtrlXl.resx

@@ -118,6 +118,25 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+  <data name="simpleButton1.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi4z
+        LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
+        dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAK4CAAAC77u/
+        PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
+        IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
+        MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
+        Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
+        MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ
+        LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3
+        RDc7fQoJLldoaXRle2ZpbGw6I0ZGRkZGRjt9CgkuR3JlZW57ZmlsbDojMDM5QzIzO30KCS5zdDB7b3Bh
+        Y2l0eTowLjc1O30KCS5zdDF7b3BhY2l0eTowLjU7fQoJLnN0MntvcGFjaXR5OjAuMjU7fQoJLnN0M3tm
+        aWxsOiNGRkIxMTU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iRHJpbGxEb3duIj4NCiAgICA8cGF0aCBkPSJN
+        MjQsMThjMC03LjctNi4zLTE0LTE0LTE0QzYuNiw0LDMuNiw1LjIsMS4yLDcuMkw0LDEwYzEuNy0xLjMs
+        My43LTIsNi0yYzUuNSwwLDEwLDQuNSwxMCwxMGgtOGwxMCwxMGwxMC0xMCAgIEgyNHoiIGNsYXNzPSJC
+        bHVlIiAvPg0KICA8L2c+DQo8L3N2Zz4L
+</value>
+  </data>
   <data name="btnImp.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi4z

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

@@ -570,6 +570,7 @@
     <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>

+ 8 - 1
XdCxRhDW.Repostory/XlRepository.cs

@@ -31,7 +31,14 @@ namespace XdCxRhDW.Repostory
                 return null;
             }
         }
-
+        public static async Task<int> GetCount()
+        {
+            using (RHDWContext db = new RHDWContext())
+            {
+               var count=await db.XlInfos.CountAsync();
+                return count;
+            }
+        }
         /// <summary>
         /// 获取数据库所有双行根数
         /// </summary>