### 2021-02-27更新

------
#### ryControls    V2.1.2102.2701
- *.[新增]按钮的渐变属性支持全局定义。
- *.[修复]修复Gdu.WinformUI在开发环境中重新编译会导致窗体变大的BUG。
This commit is contained in:
如果当时 2021-02-27 16:47:58 +08:00
parent 34a3ef3ed9
commit 36d682a736
52 changed files with 157 additions and 33 deletions

View File

@ -1,2 +1,2 @@
[Money_Op]
hwnd=2562494
hwnd=397838

View File

@ -1,4 +1,4 @@
<root>
<list id="LastUpdateTime" Value="2021/2/11 13:12:33" />
<list id="LastUpdateTime" Value="2021/2/24 19:46:53" />
<list id="UpdateAfterTime" Value="0" />
</root>

View File

@ -1769,6 +1769,11 @@
按钮基础背景色
</summary>
</member>
<member name="P:ryControls.rySearch.ButtonRoundBackColor">
<summary>
按钮圆角部分背景颜色
</summary>
</member>
<member name="P:ryControls.rySearch.Text">
<summary>
@ -1873,6 +1878,11 @@
字体颜色
</summary>
</member>
<member name="F:ryControls.Skin.ButtonSkinInfo.ColorGradient">
<summary>
是否颜色渐变
</summary>
</member>
<member name="T:ryControls.SkinHelp">
<summary>
类说明:帮助类

View File

@ -1769,6 +1769,11 @@
按钮基础背景色
</summary>
</member>
<member name="P:ryControls.rySearch.ButtonRoundBackColor">
<summary>
按钮圆角部分背景颜色
</summary>
</member>
<member name="P:ryControls.rySearch.Text">
<summary>
@ -1873,6 +1878,11 @@
字体颜色
</summary>
</member>
<member name="F:ryControls.Skin.ButtonSkinInfo.ColorGradient">
<summary>
是否颜色渐变
</summary>
</member>
<member name="T:ryControls.SkinHelp">
<summary>
类说明:帮助类

View File

@ -1769,6 +1769,11 @@
按钮基础背景色
</summary>
</member>
<member name="P:ryControls.rySearch.ButtonRoundBackColor">
<summary>
按钮圆角部分背景颜色
</summary>
</member>
<member name="P:ryControls.rySearch.Text">
<summary>
@ -1873,6 +1878,11 @@
字体颜色
</summary>
</member>
<member name="F:ryControls.Skin.ButtonSkinInfo.ColorGradient">
<summary>
是否颜色渐变
</summary>
</member>
<member name="T:ryControls.SkinHelp">
<summary>
类说明:帮助类

View File

@ -1769,6 +1769,11 @@
按钮基础背景色
</summary>
</member>
<member name="P:ryControls.rySearch.ButtonRoundBackColor">
<summary>
按钮圆角部分背景颜色
</summary>
</member>
<member name="P:ryControls.rySearch.Text">
<summary>
@ -1873,6 +1878,11 @@
字体颜色
</summary>
</member>
<member name="F:ryControls.Skin.ButtonSkinInfo.ColorGradient">
<summary>
是否颜色渐变
</summary>
</member>
<member name="T:ryControls.SkinHelp">
<summary>
类说明:帮助类

View File

@ -1,7 +1,13 @@
### 2021-02-22更新
### 2021-02-27更新
------
#### ryControls V2.1.2102.2701
- *.[新增]按钮的渐变属性支持全局定义。
- *.[修复]修复Gdu.WinformUI在开发环境中重新编译会导致窗体变大的BUG。
### 2021-02-22更新
------
#### ryControls V2.1.2102.2201
*.[新增]新加入Gdu.WinformUI控件。
- *.[新增]新加入Gdu.WinformUI控件。
### 2021-02-11更新
------

View File

