button 空格键按下press背景效果
imagelistbox 滚动条bug 分页控件 当前页为首页或者最后页时,上一页或者下一页按钮enable设置为false
This commit is contained in:
parent
a4acdf6a50
commit
609488137c
5
SunnyUI.Demo/Controls/FDataGridView.Designer.cs
generated
5
SunnyUI.Demo/Controls/FDataGridView.Designer.cs
generated
@ -80,7 +80,6 @@
|
|||||||
this.uiDataGridView1.Location = new System.Drawing.Point(0, 0);
|
this.uiDataGridView1.Location = new System.Drawing.Point(0, 0);
|
||||||
this.uiDataGridView1.MultiSelect = false;
|
this.uiDataGridView1.MultiSelect = false;
|
||||||
this.uiDataGridView1.Name = "uiDataGridView1";
|
this.uiDataGridView1.Name = "uiDataGridView1";
|
||||||
this.uiDataGridView1.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
|
|
||||||
this.uiDataGridView1.RowHeadersVisible = false;
|
this.uiDataGridView1.RowHeadersVisible = false;
|
||||||
dataGridViewCellStyle4.BackColor = System.Drawing.Color.White;
|
dataGridViewCellStyle4.BackColor = System.Drawing.Color.White;
|
||||||
this.uiDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle4;
|
this.uiDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle4;
|
||||||
@ -90,11 +89,10 @@
|
|||||||
this.uiDataGridView1.ShowRect = false;
|
this.uiDataGridView1.ShowRect = false;
|
||||||
this.uiDataGridView1.Size = new System.Drawing.Size(861, 380);
|
this.uiDataGridView1.Size = new System.Drawing.Size(861, 380);
|
||||||
this.uiDataGridView1.TabIndex = 0;
|
this.uiDataGridView1.TabIndex = 0;
|
||||||
this.uiDataGridView1.TagString = null;
|
|
||||||
//
|
//
|
||||||
// uiPagination1
|
// uiPagination1
|
||||||
//
|
//
|
||||||
this.uiPagination1.ActivePage = 500;
|
this.uiPagination1.ActivePage = 50;
|
||||||
this.uiPagination1.CausesValidation = false;
|
this.uiPagination1.CausesValidation = false;
|
||||||
this.uiPagination1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
this.uiPagination1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||||
this.uiPagination1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
this.uiPagination1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||||
@ -102,6 +100,7 @@
|
|||||||
this.uiPagination1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
this.uiPagination1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
this.uiPagination1.Name = "uiPagination1";
|
this.uiPagination1.Name = "uiPagination1";
|
||||||
this.uiPagination1.PagerCount = 11;
|
this.uiPagination1.PagerCount = 11;
|
||||||
|
this.uiPagination1.PageSize = 50;
|
||||||
this.uiPagination1.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
|
this.uiPagination1.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
|
||||||
this.uiPagination1.Size = new System.Drawing.Size(861, 35);
|
this.uiPagination1.Size = new System.Drawing.Size(861, 35);
|
||||||
this.uiPagination1.TabIndex = 1;
|
this.uiPagination1.TabIndex = 1;
|
||||||
|
@ -382,12 +382,22 @@ namespace Sunny.UI
|
|||||||
{
|
{
|
||||||
if (Focused && e.KeyCode == Keys.Space)
|
if (Focused && e.KeyCode == Keys.Space)
|
||||||
{
|
{
|
||||||
|
IsPress = true;
|
||||||
|
Invalidate();
|
||||||
PerformClick();
|
PerformClick();
|
||||||
}
|
}
|
||||||
|
|
||||||
base.OnKeyDown(e);
|
base.OnKeyDown(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnKeyUp(KeyEventArgs e)
|
||||||
|
{
|
||||||
|
IsPress = false;
|
||||||
|
Invalidate();
|
||||||
|
|
||||||
|
base.OnKeyUp(e);
|
||||||
|
}
|
||||||
|
|
||||||
[DefaultValue(false)]
|
[DefaultValue(false)]
|
||||||
[Description("显示激活时边框线"), Category("SunnyUI")]
|
[Description("显示激活时边框线"), Category("SunnyUI")]
|
||||||
public bool ShowFocusLine { get; set; }
|
public bool ShowFocusLine { get; set; }
|
||||||
|
@ -321,7 +321,14 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
protected override void OnSizeChanged(EventArgs e)
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
SetScrollInfo();
|
if (Bar != null && Bar.Visible)
|
||||||
|
{
|
||||||
|
if (Bar.Value != 0)
|
||||||
|
{
|
||||||
|
ScrollBarInfo.SetScrollValue(Handle, Bar.Value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//SetScrollInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetScrollInfo()
|
public void SetScrollInfo()
|
||||||
@ -379,22 +386,19 @@ namespace Sunny.UI
|
|||||||
{
|
{
|
||||||
base.OnMouseWheel(e);
|
base.OnMouseWheel(e);
|
||||||
|
|
||||||
if (Bar.Visible)
|
if (Bar != null && Bar.Visible)
|
||||||
{
|
{
|
||||||
var si = ScrollBarInfo.GetInfo(Handle);
|
var si = ScrollBarInfo.GetInfo(Handle);
|
||||||
|
int temp = Math.Abs(e.Delta / 120);
|
||||||
if (e.Delta > 10)
|
if (e.Delta > 10)
|
||||||
{
|
{
|
||||||
if (si.nPos > 0)
|
int nposnum = si.nPos - temp * SystemInformation.MouseWheelScrollLines;
|
||||||
{
|
ScrollBarInfo.SetScrollValue(Handle, nposnum >= si.nMin ? nposnum : 0);
|
||||||
ScrollBarInfo.ScrollUp(Handle);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (e.Delta < -10)
|
else if (e.Delta < -10)
|
||||||
{
|
{
|
||||||
if (si.nPos < si.ScrollMax)
|
int nposnum = si.nPos + temp * SystemInformation.MouseWheelScrollLines;
|
||||||
{
|
ScrollBarInfo.SetScrollValue(Handle, nposnum <= si.nMax ? nposnum : si.nMax);
|
||||||
ScrollBarInfo.ScrollDown(Handle);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -404,11 +404,10 @@ namespace Sunny.UI
|
|||||||
else if (e.Delta < -10)
|
else if (e.Delta < -10)
|
||||||
{
|
{
|
||||||
int nposnum = si.nPos + temp * SystemInformation.MouseWheelScrollLines;
|
int nposnum = si.nPos + temp * SystemInformation.MouseWheelScrollLines;
|
||||||
ScrollBarInfo.SetScrollValue(Handle, nposnum <= si.nMax ? nposnum : si.nMax);
|
ScrollBarInfo.SetScrollValue(Handle, nposnum <= si.ScrollMax ? nposnum : si.ScrollMax);
|
||||||
}
|
}
|
||||||
|
SetScrollInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
SetScrollInfo();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetStyle(UIStyle style)
|
public void SetStyle(UIStyle style)
|
||||||
|
@ -703,8 +703,24 @@ namespace Sunny.UI
|
|||||||
edtPage.HasMaximum = true;
|
edtPage.HasMaximum = true;
|
||||||
edtPage.Maximum = PageCount;
|
edtPage.Maximum = PageCount;
|
||||||
|
|
||||||
if (activePage > PageCount) activePage = PageCount;
|
if (activePage >= PageCount)
|
||||||
if (activePage < 1) activePage = 1;
|
{
|
||||||
|
activePage = PageCount;
|
||||||
|
b16.Enabled = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
b16.Enabled = true;
|
||||||
|
}
|
||||||
|
if (activePage <= 1)
|
||||||
|
{
|
||||||
|
activePage = 1;
|
||||||
|
b0.Enabled = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
b0.Enabled = true;
|
||||||
|
}
|
||||||
edtPage.IntValue = activePage;
|
edtPage.IntValue = activePage;
|
||||||
|
|
||||||
if (TotalCount == 0)
|
if (TotalCount == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user