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