@ -55,14 +55,17 @@
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.chromeTabControl1 = new ryControls.ChromeTabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.rySearch1 = new ryControls.rySearch();
this.textBox1 = new System.Windows.Forms.TextBox();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.iconViewEx1 = new ryControls.IconViewEx();
this.textBox1 = new System.Windows.Forms.TextBox();
this.panel1 = new System.Windows.Forms.Panel();
this.MenuTray.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.chromeTabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// notifyIcon1
@ -149,6 +152,7 @@
//
// tabPage1
//
this.tabPage1.Controls.Add(this.panel1);
this.tabPage1.Controls.Add(this.textBox1);
this.tabPage1.Controls.Add(this.button2);
this.tabPage1.Controls.Add(this.button1);
@ -161,6 +165,22 @@
this.tabPage1.Text = "首页";
this.tabPage1.UseVisualStyleBackColor = true;
//
// rySearch1
//
this.rySearch1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.rySearch1.EmptyText = "";
this.rySearch1.Location = new System.Drawing.Point(25, 61);
this.rySearch1.Name = "rySearch1";
this.rySearch1.Size = new System.Drawing.Size(261, 41);
this.rySearch1.TabIndex = 4;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(447, 45);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(275, 21);
this.textBox1.TabIndex = 3;
//
// button2
//
this.button2.Location = new System.Drawing.Point(276, 31);
@ -203,7 +223,7 @@
listViewItem11,
listViewItem12,
listViewItem13});
this.iconViewEx1.Location = new System.Drawing.Point(161, 88);
this.iconViewEx1.Location = new System.Drawing.Point(142, 107);
this.iconViewEx1.MultiSelect = false;
this.iconViewEx1.Name = "iconViewEx1";
this.iconViewEx1.OwnerDraw = true;
@ -218,12 +238,14 @@
this.iconViewEx1.UseCompatibleStateImageBehavior = false;
this.iconViewEx1.View = System.Windows.Forms.View.Tile;
//
// textBox1
// panel1
//
this.textBox1.Location = new System.Drawing.Point(447, 45);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(275, 21);
this.textBox1.TabIndex = 3;
this.panel1.BackColor = System.Drawing.Color.Gainsboro;
this.panel1.Controls.Add(this.rySearch1);
this.panel1.Location = new System.Drawing.Point(73, 163);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(388, 237);
this.panel1.TabIndex = 5;
//
// FrmStart
//
@ -244,6 +266,7 @@
this.chromeTabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -265,5 +288,7 @@
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.TextBox textBox1;
private ryControls.rySearch rySearch1;
private System.Windows.Forms.Panel panel1;
}
}

Binary file not shown.

Binary file not shown.

View File

@ -240,7 +240,14 @@ namespace ryControls
[Description("背景色是否渐变")]
public bool ColorGradient
{
get { return _ColorGradient; }
get
{
if (SkinCommon.UseDefSkin && UseDefSkin)
{
return SkinCommon.ButtonSkin.ColorGradient;
}
return _ColorGradient;
}
set
{
if (value != _ColorGradient)

View File

@ -33,5 +33,9 @@ namespace ryControls.Skin
/// 字体颜色
/// </summary>
public Color ForeColor = Color.White;
/// <summary>
/// 是否颜色渐变
/// </summary>
public bool ColorGradient = false;
}
}

View File

@ -33,7 +33,9 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(rySearch));
this.txtSearch = new System.Windows.Forms.TextBox();
this.panel1 = new System.Windows.Forms.Panel();
this.btnSearch = new ryControls.ButtonEx();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// txtSearch
@ -57,19 +59,28 @@
this.txtSearch.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TxtSearch_KeyDown);
this.txtSearch.Leave += new System.EventHandler(this.TxtSearch_Leave);
//
// panel1
//
this.panel1.Controls.Add(this.btnSearch);
this.panel1.Dock = System.Windows.Forms.DockStyle.Right;
this.panel1.Location = new System.Drawing.Point(245, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(37, 30);
this.panel1.TabIndex = 5;
//
// btnSearch
//
this.btnSearch.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnSearch.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.btnSearch.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnSearch.Image = ((System.Drawing.Image)(resources.GetObject("btnSearch.Image")));
this.btnSearch.ImageHeight = 14;
this.btnSearch.ImageWidth = 14;
this.btnSearch.Location = new System.Drawing.Point(246, 4);
this.btnSearch.Location = new System.Drawing.Point(0, 0);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Radius = 12;
this.btnSearch.RoundStyle = ryControls.RoundStyle.Right;
this.btnSearch.Size = new System.Drawing.Size(36, 23);
this.btnSearch.Size = new System.Drawing.Size(37, 30);
this.btnSearch.SpliteButtonWidth = 0;
this.btnSearch.TabIndex = 4;
this.btnSearch.TabStop = false;
@ -81,7 +92,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.Controls.Add(this.btnSearch);
this.Controls.Add(this.panel1);
this.Controls.Add(this.txtSearch);
this.Name = "rySearch";
this.Size = new System.Drawing.Size(282, 30);
@ -92,6 +103,7 @@
this.Leave += new System.EventHandler(this.RySearch_Leave);
this.Resize += new System.EventHandler(this.RySearch_Resize);
this.ImeModeChanged += new System.EventHandler(this.RySearch_ImeModeChanged);
this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -101,5 +113,6 @@
private ButtonEx btnSearch;
private System.Windows.Forms.TextBox txtSearch;
private System.Windows.Forms.Panel panel1;
}
}

