diff --git a/SunnyUI/Charts/UIChart.cs b/SunnyUI/Charts/UIChart.cs
index 1e951115..6a943672 100644
--- a/SunnyUI/Charts/UIChart.cs
+++ b/SunnyUI/Charts/UIChart.cs
@@ -139,6 +139,11 @@ namespace Sunny.UI
set => SetFillColor(value);
}
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
g.FillPath(fillColor, path);
@@ -236,6 +241,10 @@ namespace Sunny.UI
protected UIChartStyle ChartStyle => UIChartStyles.GetChartStyle(ChartStyleType);
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Charts/UILineChartOption.cs b/SunnyUI/Charts/UILineChartOption.cs
index 49269cdb..a51bdd49 100644
--- a/SunnyUI/Charts/UILineChartOption.cs
+++ b/SunnyUI/Charts/UILineChartOption.cs
@@ -288,10 +288,17 @@ namespace Sunny.UI
public Color Color { get; set; }
public UILinePointSymbol Symbol { get; set; } = UILinePointSymbol.None;
+
+ ///
+ /// 字体图标大小
+ ///
public int SymbolSize { get; set; } = 4;
public int SymbolLineWidth { get; set; } = 1;
+ ///
+ /// 字体图标颜色
+ ///
public Color SymbolColor { get; set; } = Color.Empty;
public bool CustomColor { get; set; }
diff --git a/SunnyUI/Controls/Color/UIColorWheel.cs b/SunnyUI/Controls/Color/UIColorWheel.cs
index 6db77be8..24eb7f15 100644
--- a/SunnyUI/Controls/Color/UIColorWheel.cs
+++ b/SunnyUI/Controls/Color/UIColorWheel.cs
@@ -35,12 +35,22 @@ namespace Sunny.UI
}
}
+ ///
+ /// ֹؼ洰
+ ///
[DefaultValue(false), Category("SunnyUI"), Description("ֹؼ洰")]
public bool ZoomScaleDisabled { get; set; }
+ ///
+ /// ؼǰλ
+ ///
[Browsable(false)]
public Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// ÿؼű
+ ///
+ /// ű
public void SetZoomScale(float scale)
{
diff --git a/SunnyUI/Controls/Color/UILabelRotate.cs b/SunnyUI/Controls/Color/UILabelRotate.cs
index 223a19a3..b6e49e53 100644
--- a/SunnyUI/Controls/Color/UILabelRotate.cs
+++ b/SunnyUI/Controls/Color/UILabelRotate.cs
@@ -13,12 +13,22 @@ namespace Sunny.UI
private ContentAlignment m_rotatePointAlignment = ContentAlignment.MiddleCenter;
private ContentAlignment m_textAlignment = ContentAlignment.MiddleLeft;
+ ///
+ /// ֹؼ洰
+ ///
[DefaultValue(false), Category("SunnyUI"), Description("ֹؼ洰")]
public bool ZoomScaleDisabled { get; set; }
+ ///
+ /// ؼǰλ
+ ///
[Browsable(false)]
public Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// ÿؼű
+ ///
+ /// ű
public virtual void SetZoomScale(float scale)
{
diff --git a/SunnyUI/Controls/DropItem/UIColorItem.cs b/SunnyUI/Controls/DropItem/UIColorItem.cs
index e5380e6e..285df230 100644
--- a/SunnyUI/Controls/DropItem/UIColorItem.cs
+++ b/SunnyUI/Controls/DropItem/UIColorItem.cs
@@ -605,6 +605,10 @@ namespace Sunny.UI
e.Graphics.FillRectangle(c, r);
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/DropItem/UIComboDataGridViewItem.cs b/SunnyUI/Controls/DropItem/UIComboDataGridViewItem.cs
index 17fe8e62..cb90b174 100644
--- a/SunnyUI/Controls/DropItem/UIComboDataGridViewItem.cs
+++ b/SunnyUI/Controls/DropItem/UIComboDataGridViewItem.cs
@@ -276,6 +276,10 @@ namespace Sunny.UI
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/DropItem/UIDateItem.cs b/SunnyUI/Controls/DropItem/UIDateItem.cs
index 9534f80f..f80c15a8 100644
--- a/SunnyUI/Controls/DropItem/UIDateItem.cs
+++ b/SunnyUI/Controls/DropItem/UIDateItem.cs
@@ -548,6 +548,10 @@ namespace Sunny.UI
}
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/DropItem/UIDateTimeItem.cs b/SunnyUI/Controls/DropItem/UIDateTimeItem.cs
index ca27417f..1b4ff8b5 100644
--- a/SunnyUI/Controls/DropItem/UIDateTimeItem.cs
+++ b/SunnyUI/Controls/DropItem/UIDateTimeItem.cs
@@ -958,6 +958,10 @@ namespace Sunny.UI
}
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/DropItem/UIDropControl.cs b/SunnyUI/Controls/DropItem/UIDropControl.cs
index 69514cce..29bddc0b 100644
--- a/SunnyUI/Controls/DropItem/UIDropControl.cs
+++ b/SunnyUI/Controls/DropItem/UIDropControl.cs
@@ -304,6 +304,11 @@ namespace Sunny.UI
edit.Width = Width - Padding.Left - Padding.Right;
}
+ ///
+ /// 绘制前景颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFore(Graphics g, GraphicsPath path)
{
SizeChange();
@@ -388,6 +393,10 @@ namespace Sunny.UI
set => edit.SelectionStart = value;
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/DropItem/UITimeItem.cs b/SunnyUI/Controls/DropItem/UITimeItem.cs
index 76c272dd..b2b368b0 100644
--- a/SunnyUI/Controls/DropItem/UITimeItem.cs
+++ b/SunnyUI/Controls/DropItem/UITimeItem.cs
@@ -595,6 +595,10 @@ namespace Sunny.UI
Close();
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UIAvatar.cs b/SunnyUI/Controls/UIAvatar.cs
index 6199e814..d9d386ab 100644
--- a/SunnyUI/Controls/UIAvatar.cs
+++ b/SunnyUI/Controls/UIAvatar.cs
@@ -75,6 +75,9 @@ namespace Sunny.UI
private int avatarSize = 60;
private int baseAvatorSize = 60;
+ ///
+ /// 头像大小
+ ///
[DefaultValue(60), Description("头像大小"), Category("SunnyUI")]
public int AvatarSize
{
@@ -182,9 +185,9 @@ namespace Sunny.UI
private int baseSymbolSize = 45;
///
- /// 图标大小
+ /// 字体图标大小
///
- [DefaultValue(45), Description("图标大小"), Category("SunnyUI")]
+ [DefaultValue(45), Description("字体图标大小"), Category("SunnyUI")]
public int SymbolSize
{
get => symbolSize;
@@ -203,11 +206,11 @@ namespace Sunny.UI
private int symbol = 61447;
///
- /// 图标字符
+ /// 字体图标
///
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[Editor("Sunny.UI.UIImagePropertyEditor, " + AssemblyRefEx.SystemDesign, typeof(UITypeEditor))]
- [DefaultValue(61447), Description("图标"), Category("SunnyUI")]
+ [DefaultValue(61447), Description("字体图标"), Category("SunnyUI")]
public int Symbol
{
get => symbol;
@@ -223,6 +226,9 @@ namespace Sunny.UI
private Point symbolOffset = new Point(0, 0);
+ ///
+ /// 字体图标的偏移位置
+ ///
[DefaultValue(typeof(Point), "0, 0")]
[Description("字体图标的偏移位置"), Category("SunnyUI")]
public Point SymbolOffset
@@ -237,6 +243,9 @@ namespace Sunny.UI
private Point textOffset = new Point(0, 0);
+ ///
+ /// 文字的偏移位置
+ ///
[DefaultValue(typeof(Point), "0, 0")]
[Description("文字的偏移位置"), Category("SunnyUI")]
public Point TextOffset
@@ -251,8 +260,11 @@ namespace Sunny.UI
private Point imageOffset = new Point(0, 0);
+ ///
+ /// 图片的偏移位置
+ ///
[DefaultValue(typeof(Point), "0, 0")]
- [Description("文字的偏移位置"), Category("SunnyUI")]
+ [Description("图片的偏移位置"), Category("SunnyUI")]
public Point ImageOffset
{
get => imageOffset;
@@ -264,10 +276,10 @@ namespace Sunny.UI
}
///
- /// OnPaintFill
+ /// 绘制填充颜色
///
- /// g
- /// path
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
Rectangle rect = new Rectangle((Width - avatarSize) / 2, (Height - avatarSize) / 2, avatarSize, avatarSize);
@@ -284,12 +296,21 @@ namespace Sunny.UI
}
}
+ ///
+ /// 水平偏移
+ ///
[Browsable(false), DefaultValue(0), Description("水平偏移"), Category("SunnyUI")]
public int OffsetX { get; set; } = 0;
+ ///
+ /// 垂直偏移
+ ///
[Browsable(false), DefaultValue(0), Description("垂直偏移"), Category("SunnyUI")]
public int OffsetY { get; set; } = 0;
+ ///
+ /// 继续绘制
+ ///
public event PaintEventHandler PaintAgain;
///
@@ -356,6 +377,10 @@ namespace Sunny.UI
PaintAgain?.Invoke(this, e);
}
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
public override void SetZoomScale(float scale)
{
base.SetZoomScale(scale);
diff --git a/SunnyUI/Controls/UIBattery.cs b/SunnyUI/Controls/UIBattery.cs
index 10aacca1..e5caa103 100644
--- a/SunnyUI/Controls/UIBattery.cs
+++ b/SunnyUI/Controls/UIBattery.cs
@@ -28,6 +28,9 @@ using System.Drawing.Drawing2D;
namespace Sunny.UI
{
+ ///
+ /// 电池电量图标
+ ///
[DefaultProperty("Power")]
[ToolboxItem(true)]
public sealed class UIBattery : UIControl
@@ -44,6 +47,9 @@ namespace Sunny.UI
private int symbolSize = 36;
+ ///
+ /// 构造函数
+ ///
public UIBattery()
{
SetStyleFlags(true, false);
@@ -64,7 +70,10 @@ namespace Sunny.UI
}
}
- [DefaultValue(36), Description("图标大小"), Category("SunnyUI")]
+ ///
+ /// 字体图标大小
+ ///
+ [DefaultValue(36), Description("字体图标大小"), Category("SunnyUI")]
public int SymbolSize
{
get => symbolSize;
@@ -144,17 +153,31 @@ namespace Sunny.UI
set => SetFillColor(value);
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
fillColor = uiColor.BatteryFillColor;
}
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
g.FillPath(fillColor, path);
}
+ ///
+ /// 绘制前景颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFore(Graphics g, GraphicsPath path)
{
var fa_battery_empty = 0xf244;
diff --git a/SunnyUI/Controls/UIBreadcrumb.cs b/SunnyUI/Controls/UIBreadcrumb.cs
index cd690d5e..bb5361e1 100644
--- a/SunnyUI/Controls/UIBreadcrumb.cs
+++ b/SunnyUI/Controls/UIBreadcrumb.cs
@@ -115,6 +115,11 @@ namespace Sunny.UI
}
}
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
float width = 0;
@@ -299,6 +304,10 @@ namespace Sunny.UI
set => SetForeColor(value);
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UIButton.cs b/SunnyUI/Controls/UIButton.cs
index c98701df..2a8bb948 100644
--- a/SunnyUI/Controls/UIButton.cs
+++ b/SunnyUI/Controls/UIButton.cs
@@ -184,6 +184,11 @@ namespace Sunny.UI
}
}
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
if (FillColorGradient)
@@ -309,6 +314,10 @@ namespace Sunny.UI
}
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UICheckBox.cs b/SunnyUI/Controls/UICheckBox.cs
index 338b6e80..df4fffbb 100644
--- a/SunnyUI/Controls/UICheckBox.cs
+++ b/SunnyUI/Controls/UICheckBox.cs
@@ -144,6 +144,11 @@ namespace Sunny.UI
public event EventHandler CheckedChanged;
+ ///
+ /// 绘制前景颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFore(Graphics g, GraphicsPath path)
{
//设置按钮标题位置
@@ -156,6 +161,11 @@ namespace Sunny.UI
g.DrawString(Text, Font, color, Size, Padding, ContentAlignment.MiddleLeft);
}
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
//图标
@@ -201,6 +211,10 @@ namespace Sunny.UI
base.OnClick(e);
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UIColorPicker.cs b/SunnyUI/Controls/UIColorPicker.cs
index 2b25761d..33eaff23 100644
--- a/SunnyUI/Controls/UIColorPicker.cs
+++ b/SunnyUI/Controls/UIColorPicker.cs
@@ -111,6 +111,11 @@ namespace Sunny.UI
}
}
+ ///
+ /// 绘制前景颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFore(Graphics g, System.Drawing.Drawing2D.GraphicsPath path)
{
base.OnPaintFore(g, path);
diff --git a/SunnyUI/Controls/UIComboBox.cs b/SunnyUI/Controls/UIComboBox.cs
index c14883ce..702c18fe 100644
--- a/SunnyUI/Controls/UIComboBox.cs
+++ b/SunnyUI/Controls/UIComboBox.cs
@@ -555,6 +555,10 @@ namespace Sunny.UI
}
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UIContextMenuStrip.cs b/SunnyUI/Controls/UIContextMenuStrip.cs
index 99fc5bda..0155c84c 100644
--- a/SunnyUI/Controls/UIContextMenuStrip.cs
+++ b/SunnyUI/Controls/UIContextMenuStrip.cs
@@ -42,12 +42,22 @@ namespace Sunny.UI
BackColor = UIStyles.Blue.ContextMenuColor;
}
+ ///
+ /// 禁止控件跟随窗体缩放
+ ///
[DefaultValue(false), Category("SunnyUI"), Description("禁止控件跟随窗体缩放")]
public bool ZoomScaleDisabled { get; set; }
+ ///
+ /// 控件缩放前在其容器里的位置
+ ///
[Browsable(false)]
public Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
public void SetZoomScale(float scale)
{
diff --git a/SunnyUI/Controls/UIControl.cs b/SunnyUI/Controls/UIControl.cs
index d4aa81f2..2f67a820 100644
--- a/SunnyUI/Controls/UIControl.cs
+++ b/SunnyUI/Controls/UIControl.cs
@@ -49,12 +49,22 @@ namespace Sunny.UI
base.MinimumSize = new Size(1, 1);
}
+ ///
+ /// 禁止控件跟随窗体缩放
+ ///
[DefaultValue(false), Category("SunnyUI"), Description("禁止控件跟随窗体缩放")]
public bool ZoomScaleDisabled { get; set; }
+ ///
+ /// 控件缩放前在其容器里的位置
+ ///
[Browsable(false)]
public Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
public virtual void SetZoomScale(float scale)
{
radius = UIZoomScale.Calc(baseRadius, scale);
@@ -564,10 +574,10 @@ namespace Sunny.UI
}
///
- /// 绘制边框
+ /// 绘制边框颜色
///
- /// GDI绘图图面
- /// 路径
+ /// 绘图图面
+ /// 绘图路径
protected virtual void OnPaintRect(Graphics g, GraphicsPath path)
{
radius = Math.Min(radius, Math.Min(Width, Height));
diff --git a/SunnyUI/Controls/UIDataGridView.cs b/SunnyUI/Controls/UIDataGridView.cs
index 26dddc3c..289863dc 100644
--- a/SunnyUI/Controls/UIDataGridView.cs
+++ b/SunnyUI/Controls/UIDataGridView.cs
@@ -111,12 +111,22 @@ namespace Sunny.UI
HorizontalScrollBar.VisibleChanged += HorizontalScrollBar_VisibleChanged;
}
+ ///
+ /// 禁止控件跟随窗体缩放
+ ///
[DefaultValue(false), Category("SunnyUI"), Description("禁止控件跟随窗体缩放")]
public bool ZoomScaleDisabled { get; set; }
+ ///
+ /// 控件缩放前在其容器里的位置
+ ///
[Browsable(false)]
public Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
public virtual void SetZoomScale(float scale)
{
diff --git a/SunnyUI/Controls/UIDataGridViewFooter.cs b/SunnyUI/Controls/UIDataGridViewFooter.cs
index de22822b..a2982019 100644
--- a/SunnyUI/Controls/UIDataGridViewFooter.cs
+++ b/SunnyUI/Controls/UIDataGridViewFooter.cs
@@ -92,6 +92,11 @@ namespace Sunny.UI
Invalidate();
}
+ ///
+ /// 绘制前景颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFore(Graphics g, GraphicsPath path)
{
if (dgv != null && dgv.ColumnCount > 0 && dgv.RowCount > 0)
@@ -163,6 +168,10 @@ namespace Sunny.UI
}
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UIFlowLayoutPanel.cs b/SunnyUI/Controls/UIFlowLayoutPanel.cs
index b23157e0..7432b478 100644
--- a/SunnyUI/Controls/UIFlowLayoutPanel.cs
+++ b/SunnyUI/Controls/UIFlowLayoutPanel.cs
@@ -247,10 +247,19 @@ namespace Sunny.UI
[Browsable(false)]
public FlowLayoutPanel FlowLayoutPanel => flowLayoutPanel;
+ ///
+ /// 绘制前景颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFore(Graphics g, GraphicsPath path)
{
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UIGroupBox.cs b/SunnyUI/Controls/UIGroupBox.cs
index 9abce01a..e10fb282 100644
--- a/SunnyUI/Controls/UIGroupBox.cs
+++ b/SunnyUI/Controls/UIGroupBox.cs
@@ -38,17 +38,32 @@ namespace Sunny.UI
SetStyleFlags(true, false);
}
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
g.Clear(FillColor);
}
+ ///
+ /// 绘制边框颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintRect(Graphics g, GraphicsPath path)
{
path = new Rectangle(0, TitleTop, Width - 1, Height - _titleTop - 1).CreateRoundedRectanglePath(Radius, RadiusSides);
base.OnPaintRect(g, path);
}
+ ///
+ /// 绘制前景颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFore(Graphics g, GraphicsPath path)
{
SizeF sf = g.MeasureString(Text, Font);
diff --git a/SunnyUI/Controls/UIHeaderButton.cs b/SunnyUI/Controls/UIHeaderButton.cs
index f0f41ca9..e7202ed8 100644
--- a/SunnyUI/Controls/UIHeaderButton.cs
+++ b/SunnyUI/Controls/UIHeaderButton.cs
@@ -67,6 +67,10 @@ namespace Sunny.UI
rectDisableColor = UIStyles.Blue.RectDisableColor;
}
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
public override void SetZoomScale(float scale)
{
base.SetZoomScale(scale);
@@ -198,6 +202,9 @@ namespace Sunny.UI
private int _symbolSize = 48;
+ ///
+ /// 字体图标大小
+ ///
[DefaultValue(48)]
[Description("字体图标大小"), Category("SunnyUI")]
public int SymbolSize
@@ -217,6 +224,9 @@ namespace Sunny.UI
private Color symbolColor = Color.White;
+ ///
+ /// 字体图标颜色
+ ///
[DefaultValue(typeof(Color), "White")]
[Description("字体图标颜色"), Category("SunnyUI")]
public Color SymbolColor
@@ -229,6 +239,10 @@ namespace Sunny.UI
}
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
@@ -360,6 +374,9 @@ namespace Sunny.UI
private int _symbol = FontAwesomeIcons.fa_check;
+ ///
+ /// 字体图标
+ ///
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[Editor("Sunny.UI.UIImagePropertyEditor, " + AssemblyRefEx.SystemDesign, typeof(UITypeEditor))]
[DefaultValue(61452)]
@@ -390,6 +407,9 @@ namespace Sunny.UI
private Point symbolOffset = new Point(0, 0);
+ ///
+ /// 字体图标的偏移位置
+ ///
[DefaultValue(typeof(Point), "0, 0")]
[Description("字体图标的偏移位置"), Category("SunnyUI")]
public Point SymbolOffset
@@ -455,6 +475,11 @@ namespace Sunny.UI
}
}
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
if (!selected)
diff --git a/SunnyUI/Controls/UIHorScrollBar.cs b/SunnyUI/Controls/UIHorScrollBar.cs
index 68a2f59c..90411580 100644
--- a/SunnyUI/Controls/UIHorScrollBar.cs
+++ b/SunnyUI/Controls/UIHorScrollBar.cs
@@ -426,6 +426,10 @@ namespace Sunny.UI
return -1;
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UIHorScrollBarEx.cs b/SunnyUI/Controls/UIHorScrollBarEx.cs
index 288e4e1b..068124ff 100644
--- a/SunnyUI/Controls/UIHorScrollBarEx.cs
+++ b/SunnyUI/Controls/UIHorScrollBarEx.cs
@@ -89,6 +89,11 @@ namespace Sunny.UI
public int RightButtonPos => Width - 16;
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
base.OnPaintFill(g, path);
@@ -228,6 +233,10 @@ namespace Sunny.UI
}
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UIIPTextBox.cs b/SunnyUI/Controls/UIIPTextBox.cs
index 83df3768..f338cfa3 100644
--- a/SunnyUI/Controls/UIIPTextBox.cs
+++ b/SunnyUI/Controls/UIIPTextBox.cs
@@ -229,6 +229,10 @@ namespace Sunny.UI
}
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UIImageButton.cs b/SunnyUI/Controls/UIImageButton.cs
index 91ac03e8..e1c105f8 100644
--- a/SunnyUI/Controls/UIImageButton.cs
+++ b/SunnyUI/Controls/UIImageButton.cs
@@ -44,12 +44,22 @@ namespace Sunny.UI
private ContentAlignment textAlign = ContentAlignment.MiddleCenter;
private Color foreColor = UIFontColor.Primary;
+ ///
+ /// 禁止控件跟随窗体缩放
+ ///
[DefaultValue(false), Category("SunnyUI"), Description("禁止控件跟随窗体缩放")]
public bool ZoomScaleDisabled { get; set; }
+ ///
+ /// 控件缩放前在其容器里的位置
+ ///
[Browsable(false)]
public Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
public void SetZoomScale(float scale)
{
diff --git a/SunnyUI/Controls/UIImageListBox.cs b/SunnyUI/Controls/UIImageListBox.cs
index e85bf624..ae908438 100644
--- a/SunnyUI/Controls/UIImageListBox.cs
+++ b/SunnyUI/Controls/UIImageListBox.cs
@@ -195,6 +195,10 @@ namespace Sunny.UI
set => listbox.ShowDescription = value;
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UILabel.cs b/SunnyUI/Controls/UILabel.cs
index f0897d18..392c1d9a 100644
--- a/SunnyUI/Controls/UILabel.cs
+++ b/SunnyUI/Controls/UILabel.cs
@@ -42,12 +42,22 @@ namespace Sunny.UI
foreColor = UIStyles.Blue.LabelForeColor;
}
+ ///
+ /// 禁止控件跟随窗体缩放
+ ///
[DefaultValue(false), Category("SunnyUI"), Description("禁止控件跟随窗体缩放")]
public bool ZoomScaleDisabled { get; set; }
+ ///
+ /// 控件缩放前在其容器里的位置
+ ///
[Browsable(false)]
public Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
public virtual void SetZoomScale(float scale)
{
@@ -178,12 +188,22 @@ namespace Sunny.UI
base.LinkColor = linkColor = UIColor.Blue;
}
+ ///
+ /// 禁止控件跟随窗体缩放
+ ///
[DefaultValue(false), Category("SunnyUI"), Description("禁止控件跟随窗体缩放")]
public bool ZoomScaleDisabled { get; set; }
+ ///
+ /// 控件缩放前在其容器里的位置
+ ///
[Browsable(false)]
public Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
public void SetZoomScale(float scale)
{
diff --git a/SunnyUI/Controls/UILedBulb.cs b/SunnyUI/Controls/UILedBulb.cs
index 377681c3..f880adbe 100644
--- a/SunnyUI/Controls/UILedBulb.cs
+++ b/SunnyUI/Controls/UILedBulb.cs
@@ -44,12 +44,22 @@ namespace Sunny.UI
private readonly Color[] _surroundColor = new Color[] { Color.FromArgb(0, 255, 255, 255) };
private readonly Timer timer;
+ ///
+ /// 禁止控件跟随窗体缩放
+ ///
[DefaultValue(false), Category("SunnyUI"), Description("禁止控件跟随窗体缩放")]
public bool ZoomScaleDisabled { get; set; }
+ ///
+ /// 控件缩放前在其容器里的位置
+ ///
[Browsable(false)]
public Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
public void SetZoomScale(float scale)
{
diff --git a/SunnyUI/Controls/UILedLabel.cs b/SunnyUI/Controls/UILedLabel.cs
index 56d5d27e..cc6492ac 100644
--- a/SunnyUI/Controls/UILedLabel.cs
+++ b/SunnyUI/Controls/UILedLabel.cs
@@ -177,6 +177,10 @@ namespace Sunny.UI
set => SetForeColor(value);
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UILight.cs b/SunnyUI/Controls/UILight.cs
index 319ae2cd..897ba597 100644
--- a/SunnyUI/Controls/UILight.cs
+++ b/SunnyUI/Controls/UILight.cs
@@ -76,12 +76,17 @@ namespace Sunny.UI
///
[Description("是否显示文字"), Category("SunnyUI")]
[DefaultValue(false)]
- public new bool ShowText
+ public new bool ShowText
{
get => base.ShowText;
set => base.ShowText = value;
}
+ ///
+ /// 绘制前景颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFore(Graphics g, GraphicsPath path)
{
SizeF sf = g.MeasureString(Text, Font);
@@ -145,6 +150,11 @@ namespace Sunny.UI
Invalidate();
}
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
int ShowSize = Math.Min(Width, Height);
diff --git a/SunnyUI/Controls/UILine.cs b/SunnyUI/Controls/UILine.cs
index 0b3fd89f..c9b21834 100644
--- a/SunnyUI/Controls/UILine.cs
+++ b/SunnyUI/Controls/UILine.cs
@@ -82,6 +82,10 @@ namespace Sunny.UI
}
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
@@ -155,11 +159,21 @@ namespace Sunny.UI
}
}
+ ///
+ /// 绘制边框颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintRect(Graphics g, GraphicsPath path)
{
//
}
+ ///
+ /// 绘制前景颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFore(Graphics g, GraphicsPath path)
{
SizeF sf = new SizeF(0, 0);
diff --git a/SunnyUI/Controls/UIListBox.cs b/SunnyUI/Controls/UIListBox.cs
index 77e97b6b..11d21c44 100644
--- a/SunnyUI/Controls/UIListBox.cs
+++ b/SunnyUI/Controls/UIListBox.cs
@@ -429,6 +429,10 @@ namespace Sunny.UI
set => listbox.ItemHeight = value;
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UILogo.cs b/SunnyUI/Controls/UILogo.cs
index d2f6074b..a916a106 100644
--- a/SunnyUI/Controls/UILogo.cs
+++ b/SunnyUI/Controls/UILogo.cs
@@ -119,6 +119,10 @@ namespace Sunny.UI
this.SaveToImage(fileName, ImageFormat.Png);
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UIMarkLabel.cs b/SunnyUI/Controls/UIMarkLabel.cs
index 6e608d0c..ccad95ec 100644
--- a/SunnyUI/Controls/UIMarkLabel.cs
+++ b/SunnyUI/Controls/UIMarkLabel.cs
@@ -108,6 +108,10 @@ namespace Sunny.UI
}
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UINavBar.cs b/SunnyUI/Controls/UINavBar.cs
index 47daf3db..0529de65 100644
--- a/SunnyUI/Controls/UINavBar.cs
+++ b/SunnyUI/Controls/UINavBar.cs
@@ -65,12 +65,22 @@ namespace Sunny.UI
selectedHighColor = UIStyles.Blue.NavBarMenuSelectedColor;
}
+ ///
+ /// 禁止控件跟随窗体缩放
+ ///
[DefaultValue(false), Category("SunnyUI"), Description("禁止控件跟随窗体缩放")]
public bool ZoomScaleDisabled { get; set; }
+ ///
+ /// 控件缩放前在其容器里的位置
+ ///
[Browsable(false)]
public Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
public void SetZoomScale(float scale)
{
_nodeInterval = UIZoomScale.Calc(baseNodeInterval, scale);
diff --git a/SunnyUI/Controls/UINavMenu.cs b/SunnyUI/Controls/UINavMenu.cs
index 06f1bb2d..74c438cd 100644
--- a/SunnyUI/Controls/UINavMenu.cs
+++ b/SunnyUI/Controls/UINavMenu.cs
@@ -90,12 +90,22 @@ namespace Sunny.UI
selectedHighColor = UIStyles.Blue.NavMenuMenuSelectedColor;
}
+ ///
+ /// 禁止控件跟随窗体缩放
+ ///
[DefaultValue(false), Category("SunnyUI"), Description("禁止控件跟随窗体缩放")]
public bool ZoomScaleDisabled { get; set; }
+ ///
+ /// 控件缩放前在其容器里的位置
+ ///
[Browsable(false)]
public Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
public void SetZoomScale(float scale)
{
diff --git a/SunnyUI/Controls/UINavMenuHelper.cs b/SunnyUI/Controls/UINavMenuHelper.cs
index 2fc496ea..a6ca1414 100644
--- a/SunnyUI/Controls/UINavMenuHelper.cs
+++ b/SunnyUI/Controls/UINavMenuHelper.cs
@@ -503,10 +503,19 @@ namespace Sunny.UI
public int SelectedImageIndex { get; set; } = -1;
+ ///
+ /// 字体图标
+ ///
public int Symbol { get; set; }
+ ///
+ /// 字体图标大小
+ ///
public int SymbolSize { get; set; } = 24;
+ ///
+ /// 字体图标的偏移位置
+ ///
public Point SymbolOffset { get; set; } = new Point(0, 0);
public int PageIndex { get; set; }
diff --git a/SunnyUI/Controls/UIPagination.cs b/SunnyUI/Controls/UIPagination.cs
index 826642f5..27a660e7 100644
--- a/SunnyUI/Controls/UIPagination.cs
+++ b/SunnyUI/Controls/UIPagination.cs
@@ -906,6 +906,10 @@ namespace Sunny.UI
}
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UIPipe.cs b/SunnyUI/Controls/UIPipe.cs
index 61fefdbf..40907c67 100644
--- a/SunnyUI/Controls/UIPipe.cs
+++ b/SunnyUI/Controls/UIPipe.cs
@@ -174,6 +174,11 @@ namespace Sunny.UI
Color[] colors;
+ ///
+ /// 绘制边框颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintRect(Graphics g, GraphicsPath path)
{
base.OnPaintRect(g, path);
@@ -224,6 +229,11 @@ namespace Sunny.UI
PaintLinkedRect(g);
}
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
base.OnPaintFill(g, path);
diff --git a/SunnyUI/Controls/UIProcessBar.cs b/SunnyUI/Controls/UIProcessBar.cs
index fb16025e..1392b020 100644
--- a/SunnyUI/Controls/UIProcessBar.cs
+++ b/SunnyUI/Controls/UIProcessBar.cs
@@ -228,6 +228,10 @@ namespace Sunny.UI
set => decimalCount = Math.Max(value, 0);
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UIProgressIndicator.cs b/SunnyUI/Controls/UIProgressIndicator.cs
index 50c0617b..6c27668e 100644
--- a/SunnyUI/Controls/UIProgressIndicator.cs
+++ b/SunnyUI/Controls/UIProgressIndicator.cs
@@ -67,6 +67,10 @@ namespace Sunny.UI
timer.Stop();
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
@@ -78,6 +82,11 @@ namespace Sunny.UI
private Image image;
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
int circleSize = Math.Min(Width, Height).Div(6);
diff --git a/SunnyUI/Controls/UIRadioButton.cs b/SunnyUI/Controls/UIRadioButton.cs
index 9c1f518f..0bfc6db9 100644
--- a/SunnyUI/Controls/UIRadioButton.cs
+++ b/SunnyUI/Controls/UIRadioButton.cs
@@ -160,6 +160,11 @@ namespace Sunny.UI
}
}
+ ///
+ /// 绘制前景颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFore(Graphics g, GraphicsPath path)
{
//设置按钮标题位置
@@ -172,6 +177,11 @@ namespace Sunny.UI
g.DrawString(Text, Font, color, Size, Padding, ContentAlignment.MiddleLeft);
}
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
//图标
@@ -221,6 +231,10 @@ namespace Sunny.UI
base.OnClick(e);
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UIRichTextBox.cs b/SunnyUI/Controls/UIRichTextBox.cs
index 52409b61..e8d79cba 100644
--- a/SunnyUI/Controls/UIRichTextBox.cs
+++ b/SunnyUI/Controls/UIRichTextBox.cs
@@ -261,6 +261,10 @@ namespace Sunny.UI
ActiveControl = edit;
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UIRoundProcess.cs b/SunnyUI/Controls/UIRoundProcess.cs
index d5d77907..5f93e9b1 100644
--- a/SunnyUI/Controls/UIRoundProcess.cs
+++ b/SunnyUI/Controls/UIRoundProcess.cs
@@ -169,6 +169,11 @@ namespace Sunny.UI
public event OnValueChanged ValueChanged;
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
int iin = Math.Min(inner, outer);
@@ -185,6 +190,10 @@ namespace Sunny.UI
g.FillFan(ProcessColor, ClientRectangle.Center(), Inner, Outer, -90, Value * 1.0f / Maximum * 360.0f);
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UIScrollBar.cs b/SunnyUI/Controls/UIScrollBar.cs
index b652f4db..85efc01d 100644
--- a/SunnyUI/Controls/UIScrollBar.cs
+++ b/SunnyUI/Controls/UIScrollBar.cs
@@ -446,6 +446,10 @@ namespace Sunny.UI
return -1;
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UIScrollingText.cs b/SunnyUI/Controls/UIScrollingText.cs
index e266e3bd..86d31ea2 100644
--- a/SunnyUI/Controls/UIScrollingText.cs
+++ b/SunnyUI/Controls/UIScrollingText.cs
@@ -158,6 +158,11 @@ namespace Sunny.UI
base.OnMouseDoubleClick(e);
}
+ ///
+ /// 绘制前景颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFore(Graphics g, GraphicsPath path)
{
SizeF sf = g.MeasureString(Text, Font);
@@ -252,6 +257,10 @@ namespace Sunny.UI
LeftToRight
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UISignal.cs b/SunnyUI/Controls/UISignal.cs
index 55503f4d..cf0da2cc 100644
--- a/SunnyUI/Controls/UISignal.cs
+++ b/SunnyUI/Controls/UISignal.cs
@@ -125,6 +125,11 @@ namespace Sunny.UI
}
}
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
//
diff --git a/SunnyUI/Controls/UISmoothLabel.cs b/SunnyUI/Controls/UISmoothLabel.cs
index 24714519..005bdbb3 100644
--- a/SunnyUI/Controls/UISmoothLabel.cs
+++ b/SunnyUI/Controls/UISmoothLabel.cs
@@ -48,12 +48,22 @@ namespace Sunny.UI
Size = new Size(300, 60);
}
+ ///
+ /// 禁止控件跟随窗体缩放
+ ///
[DefaultValue(false), Category("SunnyUI"), Description("禁止控件跟随窗体缩放")]
public bool ZoomScaleDisabled { get; set; }
+ ///
+ /// 控件缩放前在其容器里的位置
+ ///
[Browsable(false)]
public Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
public void SetZoomScale(float scale)
{
diff --git a/SunnyUI/Controls/UISplitContainer.cs b/SunnyUI/Controls/UISplitContainer.cs
index 5dc233a3..1e5405ca 100644
--- a/SunnyUI/Controls/UISplitContainer.cs
+++ b/SunnyUI/Controls/UISplitContainer.cs
@@ -80,12 +80,22 @@ namespace Sunny.UI
Version = UIGlobal.Version;
}
+ ///
+ /// 禁止控件跟随窗体缩放
+ ///
[DefaultValue(false), Category("SunnyUI"), Description("禁止控件跟随窗体缩放")]
public bool ZoomScaleDisabled { get; set; }
+ ///
+ /// 控件缩放前在其容器里的位置
+ ///
[Browsable(false)]
public Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
public void SetZoomScale(float scale)
{
diff --git a/SunnyUI/Controls/UISwitch.cs b/SunnyUI/Controls/UISwitch.cs
index a63999ed..5b81c147 100644
--- a/SunnyUI/Controls/UISwitch.cs
+++ b/SunnyUI/Controls/UISwitch.cs
@@ -201,6 +201,10 @@ namespace Sunny.UI
}
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
@@ -225,6 +229,11 @@ namespace Sunny.UI
Invalidate();
}
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
Color color = Active ? ActiveColor : InActiveColor;
diff --git a/SunnyUI/Controls/UISymbolButton.cs b/SunnyUI/Controls/UISymbolButton.cs
index 6f60a027..7152ed54 100644
--- a/SunnyUI/Controls/UISymbolButton.cs
+++ b/SunnyUI/Controls/UISymbolButton.cs
@@ -53,6 +53,9 @@ namespace Sunny.UI
set => autoSize = false;
}
+ ///
+ /// 字体图标大小
+ ///
[DefaultValue(24)]
[Description("字体图标大小"), Category("SunnyUI")]
public int SymbolSize
@@ -67,6 +70,10 @@ namespace Sunny.UI
}
private Color symbolColor = Color.White;
+
+ ///
+ /// 字体图标颜色
+ ///
[Description("图标颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "White")]
public Color SymbolColor
@@ -146,6 +153,10 @@ namespace Sunny.UI
}
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
@@ -223,6 +234,9 @@ namespace Sunny.UI
private int _symbol = FontAwesomeIcons.fa_check;
+ ///
+ /// 字体图标
+ ///
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[Editor("Sunny.UI.UIImagePropertyEditor, " + AssemblyRefEx.SystemDesign, typeof(UITypeEditor))]
[DefaultValue(61452)]
@@ -239,6 +253,9 @@ namespace Sunny.UI
private Point symbolOffset = new Point(0, 0);
+ ///
+ /// 字体图标的偏移位置
+ ///
[DefaultValue(typeof(Point), "0, 0")]
[Description("字体图标的偏移位置"), Category("SunnyUI")]
public Point SymbolOffset
@@ -251,6 +268,11 @@ namespace Sunny.UI
}
}
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
if (IsCircle)
@@ -278,6 +300,11 @@ namespace Sunny.UI
}
}
+ ///
+ /// 绘制边框颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintRect(Graphics g, GraphicsPath path)
{
if (IsCircle)
diff --git a/SunnyUI/Controls/UISymbolLabel.cs b/SunnyUI/Controls/UISymbolLabel.cs
index c4408c80..d52c187e 100644
--- a/SunnyUI/Controls/UISymbolLabel.cs
+++ b/SunnyUI/Controls/UISymbolLabel.cs
@@ -64,6 +64,9 @@ namespace Sunny.UI
}
}
+ ///
+ /// 字体图标颜色
+ ///
[Description("图标颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "48, 48, 48")]
public Color SymbolColor
@@ -87,8 +90,11 @@ namespace Sunny.UI
set => SetForeColor(value);
}
+ ///
+ /// 字体图标大小
+ ///
[DefaultValue(24)]
- [Description("字体大小"), Category("SunnyUI")]
+ [Description("字体图标大小"), Category("SunnyUI")]
public int SymbolSize
{
get => _symbolSize;
@@ -135,6 +141,9 @@ namespace Sunny.UI
private int _symbol = FontAwesomeIcons.fa_check;
+ ///
+ /// 字体图标
+ ///
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[Editor("Sunny.UI.UIImagePropertyEditor, " + AssemblyRefEx.SystemDesign, typeof(UITypeEditor))]
[DefaultValue(61452)]
@@ -151,6 +160,9 @@ namespace Sunny.UI
private Point symbolOffset = new Point(0, 0);
+ ///
+ /// 字体图标的偏移位置
+ ///
[DefaultValue(typeof(Point), "0, 0")]
[Description("字体图标的偏移位置"), Category("SunnyUI")]
public Point SymbolOffset
@@ -163,6 +175,11 @@ namespace Sunny.UI
}
}
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
g.FillRectangle(BackColor, Bounds);
@@ -182,6 +199,11 @@ namespace Sunny.UI
}
}
+ ///
+ /// 绘制边框颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintRect(Graphics g, GraphicsPath path)
{
if (IsCircle)
@@ -198,6 +220,11 @@ namespace Sunny.UI
}
}
+ ///
+ /// 绘制前景颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFore(Graphics g, GraphicsPath path)
{
Padding = new Padding(_symbolSize + _imageInterval * 2, Padding.Top, Padding.Right, Padding.Bottom);
@@ -205,6 +232,10 @@ namespace Sunny.UI
g.DrawString(Text, Font, foreColor, Size, Padding, TextAlign);
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UITabControl.cs b/SunnyUI/Controls/UITabControl.cs
index d0a51575..06d9f8c5 100644
--- a/SunnyUI/Controls/UITabControl.cs
+++ b/SunnyUI/Controls/UITabControl.cs
@@ -77,12 +77,22 @@ namespace Sunny.UI
_fillColor = UIStyles.Blue.TabControlBackColor;
}
+ ///
+ /// 禁止控件跟随窗体缩放
+ ///
[DefaultValue(false), Category("SunnyUI"), Description("禁止控件跟随窗体缩放")]
public bool ZoomScaleDisabled { get; set; }
+ ///
+ /// 控件缩放前在其容器里的位置
+ ///
[Browsable(false)]
public Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
public void SetZoomScale(float scale)
{
diff --git a/SunnyUI/Controls/UITabControlMenu.cs b/SunnyUI/Controls/UITabControlMenu.cs
index 826547b7..8d9cbc0a 100644
--- a/SunnyUI/Controls/UITabControlMenu.cs
+++ b/SunnyUI/Controls/UITabControlMenu.cs
@@ -50,12 +50,22 @@ namespace Sunny.UI
_fillColor = UIStyles.Blue.TabControlBackColor;
}
+ ///
+ /// 禁止控件跟随窗体缩放
+ ///
[DefaultValue(false), Category("SunnyUI"), Description("禁止控件跟随窗体缩放")]
public bool ZoomScaleDisabled { get; set; }
+ ///
+ /// 控件缩放前在其容器里的位置
+ ///
[Browsable(false)]
public Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
public void SetZoomScale(float scale)
{
diff --git a/SunnyUI/Controls/UITextBox.cs b/SunnyUI/Controls/UITextBox.cs
index db8b4e19..4cd6d937 100644
--- a/SunnyUI/Controls/UITextBox.cs
+++ b/SunnyUI/Controls/UITextBox.cs
@@ -780,6 +780,10 @@ namespace Sunny.UI
set => edit.MaxLength = Math.Max(value, 1);
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
@@ -1167,6 +1171,10 @@ namespace Sunny.UI
}
public Color _symbolColor = UIFontColor.Primary;
+
+ ///
+ /// 字体图标颜色
+ ///
[DefaultValue(typeof(Color), "48, 48, 48")]
[Description("字体图标颜色"), Category("SunnyUI")]
public Color SymbolColor
@@ -1181,6 +1189,9 @@ namespace Sunny.UI
private int _symbol;
+ ///
+ /// 字体图标
+ ///
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[Editor("Sunny.UI.UIImagePropertyEditor, " + AssemblyRefEx.SystemDesign, typeof(UITypeEditor))]
[DefaultValue(0)]
@@ -1198,6 +1209,9 @@ namespace Sunny.UI
private int _symbolSize = 24;
+ ///
+ /// 字体图标大小
+ ///
[DefaultValue(24)]
[Description("字体图标大小"), Category("SunnyUI")]
public int SymbolSize
@@ -1214,6 +1228,9 @@ namespace Sunny.UI
private Point symbolOffset = new Point(0, 0);
+ ///
+ /// 字体图标的偏移位置
+ ///
[DefaultValue(typeof(Point), "0, 0")]
[Description("字体图标的偏移位置"), Category("SunnyUI")]
public Point SymbolOffset
diff --git a/SunnyUI/Controls/UITitlePanel.cs b/SunnyUI/Controls/UITitlePanel.cs
index 24cb5ad7..ec1e0737 100644
--- a/SunnyUI/Controls/UITitlePanel.cs
+++ b/SunnyUI/Controls/UITitlePanel.cs
@@ -83,6 +83,10 @@ namespace Sunny.UI
titleForeColor = UIStyles.Blue.PanelTitleForeColor;
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
@@ -137,6 +141,11 @@ namespace Sunny.UI
}
}
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
base.OnPaintFill(g, path);
diff --git a/SunnyUI/Controls/UIToolTip.cs b/SunnyUI/Controls/UIToolTip.cs
index 407cd87c..194205ba 100644
--- a/SunnyUI/Controls/UIToolTip.cs
+++ b/SunnyUI/Controls/UIToolTip.cs
@@ -289,12 +289,24 @@ namespace Sunny.UI
public string Title { get; set; }
public string ToolTipText { get; set; }
+ ///
+ /// 字体图标
+ ///
public int Symbol { get; set; }
+ ///
+ /// 字体图标大小
+ ///
public int SymbolSize { get; set; } = 32;
+ ///
+ /// 字体图标的偏移位置
+ ///
public Point SymbolOffset { get; set; } = new Point(0, 0);
+ ///
+ /// 字体图标颜色
+ ///
public Color SymbolColor { get; set; } = UIChartStyles.Dark.ForeColor;
}
}
diff --git a/SunnyUI/Controls/UITrackBar.cs b/SunnyUI/Controls/UITrackBar.cs
index 638b8664..8dd5ab4c 100644
--- a/SunnyUI/Controls/UITrackBar.cs
+++ b/SunnyUI/Controls/UITrackBar.cs
@@ -134,6 +134,10 @@ namespace Sunny.UI
}
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
@@ -144,6 +148,11 @@ namespace Sunny.UI
foreColor = uiColor.TrackBarForeColor;
}
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
g.Clear(fillColor);
diff --git a/SunnyUI/Controls/UITransparentPanel.cs b/SunnyUI/Controls/UITransparentPanel.cs
index d08965a0..65acce75 100644
--- a/SunnyUI/Controls/UITransparentPanel.cs
+++ b/SunnyUI/Controls/UITransparentPanel.cs
@@ -44,6 +44,11 @@ namespace Sunny.UI
BackColor = Color.FromArgb(Opacity, FillColor);
}
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
}
diff --git a/SunnyUI/Controls/UITreeView.cs b/SunnyUI/Controls/UITreeView.cs
index 4c54e6f7..a7bf1cf0 100644
--- a/SunnyUI/Controls/UITreeView.cs
+++ b/SunnyUI/Controls/UITreeView.cs
@@ -206,6 +206,10 @@ namespace Sunny.UI
[Browsable(false)]
public TreeView TreeView => view;
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UIUserControl.cs b/SunnyUI/Controls/UIUserControl.cs
index 77eb4015..76403d21 100644
--- a/SunnyUI/Controls/UIUserControl.cs
+++ b/SunnyUI/Controls/UIUserControl.cs
@@ -50,12 +50,22 @@ namespace Sunny.UI
SetStyleFlags(true, false);
}
+ ///
+ /// 禁止控件跟随窗体缩放
+ ///
[DefaultValue(false), Category("SunnyUI"), Description("禁止控件跟随窗体缩放")]
public bool ZoomScaleDisabled { get; set; }
+ ///
+ /// 控件缩放前在其容器里的位置
+ ///
[Browsable(false)]
public Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
public virtual void SetZoomScale(float scale)
{
@@ -393,6 +403,11 @@ namespace Sunny.UI
base.OnPaint(e);
}
+ ///
+ /// 绘制前景颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected virtual void OnPaintFore(Graphics g, GraphicsPath path)
{
string text = Text;
@@ -400,6 +415,11 @@ namespace Sunny.UI
g.DrawString(text, Font, GetForeColor(), Size, Padding, TextAlignment);
}
+ ///
+ /// 绘制边框颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected virtual void OnPaintRect(Graphics g, GraphicsPath path)
{
radius = Math.Min(radius, Math.Min(Width, Height));
diff --git a/SunnyUI/Controls/UIValve.cs b/SunnyUI/Controls/UIValve.cs
index 5fedb4ee..3fc16211 100644
--- a/SunnyUI/Controls/UIValve.cs
+++ b/SunnyUI/Controls/UIValve.cs
@@ -44,12 +44,22 @@ namespace Sunny.UI
ZoomScaleDisabled = true;
}
+ ///
+ /// 禁止控件跟随窗体缩放
+ ///
[DefaultValue(false), Category("SunnyUI"), Description("禁止控件跟随窗体缩放")]
public bool ZoomScaleDisabled { get; set; }
+ ///
+ /// 控件缩放前在其容器里的位置
+ ///
[Browsable(false)]
public Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
public void SetZoomScale(float scale)
{
diff --git a/SunnyUI/Controls/UIVerScrollBarEx.cs b/SunnyUI/Controls/UIVerScrollBarEx.cs
index 47575a86..d65323c8 100644
--- a/SunnyUI/Controls/UIVerScrollBarEx.cs
+++ b/SunnyUI/Controls/UIVerScrollBarEx.cs
@@ -90,6 +90,11 @@ namespace Sunny.UI
public int RightButtonPos => Height - 16;
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
base.OnPaintFill(g, path);
@@ -228,6 +233,10 @@ namespace Sunny.UI
}
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Controls/UIVerificationCode.cs b/SunnyUI/Controls/UIVerificationCode.cs
index 7d9c4b17..e890f760 100644
--- a/SunnyUI/Controls/UIVerificationCode.cs
+++ b/SunnyUI/Controls/UIVerificationCode.cs
@@ -39,6 +39,10 @@ namespace Sunny.UI
Height = 35;
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
@@ -51,6 +55,11 @@ namespace Sunny.UI
Invalidate();
}
+ ///
+ /// 绘制填充颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFill(Graphics g, GraphicsPath path)
{
base.OnPaintFill(g, path);
@@ -60,6 +69,11 @@ namespace Sunny.UI
bmp.Dispose();
}
+ ///
+ /// 绘制前景颜色
+ ///
+ /// 绘图图面
+ /// 绘图路径
protected override void OnPaintFore(Graphics g, GraphicsPath path)
{
if (Text != "") Text = "";
diff --git a/SunnyUI/Controls/UIWaitingBar.cs b/SunnyUI/Controls/UIWaitingBar.cs
index 1ed205b2..7557d44d 100644
--- a/SunnyUI/Controls/UIWaitingBar.cs
+++ b/SunnyUI/Controls/UIWaitingBar.cs
@@ -139,6 +139,10 @@ namespace Sunny.UI
}
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Font/UIFontImages.cs b/SunnyUI/Font/UIFontImages.cs
index daeebc97..1796f2b7 100644
--- a/SunnyUI/Font/UIFontImages.cs
+++ b/SunnyUI/Font/UIFontImages.cs
@@ -223,6 +223,9 @@ namespace Sunny.UI
public class SymbolValue
{
+ ///
+ /// 字体图标
+ ///
public int Symbol { get; set; }
public UISymbolType SymbolType { get; set; }
@@ -296,12 +299,21 @@ namespace Sunny.UI
lbl.Image = FontImageHelper.CreateImage(symbol.Symbol + (int)symbol.SymbolType * 100000, 28, UIColor.Blue);
}
+ ///
+ /// 字体图标
+ ///
public int Symbol { get; set; }
public UISymbolType SymbolType { get; set; }
+ ///
+ /// 字体图标的偏移位置
+ ///
public Point SymbolOffset { get; set; }
+ ///
+ /// 字体图标大小
+ ///
public int SymbolSize { get; set; } = 28;
private void lbl_DoubleClick(object sender, EventArgs e)
diff --git a/SunnyUI/Forms/UIForm.cs b/SunnyUI/Forms/UIForm.cs
index 80eb6d83..22a3a333 100644
--- a/SunnyUI/Forms/UIForm.cs
+++ b/SunnyUI/Forms/UIForm.cs
@@ -99,6 +99,9 @@ namespace Sunny.UI
set => base.AutoScroll = false;
}
+ ///
+ /// 禁止控件跟随窗体缩放
+ ///
[DefaultValue(false), Category("SunnyUI"), Description("禁止控件跟随窗体缩放")]
public bool ZoomScaleDisabled { get; set; }
@@ -156,9 +159,16 @@ namespace Sunny.UI
set;
}
+ ///
+ /// 控件缩放前在其容器里的位置
+ ///
[Browsable(false)]
public Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
private void SetZoomScale()
{
if (ZoomScaleDisabled) return;
diff --git a/SunnyUI/Forms/UIMessageForm.cs b/SunnyUI/Forms/UIMessageForm.cs
index a3a78e02..98325f91 100644
--- a/SunnyUI/Forms/UIMessageForm.cs
+++ b/SunnyUI/Forms/UIMessageForm.cs
@@ -99,6 +99,10 @@ namespace Sunny.UI
Close();
}
+ ///
+ /// 设置主题样式
+ ///
+ /// 主题样式
public override void SetStyleColor(UIBaseStyle uiColor)
{
base.SetStyleColor(uiColor);
diff --git a/SunnyUI/Frames/UIPage.cs b/SunnyUI/Frames/UIPage.cs
index 6aac76c0..ea4be592 100644
--- a/SunnyUI/Frames/UIPage.cs
+++ b/SunnyUI/Frames/UIPage.cs
@@ -206,12 +206,22 @@ namespace Sunny.UI
return this;
}
+ ///
+ /// 禁止控件跟随窗体缩放
+ ///
[DefaultValue(false), Category("SunnyUI"), Description("禁止控件跟随窗体缩放")]
public bool ZoomScaleDisabled { get; set; }
+ ///
+ /// 控件缩放前在其容器里的位置
+ ///
[Browsable(false)]
public Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
public virtual void SetZoomScale(float scale)
{
@@ -260,6 +270,9 @@ namespace Sunny.UI
private int _symbolSize = 24;
+ ///
+ /// 字体图标大小
+ ///
[DefaultValue(24)]
[Description("字体图标大小"), Category("SunnyUI")]
public int SymbolSize
@@ -276,6 +289,9 @@ namespace Sunny.UI
private int _symbol;
+ ///
+ /// 字体图标
+ ///
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[Editor("Sunny.UI.UIImagePropertyEditor, " + AssemblyRefEx.SystemDesign, typeof(UITypeEditor))]
[DefaultValue(0)]
@@ -293,6 +309,9 @@ namespace Sunny.UI
private Point symbolOffset = new Point(0, 0);
+ ///
+ /// 字体图标的偏移位置
+ ///
[DefaultValue(typeof(Point), "0, 0")]
[Description("字体图标的偏移位置"), Category("SunnyUI")]
public Point SymbolOffset
diff --git a/SunnyUI/Style/UIZoomScale.cs b/SunnyUI/Style/UIZoomScale.cs
index bd6f97e0..e5dd5a0f 100644
--- a/SunnyUI/Style/UIZoomScale.cs
+++ b/SunnyUI/Style/UIZoomScale.cs
@@ -5,10 +5,20 @@ namespace Sunny.UI
{
public interface IZoomScale
{
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 缩放比例
void SetZoomScale(float scale);
+ ///
+ /// 控件缩放前在其容器里的位置
+ ///
Rectangle ZoomScaleRect { get; set; }
+ ///
+ /// 禁止控件跟随窗体缩放
+ ///
bool ZoomScaleDisabled { get; set; }
}
@@ -70,6 +80,11 @@ namespace Sunny.UI
return new Size(Calc(size.Width, scale), Calc(size.Height, scale));
}
+ ///
+ /// 设置控件缩放比例
+ ///
+ /// 控件
+ /// 缩放比例
internal static void SetZoomScale(Control control, float scale)
{
if (scale.EqualsFloat(0)) return;
diff --git a/SunnyUI/SunnyUI.csproj b/SunnyUI/SunnyUI.csproj
index 4396d23a..3e7e0fdd 100644
--- a/SunnyUI/SunnyUI.csproj
+++ b/SunnyUI/SunnyUI.csproj
@@ -21,7 +21,7 @@
D:\MyDocuments\SunnyUI.pfx
False
True
- True
+ False