重构主题
This commit is contained in:
parent
6236d38b60
commit
34b8a5277d
@ -1379,10 +1379,7 @@ namespace Sunny.UI
|
|||||||
{
|
{
|
||||||
if (!DesignMode && UIStyles.Style.IsValid())
|
if (!DesignMode && UIStyles.Style.IsValid())
|
||||||
{
|
{
|
||||||
Style = UIStyles.Style;
|
SetInheritedStyle(UIStyles.Style);
|
||||||
this.SuspendLayout();
|
|
||||||
UIStyleHelper.SetChildUIStyle(this, UIStyles.Style);
|
|
||||||
this.ResumeLayout();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
9
SunnyUI/Forms/UIMessageForm.Designer.cs
generated
9
SunnyUI/Forms/UIMessageForm.Designer.cs
generated
@ -43,13 +43,11 @@
|
|||||||
btnCancel.MinimumSize = new System.Drawing.Size(1, 1);
|
btnCancel.MinimumSize = new System.Drawing.Size(1, 1);
|
||||||
btnCancel.Name = "btnCancel";
|
btnCancel.Name = "btnCancel";
|
||||||
btnCancel.Size = new System.Drawing.Size(224, 48);
|
btnCancel.Size = new System.Drawing.Size(224, 48);
|
||||||
|
btnCancel.Style = UIStyle.Custom;
|
||||||
btnCancel.TabIndex = 6;
|
btnCancel.TabIndex = 6;
|
||||||
btnCancel.Text = "取消";
|
btnCancel.Text = "取消";
|
||||||
btnCancel.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
|
||||||
btnCancel.TipsText = null;
|
btnCancel.TipsText = null;
|
||||||
btnCancel.Click += btnCancel_Click;
|
btnCancel.Click += btnCancel_Click;
|
||||||
btnCancel.MouseEnter += btnOK_MouseEnter;
|
|
||||||
btnCancel.MouseLeave += btnOK_MouseLeave;
|
|
||||||
//
|
//
|
||||||
// btnOK
|
// btnOK
|
||||||
//
|
//
|
||||||
@ -61,13 +59,11 @@
|
|||||||
btnOK.MinimumSize = new System.Drawing.Size(1, 1);
|
btnOK.MinimumSize = new System.Drawing.Size(1, 1);
|
||||||
btnOK.Name = "btnOK";
|
btnOK.Name = "btnOK";
|
||||||
btnOK.Size = new System.Drawing.Size(223, 48);
|
btnOK.Size = new System.Drawing.Size(223, 48);
|
||||||
|
btnOK.Style = UIStyle.Custom;
|
||||||
btnOK.TabIndex = 5;
|
btnOK.TabIndex = 5;
|
||||||
btnOK.Text = "确定";
|
btnOK.Text = "确定";
|
||||||
btnOK.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
|
||||||
btnOK.TipsText = null;
|
btnOK.TipsText = null;
|
||||||
btnOK.Click += btnOK_Click;
|
btnOK.Click += btnOK_Click;
|
||||||
btnOK.MouseEnter += btnOK_MouseEnter;
|
|
||||||
btnOK.MouseLeave += btnOK_MouseLeave;
|
|
||||||
//
|
//
|
||||||
// lbMsg
|
// lbMsg
|
||||||
//
|
//
|
||||||
@ -84,6 +80,7 @@
|
|||||||
lbMsg.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
|
lbMsg.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
|
||||||
lbMsg.ShowText = false;
|
lbMsg.ShowText = false;
|
||||||
lbMsg.Size = new System.Drawing.Size(422, 158);
|
lbMsg.Size = new System.Drawing.Size(422, 158);
|
||||||
|
lbMsg.Style = UIStyle.Custom;
|
||||||
lbMsg.TabIndex = 7;
|
lbMsg.TabIndex = 7;
|
||||||
lbMsg.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
lbMsg.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
//
|
//
|
||||||
|
@ -130,6 +130,7 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
if (btnCancel != null)
|
if (btnCancel != null)
|
||||||
{
|
{
|
||||||
|
btnCancel.SetStyleColor(uiColor);
|
||||||
btnCancel.FillColor = BackColor;
|
btnCancel.FillColor = BackColor;
|
||||||
btnCancel.RectColor = Color.FromArgb(36, uiColor.ButtonRectColor);
|
btnCancel.RectColor = Color.FromArgb(36, uiColor.ButtonRectColor);
|
||||||
btnCancel.ForeColor = uiColor.LabelForeColor;
|
btnCancel.ForeColor = uiColor.LabelForeColor;
|
||||||
@ -137,6 +138,7 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
if (btnOK != null)
|
if (btnOK != null)
|
||||||
{
|
{
|
||||||
|
btnOK.SetStyleColor(uiColor);
|
||||||
btnOK.FillColor = BackColor;
|
btnOK.FillColor = BackColor;
|
||||||
btnOK.RectColor = Color.FromArgb(36, uiColor.ButtonRectColor);
|
btnOK.RectColor = Color.FromArgb(36, uiColor.ButtonRectColor);
|
||||||
btnOK.ForeColor = uiColor.LabelForeColor;
|
btnOK.ForeColor = uiColor.LabelForeColor;
|
||||||
@ -144,6 +146,7 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
if (lbMsg != null)
|
if (lbMsg != null)
|
||||||
{
|
{
|
||||||
|
lbMsg.SetStyleColor(uiColor);
|
||||||
lbMsg.ForeColor = uiColor.LabelForeColor;
|
lbMsg.ForeColor = uiColor.LabelForeColor;
|
||||||
lbMsg.BackColor = uiColor.PlainColor;
|
lbMsg.BackColor = uiColor.PlainColor;
|
||||||
lbMsg.FillColor = uiColor.PlainColor;
|
lbMsg.FillColor = uiColor.PlainColor;
|
||||||
@ -154,16 +157,6 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
public UIMessageDialogButtons DefaultButton { get; set; } = UIMessageDialogButtons.Ok;
|
public UIMessageDialogButtons DefaultButton { get; set; } = UIMessageDialogButtons.Ok;
|
||||||
|
|
||||||
private void btnOK_MouseEnter(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
//((UIButton)sender).RadiusSides = UICornerRadiusSides.All;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void btnOK_MouseLeave(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
//((UIButton)sender).RadiusSides = UICornerRadiusSides.None;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示消息提示窗体
|
/// 显示消息提示窗体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, 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="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="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -292,10 +292,7 @@ namespace Sunny.UI
|
|||||||
{
|
{
|
||||||
if (!DesignMode && UIStyles.Style.IsValid())
|
if (!DesignMode && UIStyles.Style.IsValid())
|
||||||
{
|
{
|
||||||
Style = UIStyles.Style;
|
SetInheritedStyle(UIStyles.Style);
|
||||||
this.SuspendLayout();
|
|
||||||
UIStyleHelper.SetChildUIStyle(this, UIStyles.Style);
|
|
||||||
this.ResumeLayout();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user