From 137258ce4657629fd17a5e9fe28ee005cd2d3940 Mon Sep 17 00:00:00 2001 From: Sunny Date: Thu, 30 May 2024 17:01:09 +0800 Subject: [PATCH] =?UTF-8?q?*=20UIInputForm:=20=E4=BF=AE=E5=A4=8D=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E6=97=B6=E8=87=AA=E5=AE=9A=E4=B9=89=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=B8=8D=E8=B5=B7=E4=BD=9C=E7=94=A8=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SunnyUI/Forms/UIInputForm.Designer.cs | 8 ++++-- SunnyUI/Forms/UIInputForm.cs | 35 +++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/SunnyUI/Forms/UIInputForm.Designer.cs b/SunnyUI/Forms/UIInputForm.Designer.cs index 87215542..e27a3c06 100644 --- a/SunnyUI/Forms/UIInputForm.Designer.cs +++ b/SunnyUI/Forms/UIInputForm.Designer.cs @@ -38,17 +38,18 @@ pnlBtm.Location = new System.Drawing.Point(0, 135); pnlBtm.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom; pnlBtm.Size = new System.Drawing.Size(473, 55); + pnlBtm.Style = UIStyle.Custom; pnlBtm.TabIndex = 2; // // btnCancel // btnCancel.Location = new System.Drawing.Point(343, 4); - btnCancel.Symbol = 361453; + btnCancel.Style = UIStyle.Custom; // // btnOK // btnOK.Location = new System.Drawing.Point(228, 4); - btnOK.Symbol = 361452; + btnOK.Style = UIStyle.Custom; // // label // @@ -59,6 +60,7 @@ label.Location = new System.Drawing.Point(28, 57); label.Name = "label"; label.Size = new System.Drawing.Size(215, 16); + label.Style = UIStyle.Custom; label.TabIndex = 1; label.Text = "请在下方编辑框中输入数值:"; label.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -75,6 +77,7 @@ edit.RadiusSides = UICornerRadiusSides.None; edit.ShowText = false; edit.Size = new System.Drawing.Size(415, 29); + edit.Style = UIStyle.Custom; edit.TabIndex = 0; edit.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; edit.Watermark = ""; @@ -87,6 +90,7 @@ Controls.Add(label); Name = "UIInputForm"; Padding = new System.Windows.Forms.Padding(0, 35, 0, 0); + Style = UIStyle.Custom; Text = "输入"; ZoomScaleRect = new System.Drawing.Rectangle(15, 15, 473, 182); Shown += UIInputForm_Shown; diff --git a/SunnyUI/Forms/UIInputForm.cs b/SunnyUI/Forms/UIInputForm.cs index 8969b881..1309ab39 100644 --- a/SunnyUI/Forms/UIInputForm.cs +++ b/SunnyUI/Forms/UIInputForm.cs @@ -17,6 +17,7 @@ * 创建日期: 2020-01-01 * * 2020-01-01: V2.2.0 增加文件说明 + * 2024-05-30: V3.6.6 修复调用时自定义主题参数不起作用的问题 ******************************************************************************/ namespace Sunny.UI @@ -67,5 +68,39 @@ namespace Sunny.UI { edit.SelectAll(); } + + /// + /// 设置主题样式 + /// + /// 主题样式 + public override void SetStyleColor(UIBaseStyle uiColor) + { + base.SetStyleColor(uiColor); + + if (btnCancel != null) + { + btnCancel.SetStyleColor(uiColor); + } + + if (label != null) + { + label.SetStyleColor(uiColor); + } + + if (btnOK != null) + { + btnOK.SetStyleColor(uiColor); + } + + if (pnlBtm != null) + { + pnlBtm.SetStyleColor(uiColor); + } + + if (edit != null) + { + edit.SetStyleColor(uiColor); + } + } } } \ No newline at end of file