View File

@ -8,6 +8,7 @@ using System.Text;
using System.Windows.Forms;
using ryControls;
using ryControls.Skin;
using System.Drawing.Drawing2D;
namespace ryControls
{
@ -42,8 +43,12 @@ namespace ryControls
InitializeComponent();
txtSearch.Font = Font;
txtSearch.ImeMode = ImeMode;
base.GotFocus += RySearch_GotFocus;
this.SetStyle(
ControlStyles.AllPaintingInWmPaint | //忽略擦出的消息,减少闪烁。
ControlStyles.OptimizedDoubleBuffer |//在缓冲区上绘制,不直接绘制到屏幕上,减少闪烁。
ControlStyles.ResizeRedraw | //控件大小发生变化时,重绘。
ControlStyles.SupportsTransparentBackColor, true);//支持透明背景颜色
}
private void RySearch_GotFocus(object sender, EventArgs e)
@ -191,6 +196,21 @@ namespace ryControls
//}
}
}
/// <summary>
///按钮圆角部分背景颜色
/// </summary>
[Description("按钮圆角部分背景颜色")]
public Color ButtonRoundBackColor
{
get
{
return panel1.BackColor;
}
set
{
panel1.BackColor = value;
}
}
private string _text = "";
/// <summary>
///
@ -225,10 +245,11 @@ namespace ryControls
txtSearch.Location = new Point(3, 1);
txtSearch.Top = (Height - txtSearch.Height) / 2;
//Height = txtSearch.Height+2;
btnSearch.Height = Height;
btnSearch.Width = Height;
btnSearch.Location = new Point(Width - btnSearch.Width, 0);
txtSearch.Width = Width - btnSearch.Width-3;
//btnSearch.Height = Height;
//btnSearch.Width = Height;
//btnSearch.Location = new Point(Width - btnSearch.Width, 0);
panel1.Width = panel1.Height;
txtSearch.Width = Width - panel1.Width-3;
}
private void RySearch_Load(object sender, EventArgs e)
@ -257,7 +278,6 @@ namespace ryControls
else
{ txtSearch.Font = Font; }
}
private void TxtSearch_TextChanged(object sender, EventArgs e)
{
if (isProcUse) { return; }

View File

@ -971,8 +971,11 @@ namespace MGdu.WinFormUI
if (base.WindowState == FormWindowState.Normal)
{
var size = base.Size;
if (!this.DesignMode)
{
size.Width += XTheme.ShadowWidth * 2;
size.Height += XTheme.ShadowWidth * 2;
}
if (_shawdowForm.Size != size)
{
_shawdowForm.Size = size;
@ -988,7 +991,8 @@ namespace MGdu.WinFormUI
if (base.WindowState == FormWindowState.Normal)
{
Point p = base.Location;
p.Offset(-XTheme.ShadowWidth, -XTheme.ShadowWidth);
if (!this.DesignMode)
{ p.Offset(-XTheme.ShadowWidth, -XTheme.ShadowWidth); }
if (_shawdowForm.Location != p)
{
_shawdowForm.Location = p;
@ -1032,6 +1036,7 @@ namespace MGdu.WinFormUI
private void SetFormRegion()
{
if (this.DesignMode) { return; }
if (base.Region != null)
base.Region.Dispose();
@ -1140,6 +1145,7 @@ namespace MGdu.WinFormUI
private void DrawFormBorder(Graphics g)
{
if (this.DesignMode) { return; }
int width = BorderWidth;
Rectangle rect = ClientRectangle;
@ -1195,6 +1201,7 @@ namespace MGdu.WinFormUI
/// </summary>
private void DrawInsetClientRect(Graphics g)
{
if (this.DesignMode) { return; }
int x = BorderWidth;
int y = BorderWidth + CaptionHeight;
int w = ClientSize.Width - BorderWidth * 2;
@ -1347,6 +1354,7 @@ namespace MGdu.WinFormUI
/// <param name="m"></param>
protected override void WndProc(ref Message m)
{
if (this.DesignMode) { base.WndProc(ref m); return; }
bool alreadyHandled = false;
switch (m.Msg)
@ -1409,6 +1417,7 @@ namespace MGdu.WinFormUI
/// </summary>
protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
{
if (this.DesignMode) { base.SetBoundsCore(x, y, width, height, specified); return; }
if (base.WindowState == FormWindowState.Normal)
{
if (this.Size == this.ClientSize)

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.1.2102.2201")]
[assembly: AssemblyFileVersion("2.1.2102.2201")]
[assembly: AssemblyVersion("2.1.2102.2701")]
[assembly: AssemblyFileVersion("2.1.2102.2701")]