Commit fe97d256 HZH

增加分页控件2

1 个父辈 c49b6bac
......@@ -48,5 +48,8 @@ namespace HZH_Controls.Controls
/// </summary>
/// <returns></returns>
List<object> GetCurrentSource();
int PageCount { get; set; }
int PageIndex { get; set; }
}
}
namespace HZH_Controls.Controls.List
{
partial class UCPagerControl2
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.btnFirst = new HZH_Controls.Controls.UCBtnExt();
this.btnPrevious = new HZH_Controls.Controls.UCBtnExt();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.btnToPage = new HZH_Controls.Controls.UCBtnExt();
this.btnEnd = new HZH_Controls.Controls.UCBtnExt();
this.btnNext = new HZH_Controls.Controls.UCBtnExt();
this.p7 = new HZH_Controls.Controls.UCBtnExt();
this.p6 = new HZH_Controls.Controls.UCBtnExt();
this.p5 = new HZH_Controls.Controls.UCBtnExt();
this.p4 = new HZH_Controls.Controls.UCBtnExt();
this.p3 = new HZH_Controls.Controls.UCBtnExt();
this.p2 = new HZH_Controls.Controls.UCBtnExt();
this.p1 = new HZH_Controls.Controls.UCBtnExt();
this.txtPage = new HZH_Controls.Controls.UCTextBoxEx();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// btnFirst
//
this.btnFirst.BackColor = System.Drawing.Color.White;
this.btnFirst.BtnBackColor = System.Drawing.Color.White;
this.btnFirst.BtnFont = new System.Drawing.Font("微软雅黑", 11F);
this.btnFirst.BtnForeColor = System.Drawing.Color.Gray;
this.btnFirst.BtnText = "首页";
this.btnFirst.ConerRadius = 5;
this.btnFirst.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnFirst.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnFirst.FillColor = System.Drawing.Color.White;
this.btnFirst.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.btnFirst.IsRadius = true;
this.btnFirst.IsShowRect = true;
this.btnFirst.IsShowTips = false;
this.btnFirst.Location = new System.Drawing.Point(5, 5);
this.btnFirst.Margin = new System.Windows.Forms.Padding(5);
this.btnFirst.Name = "btnFirst";
this.btnFirst.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(223)))), ((int)(((byte)(223)))));
this.btnFirst.RectWidth = 1;
this.btnFirst.Size = new System.Drawing.Size(60, 30);
this.btnFirst.TabIndex = 0;
this.btnFirst.TabStop = false;
this.btnFirst.TipsText = "";
this.btnFirst.BtnClick += new System.EventHandler(this.btnFirst_BtnClick);
//
// btnPrevious
//
this.btnPrevious.BackColor = System.Drawing.Color.White;
this.btnPrevious.BtnBackColor = System.Drawing.Color.White;
this.btnPrevious.BtnFont = new System.Drawing.Font("微软雅黑", 11F);
this.btnPrevious.BtnForeColor = System.Drawing.Color.Gray;
this.btnPrevious.BtnText = "上一页";
this.btnPrevious.ConerRadius = 5;
this.btnPrevious.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnPrevious.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnPrevious.FillColor = System.Drawing.Color.White;
this.btnPrevious.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.btnPrevious.IsRadius = true;
this.btnPrevious.IsShowRect = true;
this.btnPrevious.IsShowTips = false;
this.btnPrevious.Location = new System.Drawing.Point(75, 5);
this.btnPrevious.Margin = new System.Windows.Forms.Padding(5);
this.btnPrevious.Name = "btnPrevious";
this.btnPrevious.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(223)))), ((int)(((byte)(223)))));
this.btnPrevious.RectWidth = 1;
this.btnPrevious.Size = new System.Drawing.Size(60, 30);
this.btnPrevious.TabIndex = 1;
this.btnPrevious.TabStop = false;
this.btnPrevious.TipsText = "";
this.btnPrevious.BtnClick += new System.EventHandler(this.btnPrevious_BtnClick);
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
this.tableLayoutPanel1.ColumnCount = 13;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 70F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 70F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 70F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 70F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 70F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 70F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Controls.Add(this.btnToPage, 12, 0);
this.tableLayoutPanel1.Controls.Add(this.btnEnd, 10, 0);
this.tableLayoutPanel1.Controls.Add(this.btnNext, 9, 0);
this.tableLayoutPanel1.Controls.Add(this.p7, 8, 0);
this.tableLayoutPanel1.Controls.Add(this.p6, 7, 0);
this.tableLayoutPanel1.Controls.Add(this.p5, 6, 0);
this.tableLayoutPanel1.Controls.Add(this.p4, 5, 0);
this.tableLayoutPanel1.Controls.Add(this.p3, 4, 0);
this.tableLayoutPanel1.Controls.Add(this.p2, 3, 0);
this.tableLayoutPanel1.Controls.Add(this.p1, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.btnPrevious, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.btnFirst, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.txtPage, 11, 0);
this.tableLayoutPanel1.Location = new System.Drawing.Point(110, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(700, 40);
this.tableLayoutPanel1.TabIndex = 1;
//
// btnToPage
//
this.btnToPage.BackColor = System.Drawing.Color.White;
this.btnToPage.BtnBackColor = System.Drawing.Color.White;
this.btnToPage.BtnFont = new System.Drawing.Font("微软雅黑", 11F);
this.btnToPage.BtnForeColor = System.Drawing.Color.Gray;
this.btnToPage.BtnText = "跳转";
this.btnToPage.ConerRadius = 5;
this.btnToPage.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnToPage.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnToPage.FillColor = System.Drawing.Color.White;
this.btnToPage.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.btnToPage.IsRadius = true;
this.btnToPage.IsShowRect = true;
this.btnToPage.IsShowTips = false;
this.btnToPage.Location = new System.Drawing.Point(635, 5);
this.btnToPage.Margin = new System.Windows.Forms.Padding(5);
this.btnToPage.Name = "btnToPage";
this.btnToPage.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(223)))), ((int)(((byte)(223)))));
this.btnToPage.RectWidth = 1;
this.btnToPage.Size = new System.Drawing.Size(60, 30);
this.btnToPage.TabIndex = 15;
this.btnToPage.TabStop = false;
this.btnToPage.TipsText = "";
this.btnToPage.BtnClick += new System.EventHandler(this.btnToPage_BtnClick);
//
// btnEnd
//
this.btnEnd.BackColor = System.Drawing.Color.White;
this.btnEnd.BtnBackColor = System.Drawing.Color.White;
this.btnEnd.BtnFont = new System.Drawing.Font("微软雅黑", 11F);
this.btnEnd.BtnForeColor = System.Drawing.Color.Gray;
this.btnEnd.BtnText = "尾页";
this.btnEnd.ConerRadius = 5;
this.btnEnd.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnEnd.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnEnd.FillColor = System.Drawing.Color.White;
this.btnEnd.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.btnEnd.IsRadius = true;
this.btnEnd.IsShowRect = true;
this.btnEnd.IsShowTips = false;
this.btnEnd.Location = new System.Drawing.Point(495, 5);
this.btnEnd.Margin = new System.Windows.Forms.Padding(5);
this.btnEnd.Name = "btnEnd";
this.btnEnd.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(223)))), ((int)(((byte)(223)))));
this.btnEnd.RectWidth = 1;
this.btnEnd.Size = new System.Drawing.Size(60, 30);
this.btnEnd.TabIndex = 13;
this.btnEnd.TabStop = false;
this.btnEnd.TipsText = "";
this.btnEnd.BtnClick += new System.EventHandler(this.btnEnd_BtnClick);
//
// btnNext
//
this.btnNext.BackColor = System.Drawing.Color.White;
this.btnNext.BtnBackColor = System.Drawing.Color.White;
this.btnNext.BtnFont = new System.Drawing.Font("微软雅黑", 11F);
this.btnNext.BtnForeColor = System.Drawing.Color.Gray;
this.btnNext.BtnText = "下一页";
this.btnNext.ConerRadius = 5;
this.btnNext.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnNext.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnNext.FillColor = System.Drawing.Color.White;
this.btnNext.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.btnNext.IsRadius = true;
this.btnNext.IsShowRect = true;
this.btnNext.IsShowTips = false;
this.btnNext.Location = new System.Drawing.Point(425, 5);
this.btnNext.Margin = new System.Windows.Forms.Padding(5);
this.btnNext.Name = "btnNext";
this.btnNext.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(223)))), ((int)(((byte)(223)))));
this.btnNext.RectWidth = 1;
this.btnNext.Size = new System.Drawing.Size(60, 30);
this.btnNext.TabIndex = 12;
this.btnNext.TabStop = false;
this.btnNext.TipsText = "";
this.btnNext.BtnClick += new System.EventHandler(this.btnNext_BtnClick);
//
// p7
//
this.p7.BackColor = System.Drawing.Color.White;
this.p7.BtnBackColor = System.Drawing.Color.White;
this.p7.BtnFont = new System.Drawing.Font("微软雅黑", 9F);
this.p7.BtnForeColor = System.Drawing.Color.Gray;
this.p7.BtnText = "7";
this.p7.ConerRadius = 5;
this.p7.Cursor = System.Windows.Forms.Cursors.Hand;
this.p7.Dock = System.Windows.Forms.DockStyle.Fill;
this.p7.FillColor = System.Drawing.Color.White;
this.p7.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.p7.IsRadius = true;
this.p7.IsShowRect = true;
this.p7.IsShowTips = false;
this.p7.Location = new System.Drawing.Point(382, 5);
this.p7.Margin = new System.Windows.Forms.Padding(2, 5, 2, 5);
this.p7.Name = "p7";
this.p7.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(223)))), ((int)(((byte)(223)))));
this.p7.RectWidth = 1;
this.p7.Size = new System.Drawing.Size(36, 30);
this.p7.TabIndex = 8;
this.p7.TabStop = false;
this.p7.TipsText = "";
this.p7.BtnClick += new System.EventHandler(this.page_BtnClick);
//
// p6
//
this.p6.BackColor = System.Drawing.Color.White;
this.p6.BtnBackColor = System.Drawing.Color.White;
this.p6.BtnFont = new System.Drawing.Font("微软雅黑", 9F);
this.p6.BtnForeColor = System.Drawing.Color.Gray;
this.p6.BtnText = "6";
this.p6.ConerRadius = 5;
this.p6.Cursor = System.Windows.Forms.Cursors.Hand;
this.p6.Dock = System.Windows.Forms.DockStyle.Fill;
this.p6.FillColor = System.Drawing.Color.White;
this.p6.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.p6.IsRadius = true;
this.p6.IsShowRect = true;
this.p6.IsShowTips = false;
this.p6.Location = new System.Drawing.Point(342, 5);
this.p6.Margin = new System.Windows.Forms.Padding(2, 5, 2, 5);
this.p6.Name = "p6";
this.p6.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(223)))), ((int)(((byte)(223)))));
this.p6.RectWidth = 1;
this.p6.Size = new System.Drawing.Size(36, 30);
this.p6.TabIndex = 7;
this.p6.TabStop = false;
this.p6.TipsText = "";
this.p6.BtnClick += new System.EventHandler(this.page_BtnClick);
//
// p5
//
this.p5.BackColor = System.Drawing.Color.White;
this.p5.BtnBackColor = System.Drawing.Color.White;
this.p5.BtnFont = new System.Drawing.Font("微软雅黑", 9F);
this.p5.BtnForeColor = System.Drawing.Color.Gray;
this.p5.BtnText = "5";
this.p5.ConerRadius = 5;
this.p5.Cursor = System.Windows.Forms.Cursors.Hand;
this.p5.Dock = System.Windows.Forms.DockStyle.Fill;
this.p5.FillColor = System.Drawing.Color.White;
this.p5.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.p5.IsRadius = true;
this.p5.IsShowRect = true;
this.p5.IsShowTips = false;
this.p5.Location = new System.Drawing.Point(302, 5);
this.p5.Margin = new System.Windows.Forms.Padding(2, 5, 2, 5);
this.p5.Name = "p5";
this.p5.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(223)))), ((int)(((byte)(223)))));
this.p5.RectWidth = 1;
this.p5.Size = new System.Drawing.Size(36, 30);
this.p5.TabIndex = 6;
this.p5.TabStop = false;
this.p5.TipsText = "";
this.p5.BtnClick += new System.EventHandler(this.page_BtnClick);
//
// p4
//
this.p4.BackColor = System.Drawing.Color.White;
this.p4.BtnBackColor = System.Drawing.Color.White;
this.p4.BtnFont = new System.Drawing.Font("微软雅黑", 9F);
this.p4.BtnForeColor = System.Drawing.Color.Gray;
this.p4.BtnText = "4";
this.p4.ConerRadius = 5;
this.p4.Cursor = System.Windows.Forms.Cursors.Hand;
this.p4.Dock = System.Windows.Forms.DockStyle.Fill;
this.p4.FillColor = System.Drawing.Color.White;
this.p4.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.p4.IsRadius = true;
this.p4.IsShowRect = true;
this.p4.IsShowTips = false;
this.p4.Location = new System.Drawing.Point(262, 5);
this.p4.Margin = new System.Windows.Forms.Padding(2, 5, 2, 5);
this.p4.Name = "p4";
this.p4.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(223)))), ((int)(((byte)(223)))));
this.p4.RectWidth = 1;
this.p4.Size = new System.Drawing.Size(36, 30);
this.p4.TabIndex = 5;
this.p4.TabStop = false;
this.p4.TipsText = "";
this.p4.BtnClick += new System.EventHandler(this.page_BtnClick);
//
// p3
//
this.p3.BackColor = System.Drawing.Color.White;
this.p3.BtnBackColor = System.Drawing.Color.White;
this.p3.BtnFont = new System.Drawing.Font("微软雅黑", 9F);
this.p3.BtnForeColor = System.Drawing.Color.Gray;
this.p3.BtnText = "3";
this.p3.ConerRadius = 5;
this.p3.Cursor = System.Windows.Forms.Cursors.Hand;
this.p3.Dock = System.Windows.Forms.DockStyle.Fill;
this.p3.FillColor = System.Drawing.Color.White;
this.p3.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.p3.IsRadius = true;
this.p3.IsShowRect = true;
this.p3.IsShowTips = false;
this.p3.Location = new System.Drawing.Point(222, 5);
this.p3.Margin = new System.Windows.Forms.Padding(2, 5, 2, 5);
this.p3.Name = "p3";
this.p3.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(223)))), ((int)(((byte)(223)))));
this.p3.RectWidth = 1;
this.p3.Size = new System.Drawing.Size(36, 30);
this.p3.TabIndex = 4;
this.p3.TabStop = false;
this.p3.TipsText = "";
this.p3.BtnClick += new System.EventHandler(this.page_BtnClick);
//
// p2
//
this.p2.BackColor = System.Drawing.Color.White;
this.p2.BtnBackColor = System.Drawing.Color.White;
this.p2.BtnFont = new System.Drawing.Font("微软雅黑", 9F);
this.p2.BtnForeColor = System.Drawing.Color.Gray;
this.p2.BtnText = "2";
this.p2.ConerRadius = 5;
this.p2.Cursor = System.Windows.Forms.Cursors.Hand;
this.p2.Dock = System.Windows.Forms.DockStyle.Fill;
this.p2.FillColor = System.Drawing.Color.White;
this.p2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.p2.IsRadius = true;
this.p2.IsShowRect = true;
this.p2.IsShowTips = false;
this.p2.Location = new System.Drawing.Point(182, 5);
this.p2.Margin = new System.Windows.Forms.Padding(2, 5, 2, 5);
this.p2.Name = "p2";
this.p2.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(223)))), ((int)(((byte)(223)))));
this.p2.RectWidth = 1;
this.p2.Size = new System.Drawing.Size(36, 30);
this.p2.TabIndex = 3;
this.p2.TabStop = false;
this.p2.TipsText = "";
this.p2.BtnClick += new System.EventHandler(this.page_BtnClick);
//
// p1
//
this.p1.BackColor = System.Drawing.Color.White;
this.p1.BtnBackColor = System.Drawing.Color.White;
this.p1.BtnFont = new System.Drawing.Font("微软雅黑", 9F);
this.p1.BtnForeColor = System.Drawing.Color.Gray;
this.p1.BtnText = "1";
this.p1.ConerRadius = 5;
this.p1.Cursor = System.Windows.Forms.Cursors.Hand;
this.p1.Dock = System.Windows.Forms.DockStyle.Fill;
this.p1.FillColor = System.Drawing.Color.White;
this.p1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.p1.IsRadius = true;
this.p1.IsShowRect = true;
this.p1.IsShowTips = false;
this.p1.Location = new System.Drawing.Point(142, 5);
this.p1.Margin = new System.Windows.Forms.Padding(2, 5, 2, 5);
this.p1.Name = "p1";
this.p1.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(223)))), ((int)(((byte)(223)))));
this.p1.RectWidth = 1;
this.p1.Size = new System.Drawing.Size(36, 30);
this.p1.TabIndex = 2;
this.p1.TabStop = false;
this.p1.TipsText = "";
this.p1.BtnClick += new System.EventHandler(this.page_BtnClick);
//
// txtPage
//
this.txtPage.BackColor = System.Drawing.Color.Transparent;
this.txtPage.ConerRadius = 5;
this.txtPage.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtPage.DecLength = 2;
this.txtPage.FillColor = System.Drawing.Color.Empty;
this.txtPage.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.txtPage.ForeColor = System.Drawing.Color.Gray;
this.txtPage.InputText = "";
this.txtPage.InputType = HZH_Controls.TextInputType.PositiveInteger;
this.txtPage.IsFocusColor = true;
this.txtPage.IsRadius = true;
this.txtPage.IsShowClearBtn = false;
this.txtPage.IsShowKeyboard = false;
this.txtPage.IsShowRect = true;
this.txtPage.IsShowSearchBtn = false;
this.txtPage.KeyBoardType = HZH_Controls.Controls.KeyBoardType.UCKeyBorderAll_EN;
this.txtPage.Location = new System.Drawing.Point(564, 5);
this.txtPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtPage.MaxValue = new decimal(new int[] {
1000000,
0,
0,
0});
this.txtPage.MinValue = new decimal(new int[] {
1000000,
0,
0,
-2147483648});
this.txtPage.Name = "txtPage";
this.txtPage.Padding = new System.Windows.Forms.Padding(5);
this.txtPage.PromptColor = System.Drawing.Color.Silver;
this.txtPage.PromptFont = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.txtPage.PromptText = "页码";
this.txtPage.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
this.txtPage.RectWidth = 1;
this.txtPage.RegexPattern = "";
this.txtPage.Size = new System.Drawing.Size(62, 30);
this.txtPage.TabIndex = 14;
//
// UCPagerControl2
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "UCPagerControl2";
this.Size = new System.Drawing.Size(921, 41);
this.tableLayoutPanel1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private UCBtnExt btnFirst;
private UCBtnExt btnPrevious;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private UCBtnExt btnEnd;
private UCBtnExt btnNext;
private UCBtnExt p7;
private UCBtnExt p6;
private UCBtnExt p5;
private UCBtnExt p4;
private UCBtnExt p3;
private UCBtnExt p2;
private UCBtnExt p1;
private UCBtnExt btnToPage;
private UCTextBoxEx txtPage;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace HZH_Controls.Controls.List
{
[ToolboxItem(true)]
public partial class UCPagerControl2 : UCPagerControlBase
{
public UCPagerControl2()
{
InitializeComponent();
txtPage.txtInput.KeyDown += txtInput_KeyDown;
}
void txtInput_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
btnToPage_BtnClick(null, null);
txtPage.InputText = "";
}
}
public override event PageControlEventHandler ShowSourceChanged;
private List<object> m_dataSource;
public override List<object> DataSource
{
get
{
return m_dataSource;
}
set
{
m_dataSource = value;
if (m_dataSource == null)
m_dataSource = new List<object>();
ResetPageCount();
}
}
private int m_intPageSize = 0;
public override int PageSize
{
get
{
return m_intPageSize;
}
set
{
m_intPageSize = value;
ResetPageCount();
}
}
public override void FirstPage()
{
PageIndex = 1;
StartIndex = (PageIndex - 1) * PageSize;
ReloadPage();
var s = GetCurrentSource();
if (ShowSourceChanged != null)
{
ShowSourceChanged(s);
}
}
public override void PreviousPage()
{
PageIndex--;
StartIndex = (PageIndex - 1) * PageSize;
ReloadPage();
var s = GetCurrentSource();
if (ShowSourceChanged != null)
{
ShowSourceChanged(s);
}
}
public override void NextPage()
{
PageIndex++;
StartIndex = (PageIndex - 1) * PageSize;
ReloadPage();
var s = GetCurrentSource();
if (ShowSourceChanged != null)
{
ShowSourceChanged(s);
}
}
public override void EndPage()
{
PageIndex = PageCount;
StartIndex = (PageIndex - 1) * PageSize;
ReloadPage();
var s = GetCurrentSource();
if (ShowSourceChanged != null)
{
ShowSourceChanged(s);
}
}
private void ResetPageCount()
{
if (PageSize > 0)
{
PageCount = m_dataSource.Count / m_intPageSize + (m_dataSource.Count % m_intPageSize > 0 ? 1 : 0);
}
txtPage.MaxValue = PageCount;
txtPage.MinValue = 1;
ReloadPage();
}
private void ReloadPage()
{
try
{
ControlHelper.FreezeControl(tableLayoutPanel1, true);
List<int> lst = new List<int>();
if (PageCount > 0)
{
if (PageCount <= 7)
{
for (int i = 0; i < PageCount; i++)
{
lst.Add(i + 1);
}
}
else
{
int start = PageIndex; //开始按钮数字
int end = 1; //结束按钮数字
int pageCount = PageCount; //总页数
int offset = 3; //偏移量
start -= offset;//计算左偏移量
start = start < 1 ? 1 : start;//限定最小页码
end = start + 7 - 1;//根据偏移计算结束按钮
end = end > pageCount ? pageCount : end;//限定最大页码
start = end - 7 + 1;//根据偏移计算开始页码
start = start < 1 ? 1 : start;//限定最小页码
for (int i = start; i <= end; i++)
{
lst.Add(i);
}
}
}
for (int i = 0; i < 7; i++)
{
UCBtnExt c = (UCBtnExt)this.tableLayoutPanel1.Controls.Find("p" + (i + 1), false)[0];
if (i >= lst.Count)
{
c.Visible = false;
}
else
{
c.BtnText = lst[i].ToString();
c.Visible = true;
if (lst[i] == PageIndex)
{
c.RectColor = Color.FromArgb(255, 77, 59);
}
else
{
c.RectColor = Color.FromArgb(223, 223, 223);
}
}
}
}
finally
{
ControlHelper.FreezeControl(tableLayoutPanel1, false);
}
}
private void page_BtnClick(object sender, EventArgs e)
{
PageIndex = (sender as UCBtnExt).BtnText.ToInt();
StartIndex = (PageIndex - 1) * PageSize;
ReloadPage();
var s = GetCurrentSource();
if (ShowSourceChanged != null)
{
ShowSourceChanged(s);
}
}
protected override void ShowBtn(bool blnLeftBtn, bool blnRightBtn)
{
btnFirst.Enabled = btnPrevious.Enabled = blnLeftBtn;
btnNext.Enabled = btnEnd.Enabled = blnRightBtn;
}
private void btnFirst_BtnClick(object sender, EventArgs e)
{
FirstPage();
}
private void btnPrevious_BtnClick(object sender, EventArgs e)
{
PreviousPage();
}
private void btnNext_BtnClick(object sender, EventArgs e)
{
NextPage();
}
private void btnEnd_BtnClick(object sender, EventArgs e)
{
EndPage();
}
private void btnToPage_BtnClick(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(txtPage.InputText))
{
PageIndex = txtPage.InputText.ToInt();
StartIndex = (PageIndex - 1) * PageSize;
ReloadPage();
var s = GetCurrentSource();
if (ShowSourceChanged != null)
{
ShowSourceChanged(s);
}
}
}
}
}
<?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
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<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
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
mimetype set.
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
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
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
: 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
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
......@@ -53,12 +53,28 @@ namespace HZH_Controls.Controls
#endregion
#endregion
/// <summary>
/// 总页数
/// </summary>
public virtual int PageCount
{
get;
set;
}
private int m_pageIndex = 1;
/// <summary>
/// 当前页码
/// </summary>
public virtual int PageIndex
{
get { return m_pageIndex; }
set { m_pageIndex = value; }
}
/// <summary>
/// 关联的数据源
/// </summary>
public virtual List<object> DataSource { get; set; }
public event PageControlEventHandler ShowSourceChanged;
public virtual event PageControlEventHandler ShowSourceChanged;
private int m_pageSize = 1;
/// <summary>
/// 每页显示数量
......@@ -85,7 +101,6 @@ namespace HZH_Controls.Controls
}
}
public UCPagerControlBase()
{
InitializeComponent();
......@@ -230,7 +245,5 @@ namespace HZH_Controls.Controls
/// <param name="blnRightBtn">是否显示下一页,最后一页</param>
protected virtual void ShowBtn(bool blnLeftBtn, bool blnRightBtn)
{ }
}
}
......@@ -66,6 +66,12 @@
<Compile Include="Controls\List\UCPagerControl.Designer.cs">
<DependentUpon>UCPagerControl.cs</DependentUpon>
</Compile>
<Compile Include="Controls\List\UCPagerControl2.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\List\UCPagerControl2.Designer.cs">
<DependentUpon>UCPagerControl2.cs</DependentUpon>
</Compile>
<Compile Include="Controls\Menu\IMenuItem.cs" />
<Compile Include="Controls\Menu\MenuItemEntity.cs" />
<Compile Include="Controls\Menu\UCMenu.cs">
......@@ -369,6 +375,9 @@
<EmbeddedResource Include="Controls\List\UCPagerControl.resx">
<DependentUpon>UCPagerControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\List\UCPagerControl2.resx">
<DependentUpon>UCPagerControl2.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\List\UCPagerControlBase.resx">
<DependentUpon>UCPagerControlBase.cs</DependentUpon>
</EmbeddedResource>
......
......@@ -41,26 +41,30 @@
this.button8 = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox9 = new System.Windows.Forms.GroupBox();
this.ucHorizontalList1 = new HZH_Controls.Controls.UCHorizontalList();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.groupBox8 = new System.Windows.Forms.GroupBox();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.button9 = new System.Windows.Forms.Button();
this.groupBox10 = new System.Windows.Forms.GroupBox();
this.ucMenu1 = new HZH_Controls.Controls.UCMenu();
this.ucHorizontalList1 = new HZH_Controls.Controls.UCHorizontalList();
this.ucDatePickerExt3 = new HZH_Controls.Controls.UCDatePickerExt();
this.ucDatePickerExt2 = new HZH_Controls.Controls.UCDatePickerExt();
this.ucDatePickerExt1 = new HZH_Controls.Controls.UCDatePickerExt();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.ucComboBox2 = new HZH_Controls.Controls.UCComboBox();
this.ucComboBox1 = new HZH_Controls.Controls.UCComboBox();
this.groupBox8 = new System.Windows.Forms.GroupBox();
this.ucListExt1 = new HZH_Controls.Controls.UCListExt();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.treeViewEx1 = new HZH_Controls.Controls.TreeViewEx();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.ucTextBoxEx4 = new HZH_Controls.Controls.UCTextBoxEx();
this.ucTextBoxEx3 = new HZH_Controls.Controls.UCTextBoxEx();
this.ucTextBoxEx2 = new HZH_Controls.Controls.UCTextBoxEx();
this.ucTextBoxEx1 = new HZH_Controls.Controls.UCTextBoxEx();
this.ucNumTextBox1 = new HZH_Controls.Controls.UCNumTextBox();
this.textBoxTransparent1 = new HZH_Controls.Controls.TextBoxTransparent();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.ucCheckBox4 = new HZH_Controls.Controls.UCCheckBox();
this.ucCheckBox3 = new HZH_Controls.Controls.UCCheckBox();
this.ucCheckBox2 = new HZH_Controls.Controls.UCCheckBox();
......@@ -69,15 +73,11 @@
this.ucRadioButton3 = new HZH_Controls.Controls.UCRadioButton();
this.ucRadioButton2 = new HZH_Controls.Controls.UCRadioButton();
this.ucRadioButton1 = new HZH_Controls.Controls.UCRadioButton();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.ucBtnImg1 = new HZH_Controls.Controls.UCBtnImg();
this.ucBtnFillet1 = new HZH_Controls.Controls.UCBtnFillet();
this.ucBtnExt2 = new HZH_Controls.Controls.UCBtnExt();
this.ucBtnExt1 = new HZH_Controls.Controls.UCBtnExt();
this.button9 = new System.Windows.Forms.Button();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.groupBox10 = new System.Windows.Forms.GroupBox();
this.ucMenu1 = new HZH_Controls.Controls.UCMenu();
this.ucPagerControl21 = new HZH_Controls.Controls.List.UCPagerControl2();
this.groupBox1.SuspendLayout();
this.groupBox9.SuspendLayout();
this.groupBox7.SuspendLayout();
......@@ -202,16 +202,6 @@
this.groupBox9.TabStop = false;
this.groupBox9.Text = "横向列表";
//
// ucHorizontalList1
//
this.ucHorizontalList1.DataSource = null;
this.ucHorizontalList1.IsAutoSelectFirst = true;
this.ucHorizontalList1.Location = new System.Drawing.Point(6, 25);
this.ucHorizontalList1.Name = "ucHorizontalList1";
this.ucHorizontalList1.SelectedItem = null;
this.ucHorizontalList1.Size = new System.Drawing.Size(473, 53);
this.ucHorizontalList1.TabIndex = 0;
//
// groupBox7
//
this.groupBox7.Controls.Add(this.ucDatePickerExt3);
......@@ -224,6 +214,129 @@
this.groupBox7.TabStop = false;
this.groupBox7.Text = "日历";
//
// groupBox6
//
this.groupBox6.Controls.Add(this.ucComboBox2);
this.groupBox6.Controls.Add(this.ucComboBox1);
this.groupBox6.Location = new System.Drawing.Point(25, 363);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(187, 119);
this.groupBox6.TabIndex = 6;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "下拉列表";
//
// groupBox8
//
this.groupBox8.Controls.Add(this.ucListExt1);
this.groupBox8.Location = new System.Drawing.Point(876, 30);
this.groupBox8.Name = "groupBox8";
this.groupBox8.Size = new System.Drawing.Size(240, 324);
this.groupBox8.TabIndex = 4;
this.groupBox8.TabStop = false;
this.groupBox8.Text = "列表";
//
// groupBox5
//
this.groupBox5.Controls.Add(this.treeViewEx1);
this.groupBox5.Location = new System.Drawing.Point(625, 30);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(240, 327);
this.groupBox5.TabIndex = 4;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "树";
//
// groupBox4
//
this.groupBox4.Controls.Add(this.ucTextBoxEx4);
this.groupBox4.Controls.Add(this.ucTextBoxEx3);
this.groupBox4.Controls.Add(this.ucTextBoxEx2);
this.groupBox4.Controls.Add(this.ucTextBoxEx1);
this.groupBox4.Controls.Add(this.ucNumTextBox1);
this.groupBox4.Controls.Add(this.textBoxTransparent1);
this.groupBox4.Location = new System.Drawing.Point(397, 30);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(209, 327);
this.groupBox4.TabIndex = 2;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "文本框";
//
// groupBox3
//
this.groupBox3.Controls.Add(this.ucCheckBox4);
this.groupBox3.Controls.Add(this.ucCheckBox3);
this.groupBox3.Controls.Add(this.ucCheckBox2);
this.groupBox3.Controls.Add(this.ucCheckBox1);
this.groupBox3.Controls.Add(this.ucRadioButton4);
this.groupBox3.Controls.Add(this.ucRadioButton3);
this.groupBox3.Controls.Add(this.ucRadioButton2);
this.groupBox3.Controls.Add(this.ucRadioButton1);
this.groupBox3.Location = new System.Drawing.Point(232, 30);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(149, 327);
this.groupBox3.TabIndex = 1;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "单选/复选";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.ucBtnImg1);
this.groupBox2.Controls.Add(this.ucBtnFillet1);
this.groupBox2.Controls.Add(this.ucBtnExt2);
this.groupBox2.Controls.Add(this.ucBtnExt1);
this.groupBox2.Location = new System.Drawing.Point(25, 30);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(187, 327);
this.groupBox2.TabIndex = 0;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "按钮";
//
// button9
//
this.button9.Location = new System.Drawing.Point(964, 34);
this.button9.Name = "button9";
this.button9.Size = new System.Drawing.Size(116, 23);
this.button9.TabIndex = 0;
this.button9.Text = "FrmAnchor2";
this.button9.UseVisualStyleBackColor = true;
this.button9.Click += new System.EventHandler(this.button9_Click);
//
// groupBox10
//
this.groupBox10.Controls.Add(this.ucMenu1);
this.groupBox10.Location = new System.Drawing.Point(1162, 88);
this.groupBox10.Name = "groupBox10";
this.groupBox10.Size = new System.Drawing.Size(200, 490);
this.groupBox10.TabIndex = 3;
this.groupBox10.TabStop = false;
this.groupBox10.Text = "导航";
//
// ucMenu1
//
this.ucMenu1.AutoScroll = true;
this.ucMenu1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(30)))), ((int)(((byte)(39)))));
this.ucMenu1.ChildrenItemStyles = null;
this.ucMenu1.ChildrenItemType = typeof(HZH_Controls.Controls.UCMenuChildrenItem);
this.ucMenu1.DataSource = null;
this.ucMenu1.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucMenu1.IsShowFirstItem = true;
this.ucMenu1.Location = new System.Drawing.Point(3, 17);
this.ucMenu1.MenuStyle = HZH_Controls.Controls.MenuStyle.Fill;
this.ucMenu1.Name = "ucMenu1";
this.ucMenu1.ParentItemStyles = null;
this.ucMenu1.ParentItemType = typeof(HZH_Controls.Controls.UCMenuParentItem);
this.ucMenu1.Size = new System.Drawing.Size(194, 470);
this.ucMenu1.TabIndex = 0;
//
// ucHorizontalList1
//
this.ucHorizontalList1.DataSource = null;
this.ucHorizontalList1.IsAutoSelectFirst = true;
this.ucHorizontalList1.Location = new System.Drawing.Point(6, 25);
this.ucHorizontalList1.Name = "ucHorizontalList1";
this.ucHorizontalList1.SelectedItem = null;
this.ucHorizontalList1.Size = new System.Drawing.Size(473, 53);
this.ucHorizontalList1.TabIndex = 0;
//
// ucDatePickerExt3
//
this.ucDatePickerExt3.BackColor = System.Drawing.Color.Transparent;
......@@ -284,17 +397,6 @@
this.ucDatePickerExt1.TimeFontSize = 20;
this.ucDatePickerExt1.TimeType = HZH_Controls.Controls.DateTimePickerType.DateTime;
//
// groupBox6
//
this.groupBox6.Controls.Add(this.ucComboBox2);
this.groupBox6.Controls.Add(this.ucComboBox1);
this.groupBox6.Location = new System.Drawing.Point(25, 363);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(187, 119);
this.groupBox6.TabIndex = 6;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "下拉列表";
//
// ucComboBox2
//
this.ucComboBox2.BackColor = System.Drawing.Color.Transparent;
......@@ -343,16 +445,6 @@
this.ucComboBox1.TabIndex = 5;
this.ucComboBox1.TextValue = null;
//
// groupBox8
//
this.groupBox8.Controls.Add(this.ucListExt1);
this.groupBox8.Location = new System.Drawing.Point(876, 30);
this.groupBox8.Name = "groupBox8";
this.groupBox8.Size = new System.Drawing.Size(240, 324);
this.groupBox8.TabIndex = 4;
this.groupBox8.TabStop = false;
this.groupBox8.Text = "列表";
//
// ucListExt1
//
this.ucListExt1.AutoScroll = true;
......@@ -373,16 +465,6 @@
this.ucListExt1.Title2Font = new System.Drawing.Font("微软雅黑", 14F);
this.ucListExt1.TitleFont = new System.Drawing.Font("微软雅黑", 15F);
//
// groupBox5
//
this.groupBox5.Controls.Add(this.treeViewEx1);
this.groupBox5.Location = new System.Drawing.Point(625, 30);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(240, 327);
this.groupBox5.TabIndex = 4;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "树";
//
// treeViewEx1
//
this.treeViewEx1.BackColor = System.Drawing.Color.White;
......@@ -415,21 +497,6 @@
this.treeViewEx1.TipFont = new System.Drawing.Font("Arial Unicode MS", 12F);
this.treeViewEx1.TipImage = ((System.Drawing.Image)(resources.GetObject("treeViewEx1.TipImage")));
//
// groupBox4
//
this.groupBox4.Controls.Add(this.ucTextBoxEx4);
this.groupBox4.Controls.Add(this.ucTextBoxEx3);
this.groupBox4.Controls.Add(this.ucTextBoxEx2);
this.groupBox4.Controls.Add(this.ucTextBoxEx1);
this.groupBox4.Controls.Add(this.ucNumTextBox1);
this.groupBox4.Controls.Add(this.textBoxTransparent1);
this.groupBox4.Location = new System.Drawing.Point(397, 30);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(209, 327);
this.groupBox4.TabIndex = 2;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "文本框";
//
// ucTextBoxEx4
//
this.ucTextBoxEx4.BackColor = System.Drawing.Color.Transparent;
......@@ -646,23 +713,6 @@
this.textBoxTransparent1.TabIndex = 0;
this.textBoxTransparent1.Text = "这是一个透明文本框";
//
// groupBox3
//
this.groupBox3.Controls.Add(this.ucCheckBox4);
this.groupBox3.Controls.Add(this.ucCheckBox3);
this.groupBox3.Controls.Add(this.ucCheckBox2);
this.groupBox3.Controls.Add(this.ucCheckBox1);
this.groupBox3.Controls.Add(this.ucRadioButton4);
this.groupBox3.Controls.Add(this.ucRadioButton3);
this.groupBox3.Controls.Add(this.ucRadioButton2);
this.groupBox3.Controls.Add(this.ucRadioButton1);
this.groupBox3.Location = new System.Drawing.Point(232, 30);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(149, 327);
this.groupBox3.TabIndex = 1;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "单选/复选";
//
// ucCheckBox4
//
this.ucCheckBox4.BackColor = System.Drawing.Color.Transparent;
......@@ -747,19 +797,6 @@
this.ucRadioButton1.TabIndex = 0;
this.ucRadioButton1.TextValue = "单选按钮1";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.ucBtnImg1);
this.groupBox2.Controls.Add(this.ucBtnFillet1);
this.groupBox2.Controls.Add(this.ucBtnExt2);
this.groupBox2.Controls.Add(this.ucBtnExt1);
this.groupBox2.Location = new System.Drawing.Point(25, 30);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(187, 327);
this.groupBox2.TabIndex = 0;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "按钮";
//
// ucBtnImg1
//
this.ucBtnImg1.BackColor = System.Drawing.Color.White;
......@@ -852,64 +889,27 @@
this.ucBtnExt1.TabStop = false;
this.ucBtnExt1.TipsText = "";
//
// button9
//
this.button9.Location = new System.Drawing.Point(964, 34);
this.button9.Name = "button9";
this.button9.Size = new System.Drawing.Size(116, 23);
this.button9.TabIndex = 0;
this.button9.Text = "FrmAnchor2";
this.button9.UseVisualStyleBackColor = true;
this.button9.Click += new System.EventHandler(this.button9_Click);
//
// comboBox1
//
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"1",
"2",
"3",
"4",
"54",
"6",
"787"});
this.comboBox1.Location = new System.Drawing.Point(394, 585);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(121, 20);
this.comboBox1.TabIndex = 2;
//
// groupBox10
//
this.groupBox10.Controls.Add(this.ucMenu1);
this.groupBox10.Location = new System.Drawing.Point(1162, 88);
this.groupBox10.Name = "groupBox10";
this.groupBox10.Size = new System.Drawing.Size(200, 490);
this.groupBox10.TabIndex = 3;
this.groupBox10.TabStop = false;
this.groupBox10.Text = "导航";
//
// ucMenu1
// ucPagerControl21
//
this.ucMenu1.ChildrenItemStyles = null;
this.ucMenu1.ChildrenItemType = typeof(HZH_Controls.Controls.UCMenuChildrenItem);
this.ucMenu1.DataSource = null;
this.ucMenu1.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucMenu1.IsShowFirstItem = true;
this.ucMenu1.Location = new System.Drawing.Point(3, 17);
this.ucMenu1.Name = "ucMenu1";
this.ucMenu1.ParentItemStyles = null;
this.ucMenu1.ParentItemType = typeof(HZH_Controls.Controls.UCMenuParentItem);
this.ucMenu1.Size = new System.Drawing.Size(194, 470);
this.ucMenu1.TabIndex = 0;
this.ucPagerControl21.BackColor = System.Drawing.Color.White;
this.ucPagerControl21.DataSource = null;
this.ucPagerControl21.Dock = System.Windows.Forms.DockStyle.Bottom;
this.ucPagerControl21.Location = new System.Drawing.Point(0, 599);
this.ucPagerControl21.Name = "ucPagerControl21";
this.ucPagerControl21.PageCount = 0;
this.ucPagerControl21.PageIndex = 1;
this.ucPagerControl21.PageSize = 0;
this.ucPagerControl21.Size = new System.Drawing.Size(1374, 41);
this.ucPagerControl21.StartIndex = 0;
this.ucPagerControl21.TabIndex = 4;
//
// Form1
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1374, 616);
this.ClientSize = new System.Drawing.Size(1374, 640);
this.Controls.Add(this.ucPagerControl21);
this.Controls.Add(this.groupBox10);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.button5);
this.Controls.Add(this.button4);
......@@ -985,9 +985,9 @@
private System.Windows.Forms.GroupBox groupBox9;
private HZH_Controls.Controls.UCHorizontalList ucHorizontalList1;
private System.Windows.Forms.Button button9;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.GroupBox groupBox10;
private HZH_Controls.Controls.UCMenu ucMenu1;
private HZH_Controls.Controls.List.UCPagerControl2 ucPagerControl21;
}
}
......@@ -89,6 +89,15 @@ namespace Test
}
this.ucMenu1.MenuStyle = MenuStyle.Top;
this.ucMenu1.DataSource = lstMenu;
List<object> lstPage2 = new List<object>();
for (int i = 0; i < 1000; i++)
{
lstPage2.Add(i);
}
ucPagerControl21.PageSize = 10;
ucPagerControl21.DataSource = lstPage2;
}
private void timer1_Tick(object sender, EventArgs e)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!