* UIPagination: 优化按钮配色逻辑

This commit is contained in:
Sunny 2024-02-19 15:46:40 +08:00
parent 63c5788254
commit 9eaf41849f
2 changed files with 319 additions and 382 deletions

View File

@ -21,6 +21,7 @@
* 2021-07-10: V3.0.4
* 2023-06-27: V3.3.9 Tag改为TagString
* 2023-08-30: V3.4.2
* 2024-02-19: V3.6.3
******************************************************************************/
using System;
@ -66,7 +67,6 @@ namespace Sunny.UI
private UITextBox edtPage;
private bool inSetDataConnection;
private UIPanel p1;
/// <summary>
/// 总页数
@ -86,8 +86,6 @@ namespace Sunny.UI
public UIPagination()
{
InitializeComponent();
p1.RectSides = ToolStripStatusLabelBorderSides.None;
p1.RadiusSides = UICornerRadiusSides.None;
SetStyleFlags(true, false);
@ -153,12 +151,6 @@ namespace Sunny.UI
Translate();
}
protected override void AfterSetFillColor(Color color)
{
base.AfterSetFillColor(color);
p1.FillColor = p1.RectColor = color;
}
public override void SetDPIScale()
{
base.SetDPIScale();
@ -194,7 +186,7 @@ namespace Sunny.UI
edtPage.Left = uiLabel1.Right + 3;
uiLabel2.Left = edtPage.Right + 3;
btnSelect.Left = uiLabel2.Right + 3;
p1.Width = btnSelect.Right + 3;
uiLabel2.Top = uiLabel1.Top = (Height - uiLabel1.Height) / 2;
SetShowButtons();
}
@ -301,14 +293,6 @@ namespace Sunny.UI
}
}
[DefaultValue(true)]
[Description("显示页面跳转按钮"), Category("SunnyUI")]
public bool ShowJumpButton
{
get => p1.Visible;
set => p1.Visible = value;
}
public event EventHandler DataSourceChanged;
[DefaultValue(null)]
@ -379,403 +363,346 @@ namespace Sunny.UI
private void InitializeComponent()
{
this.b0 = new Sunny.UI.UISymbolButton();
this.b1 = new Sunny.UI.UISymbolButton();
this.b3 = new Sunny.UI.UISymbolButton();
this.b2 = new Sunny.UI.UISymbolButton();
this.b7 = new Sunny.UI.UISymbolButton();
this.b6 = new Sunny.UI.UISymbolButton();
this.b5 = new Sunny.UI.UISymbolButton();
this.b4 = new Sunny.UI.UISymbolButton();
this.b15 = new Sunny.UI.UISymbolButton();
this.b14 = new Sunny.UI.UISymbolButton();
this.b13 = new Sunny.UI.UISymbolButton();
this.b12 = new Sunny.UI.UISymbolButton();
this.b11 = new Sunny.UI.UISymbolButton();
this.b10 = new Sunny.UI.UISymbolButton();
this.b9 = new Sunny.UI.UISymbolButton();
this.b8 = new Sunny.UI.UISymbolButton();
this.b16 = new Sunny.UI.UISymbolButton();
this.p1 = new Sunny.UI.UIPanel();
this.edtPage = new Sunny.UI.UITextBox();
this.btnSelect = new Sunny.UI.UISymbolButton();
this.uiLabel2 = new Sunny.UI.UILabel();
this.uiLabel1 = new Sunny.UI.UILabel();
this.p1.SuspendLayout();
this.SuspendLayout();
b0 = new UISymbolButton();
b1 = new UISymbolButton();
b3 = new UISymbolButton();
b2 = new UISymbolButton();
b7 = new UISymbolButton();
b6 = new UISymbolButton();
b5 = new UISymbolButton();
b4 = new UISymbolButton();
b15 = new UISymbolButton();
b14 = new UISymbolButton();
b13 = new UISymbolButton();
b12 = new UISymbolButton();
b11 = new UISymbolButton();
b10 = new UISymbolButton();
b9 = new UISymbolButton();
b8 = new UISymbolButton();
b16 = new UISymbolButton();
edtPage = new UITextBox();
btnSelect = new UISymbolButton();
uiLabel2 = new UILabel();
uiLabel1 = new UILabel();
SuspendLayout();
//
// b0
//
this.b0.Cursor = System.Windows.Forms.Cursors.Hand;
this.b0.Font = new System.Drawing.Font("宋体", 10.5F);
this.b0.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.b0.Location = new System.Drawing.Point(3, 3);
this.b0.MinimumSize = new System.Drawing.Size(1, 1);
this.b0.Name = "b0";
this.b0.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.b0.RadiusSides = ((Sunny.UI.UICornerRadiusSides)((Sunny.UI.UICornerRadiusSides.LeftTop | Sunny.UI.UICornerRadiusSides.LeftBottom)));
this.b0.Size = new System.Drawing.Size(75, 29);
this.b0.Symbol = 61700;
this.b0.TabIndex = 0;
this.b0.TagString = "<";
this.b0.Text = "上一页";
this.b0.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.b0.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.b0.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
b0.Cursor = Cursors.Hand;
b0.Font = new Font("宋体", 10.5F, FontStyle.Regular, GraphicsUnit.Point);
b0.ImageAlign = ContentAlignment.MiddleLeft;
b0.Location = new Point(3, 3);
b0.MinimumSize = new Size(1, 1);
b0.Name = "b0";
b0.Padding = new Padding(5, 0, 5, 0);
b0.RadiusSides = UICornerRadiusSides.LeftTop | UICornerRadiusSides.LeftBottom;
b0.Size = new Size(75, 29);
b0.Symbol = 61700;
b0.TabIndex = 0;
b0.TagString = "<";
b0.Text = "上一页";
b0.TextAlign = ContentAlignment.MiddleRight;
//
// b1
//
this.b1.Cursor = System.Windows.Forms.Cursors.Hand;
this.b1.Font = new System.Drawing.Font("宋体", 12F);
this.b1.Location = new System.Drawing.Point(81, 3);
this.b1.MinimumSize = new System.Drawing.Size(1, 1);
this.b1.Name = "b1";
this.b1.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.b1.Size = new System.Drawing.Size(29, 29);
this.b1.Symbol = 0;
this.b1.TabIndex = 1;
this.b1.Text = "0";
this.b1.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.b1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
b1.Cursor = Cursors.Hand;
b1.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point);
b1.Location = new Point(81, 3);
b1.MinimumSize = new Size(1, 1);
b1.Name = "b1";
b1.RadiusSides = UICornerRadiusSides.None;
b1.Size = new Size(29, 29);
b1.Symbol = 0;
b1.TabIndex = 1;
b1.Text = "0";
//
// b3
//
this.b3.Cursor = System.Windows.Forms.Cursors.Hand;
this.b3.Font = new System.Drawing.Font("宋体", 12F);
this.b3.Location = new System.Drawing.Point(145, 3);
this.b3.MinimumSize = new System.Drawing.Size(1, 1);
this.b3.Name = "b3";
this.b3.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.b3.Size = new System.Drawing.Size(29, 29);
this.b3.Symbol = 0;
this.b3.TabIndex = 3;
this.b3.Text = "0";
this.b3.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.b3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
b3.Cursor = Cursors.Hand;
b3.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point);
b3.Location = new Point(145, 3);
b3.MinimumSize = new Size(1, 1);
b3.Name = "b3";
b3.RadiusSides = UICornerRadiusSides.None;
b3.Size = new Size(29, 29);
b3.Symbol = 0;
b3.TabIndex = 3;
b3.Text = "0";
//
// b2
//
this.b2.Cursor = System.Windows.Forms.Cursors.Hand;
this.b2.Font = new System.Drawing.Font("宋体", 12F);
this.b2.Location = new System.Drawing.Point(113, 3);
this.b2.MinimumSize = new System.Drawing.Size(1, 1);
this.b2.Name = "b2";
this.b2.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.b2.Size = new System.Drawing.Size(29, 29);
this.b2.Symbol = 0;
this.b2.TabIndex = 2;
this.b2.Text = "0";
this.b2.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.b2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
b2.Cursor = Cursors.Hand;
b2.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point);
b2.Location = new Point(113, 3);
b2.MinimumSize = new Size(1, 1);
b2.Name = "b2";
b2.RadiusSides = UICornerRadiusSides.None;
b2.Size = new Size(29, 29);
b2.Symbol = 0;
b2.TabIndex = 2;
b2.Text = "0";
//
// b7
//
this.b7.Cursor = System.Windows.Forms.Cursors.Hand;
this.b7.Font = new System.Drawing.Font("宋体", 12F);
this.b7.Location = new System.Drawing.Point(273, 3);
this.b7.MinimumSize = new System.Drawing.Size(1, 1);
this.b7.Name = "b7";
this.b7.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.b7.Size = new System.Drawing.Size(29, 29);
this.b7.Symbol = 0;
this.b7.TabIndex = 7;
this.b7.Text = "0";
this.b7.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.b7.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
b7.Cursor = Cursors.Hand;
b7.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point);
b7.Location = new Point(273, 3);
b7.MinimumSize = new Size(1, 1);
b7.Name = "b7";
b7.RadiusSides = UICornerRadiusSides.None;
b7.Size = new Size(29, 29);
b7.Symbol = 0;
b7.TabIndex = 7;
b7.Text = "0";
//
// b6
//
this.b6.Cursor = System.Windows.Forms.Cursors.Hand;
this.b6.Font = new System.Drawing.Font("宋体", 12F);
this.b6.Location = new System.Drawing.Point(241, 3);
this.b6.MinimumSize = new System.Drawing.Size(1, 1);
this.b6.Name = "b6";
this.b6.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.b6.Size = new System.Drawing.Size(29, 29);
this.b6.Symbol = 0;
this.b6.TabIndex = 6;
this.b6.Text = "0";
this.b6.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.b6.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
b6.Cursor = Cursors.Hand;
b6.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point);
b6.Location = new Point(241, 3);
b6.MinimumSize = new Size(1, 1);
b6.Name = "b6";
b6.RadiusSides = UICornerRadiusSides.None;
b6.Size = new Size(29, 29);
b6.Symbol = 0;
b6.TabIndex = 6;
b6.Text = "0";
//
// b5
//
this.b5.Cursor = System.Windows.Forms.Cursors.Hand;
this.b5.Font = new System.Drawing.Font("宋体", 12F);
this.b5.Location = new System.Drawing.Point(209, 3);
this.b5.MinimumSize = new System.Drawing.Size(1, 1);
this.b5.Name = "b5";
this.b5.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.b5.Size = new System.Drawing.Size(29, 29);
this.b5.Symbol = 0;
this.b5.TabIndex = 5;
this.b5.Text = "0";
this.b5.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.b5.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
b5.Cursor = Cursors.Hand;
b5.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point);
b5.Location = new Point(209, 3);
b5.MinimumSize = new Size(1, 1);
b5.Name = "b5";
b5.RadiusSides = UICornerRadiusSides.None;
b5.Size = new Size(29, 29);
b5.Symbol = 0;
b5.TabIndex = 5;
b5.Text = "0";
//
// b4
//
this.b4.Cursor = System.Windows.Forms.Cursors.Hand;
this.b4.Font = new System.Drawing.Font("宋体", 12F);
this.b4.Location = new System.Drawing.Point(177, 3);
this.b4.MinimumSize = new System.Drawing.Size(1, 1);
this.b4.Name = "b4";
this.b4.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.b4.Size = new System.Drawing.Size(29, 29);
this.b4.Symbol = 0;
this.b4.TabIndex = 4;
this.b4.Text = "0";
this.b4.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.b4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
b4.Cursor = Cursors.Hand;
b4.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point);
b4.Location = new Point(177, 3);
b4.MinimumSize = new Size(1, 1);
b4.Name = "b4";
b4.RadiusSides = UICornerRadiusSides.None;
b4.Size = new Size(29, 29);
b4.Symbol = 0;
b4.TabIndex = 4;
b4.Text = "0";
//
// b15
//
this.b15.Cursor = System.Windows.Forms.Cursors.Hand;
this.b15.Font = new System.Drawing.Font("宋体", 12F);
this.b15.Location = new System.Drawing.Point(529, 3);
this.b15.MinimumSize = new System.Drawing.Size(1, 1);
this.b15.Name = "b15";
this.b15.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.b15.Size = new System.Drawing.Size(29, 29);
this.b15.Symbol = 0;
this.b15.TabIndex = 15;
this.b15.Text = "0";
this.b15.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.b15.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
b15.Cursor = Cursors.Hand;
b15.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point);
b15.Location = new Point(529, 3);
b15.MinimumSize = new Size(1, 1);
b15.Name = "b15";
b15.RadiusSides = UICornerRadiusSides.None;
b15.Size = new Size(29, 29);
b15.Symbol = 0;
b15.TabIndex = 15;
b15.Text = "0";
//
// b14
//
this.b14.Cursor = System.Windows.Forms.Cursors.Hand;
this.b14.Font = new System.Drawing.Font("宋体", 12F);
this.b14.Location = new System.Drawing.Point(497, 3);
this.b14.MinimumSize = new System.Drawing.Size(1, 1);
this.b14.Name = "b14";
this.b14.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.b14.Size = new System.Drawing.Size(29, 29);
this.b14.Symbol = 0;
this.b14.TabIndex = 14;
this.b14.Text = "0";
this.b14.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.b14.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
b14.Cursor = Cursors.Hand;
b14.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point);
b14.Location = new Point(497, 3);
b14.MinimumSize = new Size(1, 1);
b14.Name = "b14";
b14.RadiusSides = UICornerRadiusSides.None;
b14.Size = new Size(29, 29);
b14.Symbol = 0;
b14.TabIndex = 14;
b14.Text = "0";
//
// b13
//
this.b13.Cursor = System.Windows.Forms.Cursors.Hand;
this.b13.Font = new System.Drawing.Font("宋体", 12F);
this.b13.Location = new System.Drawing.Point(465, 3);
this.b13.MinimumSize = new System.Drawing.Size(1, 1);
this.b13.Name = "b13";
this.b13.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.b13.Size = new System.Drawing.Size(29, 29);
this.b13.Symbol = 0;
this.b13.TabIndex = 13;
this.b13.Text = "0";
this.b13.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.b13.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
b13.Cursor = Cursors.Hand;
b13.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point);
b13.Location = new Point(465, 3);
b13.MinimumSize = new Size(1, 1);
b13.Name = "b13";
b13.RadiusSides = UICornerRadiusSides.None;
b13.Size = new Size(29, 29);
b13.Symbol = 0;
b13.TabIndex = 13;
b13.Text = "0";
//
// b12
//
this.b12.Cursor = System.Windows.Forms.Cursors.Hand;
this.b12.Font = new System.Drawing.Font("宋体", 12F);
this.b12.Location = new System.Drawing.Point(433, 3);
this.b12.MinimumSize = new System.Drawing.Size(1, 1);
this.b12.Name = "b12";
this.b12.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.b12.Size = new System.Drawing.Size(29, 29);
this.b12.Symbol = 0;
this.b12.TabIndex = 12;
this.b12.Text = "0";
this.b12.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.b12.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
b12.Cursor = Cursors.Hand;
b12.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point);
b12.Location = new Point(433, 3);
b12.MinimumSize = new Size(1, 1);
b12.Name = "b12";
b12.RadiusSides = UICornerRadiusSides.None;
b12.Size = new Size(29, 29);
b12.Symbol = 0;
b12.TabIndex = 12;
b12.Text = "0";
//
// b11
//
this.b11.Cursor = System.Windows.Forms.Cursors.Hand;
this.b11.Font = new System.Drawing.Font("宋体", 12F);
this.b11.Location = new System.Drawing.Point(401, 3);
this.b11.MinimumSize = new System.Drawing.Size(1, 1);
this.b11.Name = "b11";
this.b11.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.b11.Size = new System.Drawing.Size(29, 29);
this.b11.Symbol = 0;
this.b11.TabIndex = 11;
this.b11.Text = "0";
this.b11.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.b11.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
b11.Cursor = Cursors.Hand;
b11.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point);
b11.Location = new Point(401, 3);
b11.MinimumSize = new Size(1, 1);
b11.Name = "b11";
b11.RadiusSides = UICornerRadiusSides.None;
b11.Size = new Size(29, 29);
b11.Symbol = 0;
b11.TabIndex = 11;
b11.Text = "0";
//
// b10
//
this.b10.Cursor = System.Windows.Forms.Cursors.Hand;
this.b10.Font = new System.Drawing.Font("宋体", 12F);
this.b10.Location = new System.Drawing.Point(369, 3);
this.b10.MinimumSize = new System.Drawing.Size(1, 1);
this.b10.Name = "b10";
this.b10.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.b10.Size = new System.Drawing.Size(29, 29);
this.b10.Symbol = 0;
this.b10.TabIndex = 10;
this.b10.Text = "0";
this.b10.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.b10.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
b10.Cursor = Cursors.Hand;
b10.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point);
b10.Location = new Point(369, 3);
b10.MinimumSize = new Size(1, 1);
b10.Name = "b10";
b10.RadiusSides = UICornerRadiusSides.None;
b10.Size = new Size(29, 29);
b10.Symbol = 0;
b10.TabIndex = 10;
b10.Text = "0";
//
// b9
//
this.b9.Cursor = System.Windows.Forms.Cursors.Hand;
this.b9.Font = new System.Drawing.Font("宋体", 12F);
this.b9.Location = new System.Drawing.Point(337, 3);
this.b9.MinimumSize = new System.Drawing.Size(1, 1);
this.b9.Name = "b9";
this.b9.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.b9.Size = new System.Drawing.Size(29, 29);
this.b9.Symbol = 0;
this.b9.TabIndex = 9;
this.b9.Text = "0";
this.b9.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.b9.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
b9.Cursor = Cursors.Hand;
b9.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point);
b9.Location = new Point(337, 3);
b9.MinimumSize = new Size(1, 1);
b9.Name = "b9";
b9.RadiusSides = UICornerRadiusSides.None;
b9.Size = new Size(29, 29);
b9.Symbol = 0;
b9.TabIndex = 9;
b9.Text = "0";
//
// b8
//
this.b8.Cursor = System.Windows.Forms.Cursors.Hand;
this.b8.Font = new System.Drawing.Font("宋体", 12F);
this.b8.Location = new System.Drawing.Point(305, 3);
this.b8.MinimumSize = new System.Drawing.Size(1, 1);
this.b8.Name = "b8";
this.b8.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.b8.Size = new System.Drawing.Size(29, 29);
this.b8.Symbol = 0;
this.b8.TabIndex = 8;
this.b8.Text = "0";
this.b8.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.b8.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
b8.Cursor = Cursors.Hand;
b8.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point);
b8.Location = new Point(305, 3);
b8.MinimumSize = new Size(1, 1);
b8.Name = "b8";
b8.RadiusSides = UICornerRadiusSides.None;
b8.Size = new Size(29, 29);
b8.Symbol = 0;
b8.TabIndex = 8;
b8.Text = "0";
//
// b16
//
this.b16.Cursor = System.Windows.Forms.Cursors.Hand;
this.b16.Font = new System.Drawing.Font("宋体", 10.5F);
this.b16.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.b16.Location = new System.Drawing.Point(561, 3);
this.b16.MinimumSize = new System.Drawing.Size(1, 1);
this.b16.Name = "b16";
this.b16.Padding = new System.Windows.Forms.Padding(6, 0, 5, 0);
this.b16.RadiusSides = ((Sunny.UI.UICornerRadiusSides)((Sunny.UI.UICornerRadiusSides.RightTop | Sunny.UI.UICornerRadiusSides.RightBottom)));
this.b16.Size = new System.Drawing.Size(75, 29);
this.b16.Symbol = 61701;
this.b16.TabIndex = 16;
this.b16.TagString = ">";
this.b16.Text = "下一页";
this.b16.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.b16.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.b16.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
this.b16.LocationChanged += new System.EventHandler(this.b16_LocationChanged);
//
// p1
//
this.p1.Controls.Add(this.edtPage);
this.p1.Controls.Add(this.btnSelect);
this.p1.Controls.Add(this.uiLabel2);
this.p1.Controls.Add(this.uiLabel1);
this.p1.Font = new System.Drawing.Font("宋体", 12F);
this.p1.Location = new System.Drawing.Point(727, 3);
this.p1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.p1.MinimumSize = new System.Drawing.Size(1, 1);
this.p1.Name = "p1";
this.p1.Radius = 0;
this.p1.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
this.p1.Size = new System.Drawing.Size(216, 29);
this.p1.TabIndex = 17;
this.p1.Text = null;
this.p1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
this.p1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
this.p1.LocationChanged += new System.EventHandler(this.p1_LocationChanged);
b16.Cursor = Cursors.Hand;
b16.Font = new Font("宋体", 10.5F, FontStyle.Regular, GraphicsUnit.Point);
b16.ImageAlign = ContentAlignment.MiddleRight;
b16.Location = new Point(561, 3);
b16.MinimumSize = new Size(1, 1);
b16.Name = "b16";
b16.Padding = new Padding(6, 0, 5, 0);
b16.RadiusSides = UICornerRadiusSides.RightTop | UICornerRadiusSides.RightBottom;
b16.Size = new Size(75, 29);
b16.Symbol = 61701;
b16.TabIndex = 16;
b16.TagString = ">";
b16.Text = "下一页";
b16.TextAlign = ContentAlignment.MiddleLeft;
b16.LocationChanged += b16_LocationChanged;
//
// edtPage
//
this.edtPage.Cursor = System.Windows.Forms.Cursors.IBeam;
this.edtPage.DoubleValue = 10D;
this.edtPage.Font = new System.Drawing.Font("宋体", 12F);
this.edtPage.IntValue = 10;
this.edtPage.Location = new System.Drawing.Point(28, 0);
this.edtPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.edtPage.Minimum = 1D;
this.edtPage.MinimumSize = new System.Drawing.Size(1, 1);
this.edtPage.Name = "edtPage";
this.edtPage.Padding = new System.Windows.Forms.Padding(5);
this.edtPage.ShowText = false;
this.edtPage.Size = new System.Drawing.Size(53, 29);
this.edtPage.TabIndex = 1;
this.edtPage.Text = "10";
this.edtPage.TextAlignment = System.Drawing.ContentAlignment.BottomCenter;
this.edtPage.Type = Sunny.UI.UITextBox.UIEditType.Integer;
this.edtPage.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
edtPage.Cursor = Cursors.IBeam;
edtPage.DoubleValue = 10D;
edtPage.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point);
edtPage.IntValue = 10;
edtPage.Location = new Point(673, 3);
edtPage.Margin = new Padding(4, 5, 4, 5);
edtPage.Minimum = 1D;
edtPage.MinimumSize = new Size(1, 1);
edtPage.Name = "edtPage";
edtPage.Padding = new Padding(5);
edtPage.ShowText = false;
edtPage.Size = new Size(53, 29);
edtPage.TabIndex = 1;
edtPage.Text = "10";
edtPage.TextAlignment = ContentAlignment.BottomCenter;
edtPage.Type = UITextBox.UIEditType.Integer;
edtPage.Watermark = "";
//
// btnSelect
//
this.btnSelect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSelect.Font = new System.Drawing.Font("宋体", 10.5F);
this.btnSelect.Location = new System.Drawing.Point(111, 0);
this.btnSelect.MinimumSize = new System.Drawing.Size(1, 1);
this.btnSelect.Name = "btnSelect";
this.btnSelect.Size = new System.Drawing.Size(61, 29);
this.btnSelect.Symbol = 0;
this.btnSelect.TabIndex = 3;
this.btnSelect.Text = "确定";
this.btnSelect.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSelect.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click);
btnSelect.Cursor = Cursors.Hand;
btnSelect.Font = new Font("宋体", 10.5F, FontStyle.Regular, GraphicsUnit.Point);
btnSelect.Location = new Point(756, 3);
btnSelect.MinimumSize = new Size(1, 1);
btnSelect.Name = "btnSelect";
btnSelect.Size = new Size(61, 29);
btnSelect.Symbol = 0;
btnSelect.TabIndex = 3;
btnSelect.Text = "确定";
btnSelect.Click += btnSelect_Click;
//
// uiLabel2
//
this.uiLabel2.AutoSize = true;
this.uiLabel2.BackColor = System.Drawing.Color.Transparent;
this.uiLabel2.Font = new System.Drawing.Font("宋体", 10.5F);
this.uiLabel2.Location = new System.Drawing.Point(81, 4);
this.uiLabel2.Name = "uiLabel2";
this.uiLabel2.Size = new System.Drawing.Size(23, 20);
this.uiLabel2.TabIndex = 2;
this.uiLabel2.Text = "页";
this.uiLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.uiLabel2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
uiLabel2.AutoSize = true;
uiLabel2.BackColor = Color.Transparent;
uiLabel2.Font = new Font("宋体", 10.5F, FontStyle.Regular, GraphicsUnit.Point);
uiLabel2.ForeColor = Color.FromArgb(48, 48, 48);
uiLabel2.Location = new Point(726, 10);
uiLabel2.Name = "uiLabel2";
uiLabel2.Size = new Size(21, 14);
uiLabel2.TabIndex = 2;
uiLabel2.Text = "页";
uiLabel2.TextAlign = ContentAlignment.MiddleLeft;
//
// uiLabel1
//
this.uiLabel1.AutoSize = true;
this.uiLabel1.BackColor = System.Drawing.Color.Transparent;
this.uiLabel1.Font = new System.Drawing.Font("宋体", 10.5F);
this.uiLabel1.Location = new System.Drawing.Point(5, 4);
this.uiLabel1.Name = "uiLabel1";
this.uiLabel1.Size = new System.Drawing.Size(23, 20);
this.uiLabel1.TabIndex = 0;
this.uiLabel1.Text = "第";
this.uiLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.uiLabel1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
uiLabel1.AutoSize = true;
uiLabel1.BackColor = Color.Transparent;
uiLabel1.Font = new Font("宋体", 10.5F, FontStyle.Regular, GraphicsUnit.Point);
uiLabel1.ForeColor = Color.FromArgb(48, 48, 48);
uiLabel1.Location = new Point(650, 10);
uiLabel1.Name = "uiLabel1";
uiLabel1.Size = new Size(21, 14);
uiLabel1.TabIndex = 0;
uiLabel1.Text = "第";
uiLabel1.TextAlign = ContentAlignment.MiddleLeft;
//
// UIPagination
//
this.Controls.Add(this.p1);
this.Controls.Add(this.b16);
this.Controls.Add(this.b15);
this.Controls.Add(this.b14);
this.Controls.Add(this.b13);
this.Controls.Add(this.b12);
this.Controls.Add(this.b11);
this.Controls.Add(this.b10);
this.Controls.Add(this.b9);
this.Controls.Add(this.b8);
this.Controls.Add(this.b7);
this.Controls.Add(this.b6);
this.Controls.Add(this.b5);
this.Controls.Add(this.b4);
this.Controls.Add(this.b3);
this.Controls.Add(this.b2);
this.Controls.Add(this.b1);
this.Controls.Add(this.b0);
this.Name = "UIPagination";
this.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
this.Size = new System.Drawing.Size(1139, 35);
this.p1.ResumeLayout(false);
this.p1.PerformLayout();
this.ResumeLayout(false);
Controls.Add(edtPage);
Controls.Add(btnSelect);
Controls.Add(uiLabel2);
Controls.Add(b16);
Controls.Add(uiLabel1);
Controls.Add(b15);
Controls.Add(b14);
Controls.Add(b13);
Controls.Add(b12);
Controls.Add(b11);
Controls.Add(b10);
Controls.Add(b9);
Controls.Add(b8);
Controls.Add(b7);
Controls.Add(b6);
Controls.Add(b5);
Controls.Add(b4);
Controls.Add(b3);
Controls.Add(b2);
Controls.Add(b1);
Controls.Add(b0);
Name = "UIPagination";
RectSides = ToolStripStatusLabelBorderSides.None;
Size = new Size(1139, 35);
ResumeLayout(false);
PerformLayout();
}
#endregion InitializeComponent
@ -934,14 +861,31 @@ namespace Sunny.UI
button.FillSelectedColor = uiColor.ButtonFillColor;
}
btnSelect.SetStyleColor(uiColor);
btnSelect.FillColor = uiColor.PlainColor;
btnSelect.ForeColor = uiColor.PaginationForeColor;
btnSelect.FillSelectedColor = uiColor.ButtonFillColor;
edtPage.BackColor = b0.BackColor = b16.BackColor = btnSelect.BackColor = uiColor.PanelFillColor;
edtPage.SetStyleColor(uiColor);
edtPage.RectColor = uiColor.RectColor;
edtPage.Invalidate();
uiLabel1.SetStyleColor(uiColor);
uiLabel2.SetStyleColor(uiColor);
uiLabel1.ForeColor = uiLabel2.ForeColor = uiColor.PanelForeColor;
}
protected override void AfterSetRectColor(Color color)
{
base.AfterSetRectColor(color);
}
private void b16_LocationChanged(object sender, EventArgs e)
{
p1.Left = b16.Right + 3;
uiLabel1.Left = b16.Right + 6;
Translate();
}
private void btnSelect_Click(object sender, EventArgs e)
@ -992,12 +936,5 @@ namespace Sunny.UI
}
public event OnPageChangeEventHandler PageChanged;
private void p1_LocationChanged(object sender, EventArgs e)
{
PageLocationChanged?.Invoke(p1.Right, EventArgs.Empty);
}
public event EventHandler PageLocationChanged;
}
}

View File

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->