* 增加控件属性显示值及Sunny UI分类

This commit is contained in:
Sunny 2020-08-08 21:55:50 +08:00
parent a13f3a96de
commit 99b7db183c
50 changed files with 411 additions and 182 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -73,10 +73,13 @@
this.uiDatetimePicker1.Font = new System.Drawing.Font("微软雅黑", 12F); this.uiDatetimePicker1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiDatetimePicker1.Location = new System.Drawing.Point(388, 136); this.uiDatetimePicker1.Location = new System.Drawing.Point(388, 136);
this.uiDatetimePicker1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.uiDatetimePicker1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiDatetimePicker1.MaxLength = 19;
this.uiDatetimePicker1.MinimumSize = new System.Drawing.Size(63, 0); this.uiDatetimePicker1.MinimumSize = new System.Drawing.Size(63, 0);
this.uiDatetimePicker1.Name = "uiDatetimePicker1"; this.uiDatetimePicker1.Name = "uiDatetimePicker1";
this.uiDatetimePicker1.Padding = new System.Windows.Forms.Padding(0, 0, 30, 0); this.uiDatetimePicker1.Padding = new System.Windows.Forms.Padding(0, 0, 30, 0);
this.uiDatetimePicker1.Size = new System.Drawing.Size(306, 29); this.uiDatetimePicker1.Size = new System.Drawing.Size(306, 29);
this.uiDatetimePicker1.SymbolDropDown = 61555;
this.uiDatetimePicker1.SymbolNormal = 61555;
this.uiDatetimePicker1.TabIndex = 41; this.uiDatetimePicker1.TabIndex = 41;
this.uiDatetimePicker1.Text = "2020-06-02 17:57:28"; this.uiDatetimePicker1.Text = "2020-06-02 17:57:28";
this.uiDatetimePicker1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; this.uiDatetimePicker1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
@ -127,6 +130,7 @@
this.uiTimePicker1.Font = new System.Drawing.Font("微软雅黑", 12F); this.uiTimePicker1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiTimePicker1.Location = new System.Drawing.Point(188, 136); this.uiTimePicker1.Location = new System.Drawing.Point(188, 136);
this.uiTimePicker1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.uiTimePicker1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiTimePicker1.MaxLength = 8;
this.uiTimePicker1.MinimumSize = new System.Drawing.Size(63, 0); this.uiTimePicker1.MinimumSize = new System.Drawing.Size(63, 0);
this.uiTimePicker1.Name = "uiTimePicker1"; this.uiTimePicker1.Name = "uiTimePicker1";
this.uiTimePicker1.Padding = new System.Windows.Forms.Padding(0, 0, 30, 0); this.uiTimePicker1.Padding = new System.Windows.Forms.Padding(0, 0, 30, 0);
@ -167,6 +171,7 @@
this.uiDatePicker1.Font = new System.Drawing.Font("微软雅黑", 12F); this.uiDatePicker1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiDatePicker1.Location = new System.Drawing.Point(30, 136); this.uiDatePicker1.Location = new System.Drawing.Point(30, 136);
this.uiDatePicker1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.uiDatePicker1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiDatePicker1.MaxLength = 10;
this.uiDatePicker1.MinimumSize = new System.Drawing.Size(63, 0); this.uiDatePicker1.MinimumSize = new System.Drawing.Size(63, 0);
this.uiDatePicker1.Name = "uiDatePicker1"; this.uiDatePicker1.Name = "uiDatePicker1";
this.uiDatePicker1.Padding = new System.Windows.Forms.Padding(0, 0, 30, 0); this.uiDatePicker1.Padding = new System.Windows.Forms.Padding(0, 0, 30, 0);

View File

@ -88,7 +88,7 @@ namespace Sunny.UI
/// 字体颜色 /// 字体颜色
/// </summary> /// </summary>
[Description("字体颜色")] [Description("字体颜色")]
[Category("自定义")] [Category("SunnyUI")]
[DefaultValue(typeof(Color), "White")] [DefaultValue(typeof(Color), "White")]
public override Color ForeColor public override Color ForeColor
{ {
@ -100,7 +100,7 @@ namespace Sunny.UI
/// 填充颜色,当值为背景色或透明色或空值则不填充 /// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("填充颜色")] [Description("填充颜色")]
[Category("自定义")] [Category("SunnyUI")]
[DefaultValue(typeof(Color), "235, 243, 255")] [DefaultValue(typeof(Color), "235, 243, 255")]
public Color FillColor public Color FillColor
{ {

View File

@ -270,7 +270,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// Ö÷ÌâÑùʽ /// Ö÷ÌâÑùʽ
/// </summary> /// </summary>
[DefaultValue(UIStyle.Blue)] [DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
public UIStyle Style public UIStyle Style
{ {
get => _style; get => _style;
@ -299,10 +299,20 @@ namespace Sunny.UI
Invalidate(); Invalidate();
} }
/// <summary>
/// 自定义主题风格
/// </summary>
[DefaultValue(false)]
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
public bool StyleCustomMode { get; set; } public bool StyleCustomMode { get; set; }
public string Version { get; } public string Version { get; }
/// <summary>
/// Tag字符串
/// </summary>
[DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; } public string TagString { get; set; }
} }
} }

View File

@ -190,7 +190,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// Ö÷ÌâÑùʽ /// Ö÷ÌâÑùʽ
/// </summary> /// </summary>
[DefaultValue(UIStyle.Blue)] [DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
public UIStyle Style public UIStyle Style
{ {
get => _style; get => _style;
@ -219,10 +219,20 @@ namespace Sunny.UI
Invalidate(); Invalidate();
} }
/// <summary>
/// 自定义主题风格
/// </summary>
[DefaultValue(false)]
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
public bool StyleCustomMode { get; set; } public bool StyleCustomMode { get; set; }
public string Version { get; } public string Version { get; }
/// <summary>
/// Tag字符串
/// </summary>
[DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; } public string TagString { get; set; }
} }
} }

View File

@ -32,16 +32,16 @@ namespace Sunny.UI
{ {
public enum UIDropDownStyle public enum UIDropDownStyle
{ {
/// <summary>
/// 通过单击下箭头指定显示列表,并指定文本部分可编辑。 这表示用户可以输入新的值,而不仅限于选择列表中现有的值。
/// </summary>
DropDown, DropDown,
/// <summary>
/// 通过单击下箭头指定显示列表,并指定文本部分不可编辑。 这表示用户不能输入新的值。 只能选择列表中已有的值。
/// </summary>
DropDownList DropDownList
} }
public enum UIDropItemPos
{
Top,
Bottom
}
[ToolboxItem(false)] [ToolboxItem(false)]
public partial class UIDropControl : UIPanel public partial class UIDropControl : UIPanel
{ {
@ -106,6 +106,7 @@ namespace Sunny.UI
} }
[DefaultValue(null)] [DefaultValue(null)]
[Description("水印文字"), Category("SunnyUI")]
public string Watermark public string Watermark
{ {
get => edit.Watermark; get => edit.Watermark;
@ -153,6 +154,7 @@ namespace Sunny.UI
private int dropSymbol = 61703; private int dropSymbol = 61703;
[DefaultValue(61703)] [DefaultValue(61703)]
[Description("正常显示时字体图标"), Category("SunnyUI")]
public int SymbolNormal public int SymbolNormal
{ {
get => symbolNormal; get => symbolNormal;
@ -164,6 +166,7 @@ namespace Sunny.UI
} }
[DefaultValue(61702)] [DefaultValue(61702)]
[Description("下拉框显示时字体图标"), Category("SunnyUI")]
public int SymbolDropDown { get; set; } = 61702; public int SymbolDropDown { get; set; } = 61702;
protected virtual void CreateInstance() protected virtual void CreateInstance()
@ -182,6 +185,7 @@ namespace Sunny.UI
private UIDropDownStyle _dropDownStyle = UIDropDownStyle.DropDown; private UIDropDownStyle _dropDownStyle = UIDropDownStyle.DropDown;
[DefaultValue(UIDropDownStyle.DropDown)] [DefaultValue(UIDropDownStyle.DropDown)]
[Description("下拉框显示样式"), Category("SunnyUI")]
public UIDropDownStyle DropDownStyle public UIDropDownStyle DropDownStyle
{ {
get => _dropDownStyle; get => _dropDownStyle;
@ -196,9 +200,6 @@ namespace Sunny.UI
} }
} }
[DefaultValue(UIDropItemPos.Bottom)]
public UIDropItemPos DropItemPos { get; set; } = UIDropItemPos.Bottom;
public event EventHandler ButtonClick; public event EventHandler ButtonClick;
protected readonly TextBoxEx edit = new TextBoxEx(); protected readonly TextBoxEx edit = new TextBoxEx();
@ -274,6 +275,7 @@ namespace Sunny.UI
} }
[DefaultValue('\0')] [DefaultValue('\0')]
[Description("m"), Category("SunnyUI")]
public char PasswordChar public char PasswordChar
{ {
get => edit.PasswordChar; get => edit.PasswordChar;

View File

@ -117,7 +117,7 @@ namespace Sunny.UI
#region Properties #region Properties
[ [
Category("Appearance"), Category("SunnyUI"),
Description("Style of the control"), Description("Style of the control"),
DefaultValue(AnalogMeterStyle.Circular) DefaultValue(AnalogMeterStyle.Circular)
] ]
@ -132,7 +132,7 @@ namespace Sunny.UI
} }
[ [
Category("Appearance"), Category("SunnyUI"),
Description("Color of the body of the control"), Description("Color of the body of the control"),
DefaultValue(typeof(Color), "80, 160, 255") DefaultValue(typeof(Color), "80, 160, 255")
] ]
@ -143,7 +143,7 @@ namespace Sunny.UI
} }
[ [
Category("Appearance"), Category("SunnyUI"),
Description("Color of the needle"), Description("Color of the needle"),
DefaultValue(typeof(Color), "Yellow") DefaultValue(typeof(Color), "Yellow")
] ]
@ -158,7 +158,7 @@ namespace Sunny.UI
} }
[ [
Category("Appearance"), Category("SunnyUI"),
Description("Show or hide the glass effect"), Description("Show or hide the glass effect"),
DefaultValue(false) DefaultValue(false)
] ]
@ -173,7 +173,7 @@ namespace Sunny.UI
} }
[ [
Category("Appearance"), Category("SunnyUI"),
Description("Color of the scale of the control"), Description("Color of the scale of the control"),
DefaultValue(typeof(Color), "White") DefaultValue(typeof(Color), "White")
] ]
@ -240,7 +240,7 @@ namespace Sunny.UI
} }
[ [
Category("Appearance"), Category("SunnyUI"),
Description("Number of the scale divisions"), Description("Number of the scale divisions"),
DefaultValue(11) DefaultValue(11)
] ]
@ -256,7 +256,7 @@ namespace Sunny.UI
} }
[ [
Category("Appearance"), Category("SunnyUI"),
Description("Number of the scale subdivisions"), Description("Number of the scale subdivisions"),
DefaultValue(4) DefaultValue(4)
] ]

View File

@ -178,6 +178,7 @@ namespace Sunny.UI
/// 是否选中 /// 是否选中
/// </summary> /// </summary>
[DefaultValue(false)] [DefaultValue(false)]
[Description("是否选中"), Category("SunnyUI")]
public bool Selected public bool Selected
{ {
get => selected; get => selected;
@ -245,6 +246,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "244, 244, 244"), Category("SunnyUI")] [DefaultValue(typeof(Color), "244, 244, 244"), Category("SunnyUI")]
[Description("不可用时填充颜色")]
public Color FillDisableColor public Color FillDisableColor
{ {
get => fillDisableColor; get => fillDisableColor;
@ -252,6 +254,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "173, 178, 181"), Category("SunnyUI")] [DefaultValue(typeof(Color), "173, 178, 181"), Category("SunnyUI")]
[Description("不可用时边框颜色")]
public Color RectDisableColor public Color RectDisableColor
{ {
get => rectDisableColor; get => rectDisableColor;
@ -259,6 +262,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "109, 109, 103"), Category("SunnyUI")] [DefaultValue(typeof(Color), "109, 109, 103"), Category("SunnyUI")]
[Description("不可用时字体颜色")]
public Color ForeDisableColor public Color ForeDisableColor
{ {
get => foreDisableColor; get => foreDisableColor;
@ -266,6 +270,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "111, 168, 255"), Category("SunnyUI")] [DefaultValue(typeof(Color), "111, 168, 255"), Category("SunnyUI")]
[Description("鼠标移上时填充颜色")]
public Color FillHoverColor public Color FillHoverColor
{ {
get => fillHoverColor; get => fillHoverColor;
@ -273,6 +278,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "74, 131, 229"), Category("SunnyUI")] [DefaultValue(typeof(Color), "74, 131, 229"), Category("SunnyUI")]
[Description("鼠标按下时填充颜色")]
public Color FillPressColor public Color FillPressColor
{ {
get => fillPressColor; get => fillPressColor;
@ -280,6 +286,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "White"), Category("SunnyUI")] [DefaultValue(typeof(Color), "White"), Category("SunnyUI")]
[Description("鼠标移上时字体颜色")]
public Color ForeHoverColor public Color ForeHoverColor
{ {
get => foreHoverColor; get => foreHoverColor;
@ -287,6 +294,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "White"), Category("SunnyUI")] [DefaultValue(typeof(Color), "White"), Category("SunnyUI")]
[Description("鼠标按下时字体颜色")]
public Color ForePressColor public Color ForePressColor
{ {
get => forePressColor; get => forePressColor;
@ -294,6 +302,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "111, 168, 255"), Category("SunnyUI")] [DefaultValue(typeof(Color), "111, 168, 255"), Category("SunnyUI")]
[Description("鼠标移上时边框颜色")]
public Color RectHoverColor public Color RectHoverColor
{ {
get => rectHoverColor; get => rectHoverColor;
@ -301,6 +310,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "74, 131, 229"), Category("SunnyUI")] [DefaultValue(typeof(Color), "74, 131, 229"), Category("SunnyUI")]
[Description("鼠标按下时边框颜色")]
public Color RectPressColor public Color RectPressColor
{ {
get => rectPressColor; get => rectPressColor;
@ -308,6 +318,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "74, 131, 229"), Category("SunnyUI")] [DefaultValue(typeof(Color), "74, 131, 229"), Category("SunnyUI")]
[Description("选中时填充颜色")]
public Color FillSelectedColor public Color FillSelectedColor
{ {
get => fillSelectedColor; get => fillSelectedColor;
@ -315,6 +326,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "White"), Category("SunnyUI")] [DefaultValue(typeof(Color), "White"), Category("SunnyUI")]
[Description("选中时字体颜色")]
public Color ForeSelectedColor public Color ForeSelectedColor
{ {
get => foreSelectedColor; get => foreSelectedColor;
@ -322,6 +334,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "74, 131, 229"), Category("SunnyUI")] [DefaultValue(typeof(Color), "74, 131, 229"), Category("SunnyUI")]
[Description("选中时边框颜色")]
public Color RectSelectedColor public Color RectSelectedColor
{ {
get => rectSelectedColor; get => rectSelectedColor;
@ -362,6 +375,7 @@ namespace Sunny.UI
} }
[DefaultValue(DialogResult.None)] [DefaultValue(DialogResult.None)]
[Description("指定标识符以指示对话框的返回值"), Category("SunnyUI")]
public DialogResult DialogResult { get; set; } = DialogResult.None; public DialogResult DialogResult { get; set; } = DialogResult.None;
protected override void OnKeyDown(KeyEventArgs e) protected override void OnKeyDown(KeyEventArgs e)
@ -375,6 +389,7 @@ namespace Sunny.UI
} }
[DefaultValue(false)] [DefaultValue(false)]
[Description("显示激活时边框线"), Category("SunnyUI")]
public bool ShowFocusLine { get; set; } public bool ShowFocusLine { get; set; }
} }
} }

View File

@ -51,7 +51,7 @@ namespace Sunny.UI
private int _imageInterval = 3; private int _imageInterval = 3;
[DefaultValue(16)] [DefaultValue(16)]
[Description("图标大小"), Category("自定义")] [Description("图标大小"), Category("SunnyUI")]
public int ImageSize public int ImageSize
{ {
get => _imageSize; get => _imageSize;
@ -69,7 +69,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 字体颜色 /// 字体颜色
/// </summary> /// </summary>
[Description("字体颜色"), Category("自定义")] [Description("字体颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "48, 48, 48")] [DefaultValue(typeof(Color), "48, 48, 48")]
public override Color ForeColor public override Color ForeColor
{ {
@ -78,7 +78,7 @@ namespace Sunny.UI
} }
[DefaultValue(3)] [DefaultValue(3)]
[Description("图标与文字之间间隔"), Category("自定义")] [Description("图标与文字之间间隔"), Category("SunnyUI")]
public int ImageInterval public int ImageInterval
{ {
get => _imageInterval; get => _imageInterval;
@ -91,7 +91,7 @@ namespace Sunny.UI
private bool _checked; private bool _checked;
[Description("是否选中"), Category("自定义")] [Description("是否选中"), Category("SunnyUI")]
[DefaultValue(false)] [DefaultValue(false)]
public bool Checked public bool Checked
{ {
@ -173,7 +173,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充 /// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("填充颜色"), Category("自定义")] [Description("填充颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public Color CheckBoxColor public Color CheckBoxColor
{ {

View File

@ -76,6 +76,7 @@ namespace Sunny.UI
[Localizable(true)] [Localizable(true)]
[Editor("System.Windows.Forms.Design.ListControlStringCollectionEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))] [Editor("System.Windows.Forms.Design.ListControlStringCollectionEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
[MergableProperty(false)] [MergableProperty(false)]
[Description("获取该多选框组中项的集合"), Category("SunnyUI")]
public ListBox.ObjectCollection Items => ListBox.Items; public ListBox.ObjectCollection Items => ListBox.Items;
private CheckedListBoxEx listbox; private CheckedListBoxEx listbox;
@ -227,6 +228,7 @@ namespace Sunny.UI
private int columnCount = 1; private int columnCount = 1;
[DefaultValue(1)] [DefaultValue(1)]
[Description("显示列的个数"), Category("SunnyUI")]
public int ColumnCount public int ColumnCount
{ {
get => columnCount; get => columnCount;
@ -240,6 +242,7 @@ namespace Sunny.UI
private Size _itemSize = new Size(150, 35); private Size _itemSize = new Size(150, 35);
[DefaultValue(typeof(Size), "150, 35")] [DefaultValue(typeof(Size), "150, 35")]
[Description("显示项的大小"), Category("SunnyUI")]
public Size ItemSize public Size ItemSize
{ {
get => _itemSize; get => _itemSize;
@ -253,6 +256,7 @@ namespace Sunny.UI
private Point startPos = new Point(12, 12); private Point startPos = new Point(12, 12);
[DefaultValue(typeof(Point), "12, 12")] [DefaultValue(typeof(Point), "12, 12")]
[Description("显示项的起始位置"), Category("SunnyUI")]
public Point StartPos public Point StartPos
{ {
get => startPos; get => startPos;
@ -266,6 +270,7 @@ namespace Sunny.UI
public int columnInterval; public int columnInterval;
[DefaultValue(0)] [DefaultValue(0)]
[Description("显示项列之间的间隔"), Category("SunnyUI")]
public int ColumnInterval public int ColumnInterval
{ {
get => columnInterval; get => columnInterval;
@ -279,6 +284,7 @@ namespace Sunny.UI
private int rowInterval; private int rowInterval;
[DefaultValue(0)] [DefaultValue(0)]
[Description("显示项行之间的间隔"), Category("SunnyUI")]
public int RowInterval public int RowInterval
{ {
get => rowInterval; get => rowInterval;

View File

@ -82,6 +82,8 @@ namespace Sunny.UI
private Color selectColor; private Color selectColor;
[DefaultValue(typeof(Color), "80, 159, 254")]
[Description("选中颜色"), Category("SunnyUI")]
public Color Value public Color Value
{ {
get => selectColor; get => selectColor;

View File

@ -105,6 +105,7 @@ namespace Sunny.UI
} }
[DefaultValue(25)] [DefaultValue(25)]
[Description("列表项高度"), Category("SunnyUI")]
public int ItemHeight public int ItemHeight
{ {
get => ListBox.ItemHeight; get => ListBox.ItemHeight;
@ -112,6 +113,7 @@ namespace Sunny.UI
} }
[DefaultValue(8)] [DefaultValue(8)]
[Description("列表下拉最大个数"), Category("SunnyUI")]
public int MaxDropDownItems { get; set; } = 8; public int MaxDropDownItems { get; set; } = 8;
private void UIComboBox_FontChanged(object sender, EventArgs e) private void UIComboBox_FontChanged(object sender, EventArgs e)
@ -150,6 +152,7 @@ namespace Sunny.UI
private object dataSource; private object dataSource;
[DefaultValue(null), RefreshProperties(RefreshProperties.Repaint), AttributeProvider(typeof(IListSource))] [DefaultValue(null), RefreshProperties(RefreshProperties.Repaint), AttributeProvider(typeof(IListSource))]
[Description("数据源"), Category("SunnyUI")]
public object DataSource public object DataSource
{ {
get => dataSource; get => dataSource;
@ -208,12 +211,14 @@ namespace Sunny.UI
[Editor("System.Windows.Forms.Design.ListControlStringCollectionEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))] [Editor("System.Windows.Forms.Design.ListControlStringCollectionEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
[Localizable(true)] [Localizable(true)]
[MergableProperty(false)] [MergableProperty(false)]
[Description("下拉显示项"), Category("SunnyUI")]
public ObjectCollection Items public ObjectCollection Items
{ {
get => box.Items; get => box.Items;
} }
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("选中索引"), Category("SunnyUI")]
public int SelectedIndex public int SelectedIndex
{ {
get => box.SelectedIndex; get => box.SelectedIndex;
@ -221,6 +226,7 @@ namespace Sunny.UI
} }
[Browsable(false), Bindable(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] [Browsable(false), Bindable(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("选中项"), Category("SunnyUI")]
public object SelectedItem public object SelectedItem
{ {
get => box.SelectedItem; get => box.SelectedItem;
@ -228,6 +234,7 @@ namespace Sunny.UI
} }
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Description("选中文字"), Category("SunnyUI")]
public string SelectedText public string SelectedText
{ {
get get
@ -248,6 +255,7 @@ namespace Sunny.UI
Clear(); Clear();
} }
[Description("获取或设置要为此列表框显示的属性。"), Category("SunnyUI")]
[DefaultValue("")] [DefaultValue("")]
[Editor("System.Windows.Forms.Design.DataMemberFieldEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))] [Editor("System.Windows.Forms.Design.DataMemberFieldEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
[TypeConverter("System.Windows.Forms.Design.DataMemberFieldConverter, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [TypeConverter("System.Windows.Forms.Design.DataMemberFieldConverter, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
@ -261,7 +269,7 @@ namespace Sunny.UI
} }
} }
[Description("获取或设置指示显示值的方式的格式说明符字符。"), Category("SunnyUI")]
[DefaultValue("")] [DefaultValue("")]
[Editor("System.Windows.Forms.Design.FormatStringEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))] [Editor("System.Windows.Forms.Design.FormatStringEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
[MergableProperty(false)] [MergableProperty(false)]
@ -271,6 +279,7 @@ namespace Sunny.UI
set => box.FormatString = value; set => box.FormatString = value;
} }
[Description("获取或设置指示显示值是否可以进行格式化操作。"), Category("SunnyUI")]
[DefaultValue(false)] [DefaultValue(false)]
public bool FormattingEnabled public bool FormattingEnabled
{ {
@ -278,6 +287,7 @@ namespace Sunny.UI
set => box.FormattingEnabled = value; set => box.FormattingEnabled = value;
} }
[Description("获取或设置要为此列表框实际值的属性。"), Category("SunnyUI")]
[DefaultValue("")] [DefaultValue("")]
[Editor("System.Windows.Forms.Design.DataMemberFieldEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))] [Editor("System.Windows.Forms.Design.DataMemberFieldEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
public string ValueMember public string ValueMember

View File

@ -38,10 +38,18 @@ namespace Sunny.UI
Version = UIGlobal.Version; Version = UIGlobal.Version;
} }
/// <summary>
/// 自定义主题风格
/// </summary>
[DefaultValue(false)] [DefaultValue(false)]
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
public bool StyleCustomMode { get; set; } public bool StyleCustomMode { get; set; }
/// <summary>
/// Tag字符串
/// </summary>
[DefaultValue(null)] [DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; } public string TagString { get; set; }
public void SetStyle(UIStyle style) public void SetStyle(UIStyle style)
@ -63,7 +71,10 @@ namespace Sunny.UI
private UIStyle _style = UIStyle.Blue; private UIStyle _style = UIStyle.Blue;
[DefaultValue(UIStyle.Blue)] /// <summary>
/// 主题样式
/// </summary>
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
public UIStyle Style public UIStyle Style
{ {
get => _style; get => _style;

View File

@ -52,12 +52,14 @@ namespace Sunny.UI
/// Tag字符串 /// Tag字符串
/// </summary> /// </summary>
[DefaultValue(null)] [DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; } public string TagString { get; set; }
/// <summary> /// <summary>
/// 自定义主题样式 /// 自定义主题风格
/// </summary> /// </summary>
[DefaultValue(false)] [DefaultValue(false)]
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
public bool StyleCustomMode { get; set; } public bool StyleCustomMode { get; set; }
/// <summary> /// <summary>
@ -85,7 +87,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框显示位置 /// 边框显示位置
/// </summary> /// </summary>
[DefaultValue(ToolStripStatusLabelBorderSides.All), Description("边框显示位置")] [DefaultValue(ToolStripStatusLabelBorderSides.All), Description("边框显示位置"), Category("SunnyUI")]
public ToolStripStatusLabelBorderSides RectSides public ToolStripStatusLabelBorderSides RectSides
{ {
get => _rectSides; get => _rectSides;
@ -110,7 +112,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 圆角显示位置 /// 圆角显示位置
/// </summary> /// </summary>
[DefaultValue(UICornerRadiusSides.All), Description("圆角显示位置")] [DefaultValue(UICornerRadiusSides.All), Description("圆角显示位置"), Category("SunnyUI")]
public UICornerRadiusSides RadiusSides public UICornerRadiusSides RadiusSides
{ {
get => _radiusSides; get => _radiusSides;
@ -127,7 +129,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 圆角角度 /// 圆角角度
/// </summary> /// </summary>
[Description("圆角角度"), Category("自定义")] [Description("圆角角度"), Category("SunnyUI")]
[DefaultValue(5)] [DefaultValue(5)]
public int Radius public int Radius
{ {
@ -147,7 +149,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 是否显示文字 /// 是否显示文字
/// </summary> /// </summary>
[Description("是否显示文字")] [Description("是否显示文字"), Category("SunnyUI")]
[DefaultValue(true)] [DefaultValue(true)]
protected bool ShowText protected bool ShowText
{ {
@ -225,7 +227,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 主题样式 /// 主题样式
/// </summary> /// </summary>
[DefaultValue(UIStyle.Blue)] [DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
public UIStyle Style public UIStyle Style
{ {
get => _style; get => _style;
@ -249,7 +251,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 文字对齐方向 /// 文字对齐方向
/// </summary> /// </summary>
[Description("文字对齐方向")] [Description("文字对齐方向"), Category("SunnyUI")]
[DefaultValue(ContentAlignment.MiddleCenter)] [DefaultValue(ContentAlignment.MiddleCenter)]
public ContentAlignment TextAlign public ContentAlignment TextAlign
{ {
@ -588,7 +590,7 @@ namespace Sunny.UI
Invalidate(); Invalidate();
} }
} }
protected Color rectSelectedColor; protected Color rectSelectedColor;
/// <summary> /// <summary>

View File

@ -108,11 +108,11 @@ namespace Sunny.UI
public void Init() public void Init()
{ {
//列占满 //自动生成
//AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; AutoGenerateColumns = false;
// //列占满
SelectionMode = DataGridViewSelectionMode.FullRowSelect; AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
//禁止调整数据行行高 //禁止调整数据行行高
AllowUserToResizeRows = false; AllowUserToResizeRows = false;
@ -120,24 +120,24 @@ namespace Sunny.UI
//允许调整标题行行宽 //允许调整标题行行宽
AllowUserToResizeColumns = true; AllowUserToResizeColumns = true;
//不显示数据行标题
RowHeadersVisible = false;
//禁止行多选
//MultiSelect = false;
//自动生成行
//AutoGenerateColumns = true;
//禁用最后一行空白,自动新增行 //禁用最后一行空白,自动新增行
AllowUserToAddRows = false; AllowUserToAddRows = false;
AllowUserToDeleteRows = false; AllowUserToDeleteRows = false;
//不显示表格线
CellBorderStyle = DataGridViewCellBorderStyle.None;
//禁止行多选
MultiSelect = false;
//不显示数据行标题
RowHeadersVisible = false;
//禁止只读 //禁止只读
//ReadOnly = false; //ReadOnly = false;
//不显示表格线 //行选
CellBorderStyle = DataGridViewCellBorderStyle.None; SelectionMode = DataGridViewSelectionMode.FullRowSelect;
} }
protected override void OnPaint(PaintEventArgs e) protected override void OnPaint(PaintEventArgs e)
@ -268,7 +268,10 @@ namespace Sunny.UI
private UIStyle _style = UIStyle.Blue; private UIStyle _style = UIStyle.Blue;
[DefaultValue(UIStyle.Blue)] /// <summary>
/// 主题样式
/// </summary>
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
public UIStyle Style public UIStyle Style
{ {
get => _style; get => _style;
@ -276,6 +279,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "White")] [DefaultValue(typeof(Color), "White")]
[Description("偶数行显示颜色"), Category("SunnyUI")]
public Color StripeEvenColor public Color StripeEvenColor
{ {
get => RowsDefaultCellStyle.BackColor; get => RowsDefaultCellStyle.BackColor;
@ -287,6 +291,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "235, 243, 255")] [DefaultValue(typeof(Color), "235, 243, 255")]
[Description("奇数行显示颜色"), Category("SunnyUI")]
public Color StripeOddColor public Color StripeOddColor
{ {
get => AlternatingRowsDefaultCellStyle.BackColor; get => AlternatingRowsDefaultCellStyle.BackColor;
@ -330,17 +335,26 @@ namespace Sunny.UI
Invalidate(); Invalidate();
} }
/// <summary>
/// 自定义主题风格
/// </summary>
[DefaultValue(false)] [DefaultValue(false)]
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
public bool StyleCustomMode { get; set; } public bool StyleCustomMode { get; set; }
public string Version => UIGlobal.Version; public string Version => UIGlobal.Version;
/// <summary>
/// Tag字符串
/// </summary>
[DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; } public string TagString { get; set; }
/// <summary> /// <summary>
/// 是否显示边框 /// 是否显示边框
/// </summary> /// </summary>
[Description("是否显示边框"), Category("自定义")] [Description("是否显示边框"), Category("SunnyUI")]
[DefaultValue(true)] [DefaultValue(true)]
public bool ShowRect public bool ShowRect
{ {
@ -355,7 +369,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 是否显示表格线 /// 是否显示表格线
/// </summary> /// </summary>
[Description("是否显示表格线"), Category("自定义")] [Description("是否显示表格线"), Category("SunnyUI")]
[DefaultValue(false)] [DefaultValue(false)]
public bool ShowGridLine public bool ShowGridLine
{ {
@ -365,7 +379,8 @@ namespace Sunny.UI
private Color _rectColor = UIColor.Blue; private Color _rectColor = UIColor.Blue;
[Category("Appearance"), Description("The border color used to paint the control.")] [DefaultValue(typeof(Color), "80, 160, 255")]
[Description("边框颜色"), Category("SunnyUI")]
public Color RectColor public Color RectColor
{ {
get => _rectColor; get => _rectColor;

View File

@ -86,6 +86,7 @@ namespace Sunny.UI
ItemForm = new UIDropDown(item); ItemForm = new UIDropDown(item);
} }
[Description("选中日期"), Category("SunnyUI")]
public DateTime Value public DateTime Value
{ {
get => item.Date; get => item.Date;
@ -106,7 +107,7 @@ namespace Sunny.UI
private string dateFormat = "yyyy-MM-dd"; private string dateFormat = "yyyy-MM-dd";
[Description("日期格式化掩码"), Category("自定义")] [Description("日期格式化掩码"), Category("SunnyUI")]
[DefaultValue("yyyy-MM-dd")] [DefaultValue("yyyy-MM-dd")]
public string DateFormat public string DateFormat
{ {

View File

@ -105,6 +105,7 @@ namespace Sunny.UI
ItemForm = new UIDropDown(item); ItemForm = new UIDropDown(item);
} }
[Description("选中日期时间"), Category("SunnyUI")]
public DateTime Value public DateTime Value
{ {
get => item.Date; get => item.Date;

View File

@ -42,6 +42,7 @@ namespace Sunny.UI
private double _value = 0; private double _value = 0;
[DefaultValue(0)] [DefaultValue(0)]
[Description("选中数值"), Category("SunnyUI")]
public double Value public double Value
{ {
get => _value; get => _value;
@ -55,11 +56,13 @@ namespace Sunny.UI
} }
[DefaultValue(1)] [DefaultValue(1)]
[Description("小数位数"), Category("SunnyUI")]
public int Decimal { get; set; } = 1; public int Decimal { get; set; } = 1;
private double step = 0.1; private double step = 0.1;
[DefaultValue(0.1)] [DefaultValue(0.1)]
[Description("步进值"), Category("SunnyUI")]
public double Step public double Step
{ {
get => step; get => step;
@ -83,6 +86,7 @@ namespace Sunny.UI
private double _minimum = double.MinValue; private double _minimum = double.MinValue;
[DefaultValue(double.MaxValue)] [DefaultValue(double.MaxValue)]
[Description("最大值"), Category("SunnyUI")]
public double Maximum public double Maximum
{ {
get => _maximum; get => _maximum;
@ -98,6 +102,7 @@ namespace Sunny.UI
} }
[DefaultValue(double.MinValue)] [DefaultValue(double.MinValue)]
[Description("最小值"), Category("SunnyUI")]
public double Minimum public double Minimum
{ {
get => _minimum; get => _minimum;
@ -133,6 +138,7 @@ namespace Sunny.UI
private bool hasMinimum; private bool hasMinimum;
[DefaultValue(false)] [DefaultValue(false)]
[Description("检查最大值"), Category("SunnyUI")]
public bool HasMaximum public bool HasMaximum
{ {
get => hasMaximum; get => hasMaximum;
@ -148,6 +154,7 @@ namespace Sunny.UI
} }
[DefaultValue(false)] [DefaultValue(false)]
[Description("检查最小值"), Category("SunnyUI")]
public bool HasMinimum public bool HasMinimum
{ {
get => hasMinimum; get => hasMinimum;

View File

@ -72,12 +72,12 @@ namespace Sunny.UI
{ {
EnterKeyPress?.Invoke(this, e); EnterKeyPress?.Invoke(this, e);
} }
if (EnterAsTab) if (EnterAsTab)
{ {
SendKeys.Send("{tab}"); SendKeys.Send("{tab}");
} }
e.Handled = true; e.Handled = true;
} }
@ -122,7 +122,7 @@ namespace Sunny.UI
public event EventHandler EnterKeyPress; public event EventHandler EnterKeyPress;
[DefaultValue(false), Category("Appearance"), Description("整型、浮点型可以为空")] [DefaultValue(false), Category("SunnyUI"), Description("整型、浮点型可以为空")]
public bool CanEmpty public bool CanEmpty
{ {
get => canEmpty; get => canEmpty;
@ -138,7 +138,7 @@ namespace Sunny.UI
[ [
DefaultValue(UITextBox.UIEditType.String), DefaultValue(UITextBox.UIEditType.String),
Category("Appearance"), Category("SunnyUI"),
Description("设置编辑框输入内容属性") Description("设置编辑框输入内容属性")
] ]
public UITextBox.UIEditType Type public UITextBox.UIEditType Type

View File

@ -71,6 +71,7 @@ namespace Sunny.UI
private int _titleTop = 16; private int _titleTop = 16;
[DefaultValue(16)] [DefaultValue(16)]
[Description("标题高度"), Category("SunnyUI")]
public int TitleTop public int TitleTop
{ {
get => _titleTop; get => _titleTop;
@ -79,7 +80,7 @@ namespace Sunny.UI
if (_titleTop != value) if (_titleTop != value)
{ {
_titleTop = value; _titleTop = value;
Padding = new Padding(0, value+16, 0, 0); Padding = new Padding(0, value + 16, 0, 0);
Invalidate(); Invalidate();
} }
} }
@ -88,6 +89,7 @@ namespace Sunny.UI
private int _titleInterval = 10; private int _titleInterval = 10;
[DefaultValue(10)] [DefaultValue(10)]
[Description("标题显示间隔"), Category("SunnyUI")]
public int TitleInterval public int TitleInterval
{ {
get => _titleInterval; get => _titleInterval;
@ -104,6 +106,7 @@ namespace Sunny.UI
public HorizontalAlignment titleAlignment = HorizontalAlignment.Left; public HorizontalAlignment titleAlignment = HorizontalAlignment.Left;
[DefaultValue(HorizontalAlignment.Left)] [DefaultValue(HorizontalAlignment.Left)]
[Description("文字显示位置"), Category("SunnyUI")]
public HorizontalAlignment TitleAlignment public HorizontalAlignment TitleAlignment
{ {
get => titleAlignment; get => titleAlignment;

View File

@ -398,8 +398,8 @@ namespace Sunny.UI
var rect_left = GetUpRect(); var rect_left = GetUpRect();
var rect_right = GetDownRect(); var rect_right = GetDownRect();
var rect_value = GetValueRect(); var rect_value = GetValueRect();
var rect_value_left = new Rectangle(rect_left.Right, 0, rect_value.Left - rect_left.Right, Height); var rect_value_left = new Rectangle(rect_left.Right, 0, rect_value.Left - rect_left.Right, Height);
var rect_value_right= new Rectangle(rect_value.Left, 0, rect_right.Left - rect_value.Right, Height); var rect_value_right = new Rectangle(rect_value.Left, 0, rect_right.Left - rect_value.Right, Height);
if (rect_left.Contains(x, y)) if (rect_left.Contains(x, y))
return 1; return 1;
else if (rect_right.Contains(x, y)) else if (rect_right.Contains(x, y))
@ -429,7 +429,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 字体颜色 /// 字体颜色
/// </summary> /// </summary>
[Description("字体颜色"), Category("自定义")] [Description("字体颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public override Color ForeColor public override Color ForeColor
{ {
@ -440,7 +440,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充 /// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("填充颜色"), Category("自定义")] [Description("填充颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "235, 243, 255")] [DefaultValue(typeof(Color), "235, 243, 255")]
public Color FillColor public Color FillColor
{ {

View File

@ -43,6 +43,13 @@ namespace Sunny.UI
private ContentAlignment textAlign = ContentAlignment.MiddleCenter; private ContentAlignment textAlign = ContentAlignment.MiddleCenter;
private Color foreColor = UIFontColor.Primary; private Color foreColor = UIFontColor.Primary;
/// <summary>
/// Tag字符串
/// </summary>
[DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; }
[Category("外观")] [Category("外观")]
[Description("按钮文字")] [Description("按钮文字")]
[Browsable(true)] [Browsable(true)]
@ -264,7 +271,7 @@ namespace Sunny.UI
public Point imageOffset; public Point imageOffset;
[DefaultValue(typeof(Point),"0, 0")] [DefaultValue(typeof(Point), "0, 0")]
public Point ImageOffset public Point ImageOffset
{ {
get => imageOffset; get => imageOffset;

View File

@ -279,7 +279,11 @@ namespace Sunny.UI
{ {
private UIScrollBar bar; private UIScrollBar bar;
/// <summary>
/// Tag字符串
/// </summary>
[DefaultValue(null)] [DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; } public string TagString { get; set; }
public UIScrollBar Bar public UIScrollBar Bar
@ -337,7 +341,11 @@ namespace Sunny.UI
e.ItemHeight = e.ItemHeight + ItemHeight; e.ItemHeight = e.ItemHeight + ItemHeight;
} }
/// <summary>
/// 自定义主题风格
/// </summary>
[DefaultValue(false)] [DefaultValue(false)]
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
public bool StyleCustomMode { get; set; } public bool StyleCustomMode { get; set; }
public string Version { get; } public string Version { get; }
@ -413,7 +421,10 @@ namespace Sunny.UI
} }
} }
[DefaultValue(UIStyle.Blue)] /// <summary>
/// 主题样式
/// </summary>
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
public UIStyle Style public UIStyle Style
{ {
get => _style; get => _style;
@ -436,7 +447,7 @@ namespace Sunny.UI
Invalidate(); Invalidate();
} }
[Category("Appearance"), Description("The border color used to paint the control.")] [Category("SunnyUI"), Description("The border color used to paint the control.")]
public Color ItemSelectBackColor public Color ItemSelectBackColor
{ {
get => _itemSelectBackColor; get => _itemSelectBackColor;
@ -452,7 +463,7 @@ namespace Sunny.UI
} }
} }
[Category("Appearance"), Description("The border color used to paint the control.")] [Category("SunnyUI"), Description("The border color used to paint the control.")]
public Color ItemSelectForeColor public Color ItemSelectForeColor
{ {
get => _itemSelectForeColor; get => _itemSelectForeColor;

View File

@ -42,6 +42,7 @@ namespace Sunny.UI
private int _value; private int _value;
[DefaultValue(0)] [DefaultValue(0)]
[Description("选中数值"), Category("SunnyUI")]
public int Value public int Value
{ {
get => _value; get => _value;
@ -57,6 +58,7 @@ namespace Sunny.UI
private int step = 1; private int step = 1;
[DefaultValue(1)] [DefaultValue(1)]
[Description("步进值"), Category("SunnyUI")]
public int Step public int Step
{ {
get => step; get => step;
@ -76,6 +78,7 @@ namespace Sunny.UI
private int _maximum = int.MaxValue; private int _maximum = int.MaxValue;
private int _minimum = int.MinValue; private int _minimum = int.MinValue;
[Description("最大值"), Category("SunnyUI")]
[DefaultValue(int.MaxValue)] [DefaultValue(int.MaxValue)]
public int Maximum public int Maximum
{ {
@ -91,6 +94,7 @@ namespace Sunny.UI
} }
} }
[Description("最小值"), Category("SunnyUI")]
[DefaultValue(int.MinValue)] [DefaultValue(int.MinValue)]
public int Minimum public int Minimum
{ {
@ -127,6 +131,7 @@ namespace Sunny.UI
private bool hasMinimum; private bool hasMinimum;
[DefaultValue(false)] [DefaultValue(false)]
[Description("检查最大值"), Category("SunnyUI")]
public bool HasMaximum public bool HasMaximum
{ {
get => hasMaximum; get => hasMaximum;
@ -142,6 +147,7 @@ namespace Sunny.UI
} }
[DefaultValue(false)] [DefaultValue(false)]
[Description("检查最小值"), Category("SunnyUI")]
public bool HasMinimum public bool HasMinimum
{ {
get => hasMinimum; get => hasMinimum;

View File

@ -47,13 +47,17 @@ namespace Sunny.UI
private Color foreColor = UIStyles.Blue.LabelForeColor; private Color foreColor = UIStyles.Blue.LabelForeColor;
/// <summary>
/// Tag字符串
/// </summary>
[DefaultValue(null)] [DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; } public string TagString { get; set; }
/// <summary> /// <summary>
/// 字体颜色 /// 字体颜色
/// </summary> /// </summary>
[Description("字体颜色"), Category("自定义")] [Description("字体颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "48, 48, 48")] [DefaultValue(typeof(Color), "48, 48, 48")]
public override Color ForeColor public override Color ForeColor
{ {
@ -73,7 +77,11 @@ namespace Sunny.UI
_style = style; _style = style;
} }
/// <summary>
/// 自定义主题风格
/// </summary>
[DefaultValue(false)] [DefaultValue(false)]
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
public bool StyleCustomMode { get; set; } public bool StyleCustomMode { get; set; }
public void SetStyleColor(UIBaseStyle uiColor) public void SetStyleColor(UIBaseStyle uiColor)
@ -86,7 +94,10 @@ namespace Sunny.UI
private UIStyle _style = UIStyle.Blue; private UIStyle _style = UIStyle.Blue;
[DefaultValue(UIStyle.Blue)] /// <summary>
/// 主题样式
/// </summary>
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
public UIStyle Style public UIStyle Style
{ {
get => _style; get => _style;
@ -132,7 +143,7 @@ namespace Sunny.UI
} }
} }
[Description("图标颜色"), Category("自定义")] [Description("图标颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "48, 48, 48")] [DefaultValue(typeof(Color), "48, 48, 48")]
public Color SymbolColor public Color SymbolColor
{ {
@ -147,7 +158,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 字体颜色 /// 字体颜色
/// </summary> /// </summary>
[Description("字体颜色"), Category("自定义")] [Description("字体颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "48, 48, 48")] [DefaultValue(typeof(Color), "48, 48, 48")]
public override Color ForeColor public override Color ForeColor
{ {
@ -335,12 +346,20 @@ namespace Sunny.UI
_style = UIStyle.Custom; _style = UIStyle.Custom;
} }
/// <summary>
/// Tag字符串
/// </summary>
[DefaultValue(null)] [DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; } public string TagString { get; set; }
public string Version { get; } public string Version { get; }
/// <summary>
/// 自定义主题风格
/// </summary>
[DefaultValue(false)] [DefaultValue(false)]
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
public bool StyleCustomMode { get; set; } public bool StyleCustomMode { get; set; }
public void SetStyle(UIStyle style) public void SetStyle(UIStyle style)
@ -360,7 +379,10 @@ namespace Sunny.UI
private UIStyle _style = UIStyle.Blue; private UIStyle _style = UIStyle.Blue;
[DefaultValue(UIStyle.Blue)] /// <summary>
/// 主题样式
/// </summary>
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
public UIStyle Style public UIStyle Style
{ {
get => _style; get => _style;

View File

@ -91,7 +91,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 字体颜色 /// 字体颜色
/// </summary> /// </summary>
[Description("字体颜色"), Category("自定义")] [Description("字体颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "48, 48, 48")] [DefaultValue(typeof(Color), "48, 48, 48")]
public override Color ForeColor public override Color ForeColor
{ {
@ -191,7 +191,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充 /// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("填充颜色"), Category("自定义")] [Description("填充颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "235, 243, 255")] [DefaultValue(typeof(Color), "235, 243, 255")]
public Color FillColor public Color FillColor
{ {
@ -202,7 +202,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("边框颜色"), Category("自定义")] [Description("边框颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public Color LineColor public Color LineColor
{ {

View File

@ -244,7 +244,11 @@ namespace Sunny.UI
{ {
private UIScrollBar bar; private UIScrollBar bar;
/// <summary>
/// Tag字符串
/// </summary>
[DefaultValue(null)] [DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; } public string TagString { get; set; }
public UIScrollBar Bar public UIScrollBar Bar
@ -302,7 +306,11 @@ namespace Sunny.UI
public string Version { get; } public string Version { get; }
/// <summary>
/// 自定义主题风格
/// </summary>
[DefaultValue(false)] [DefaultValue(false)]
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
public bool StyleCustomMode { get; set; } public bool StyleCustomMode { get; set; }
#region #region
@ -332,7 +340,10 @@ namespace Sunny.UI
private Color _itemSelectBackColor = UIColor.Blue; private Color _itemSelectBackColor = UIColor.Blue;
private Color _itemSelectForeColor = Color.White; private Color _itemSelectForeColor = Color.White;
[DefaultValue(UIStyle.Blue)] /// <summary>
/// 主题样式
/// </summary>
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
public UIStyle Style public UIStyle Style
{ {
get => _style; get => _style;
@ -341,25 +352,25 @@ namespace Sunny.UI
protected override void OnMouseWheel(MouseEventArgs e) protected override void OnMouseWheel(MouseEventArgs e)
{ {
/* base.OnMouseWheel(e); /* base.OnMouseWheel(e);
if (Bar.Visible) if (Bar.Visible)
{ {
var si = ScrollBarInfo.GetInfo(Handle); var si = ScrollBarInfo.GetInfo(Handle);
if (e.Delta > 10) if (e.Delta > 10)
{ {
if (si.nPos > 0) if (si.nPos > 0)
{ {
ScrollBarInfo.ScrollUp(Handle); ScrollBarInfo.ScrollUp(Handle);
} }
} }
else if (e.Delta < -10) else if (e.Delta < -10)
{ {
if (si.nPos < si.ScrollMax) if (si.nPos < si.ScrollMax)
{ {
ScrollBarInfo.ScrollDown(Handle); ScrollBarInfo.ScrollDown(Handle);
} }
} }
}*/ }*/
SetScrollInfo(); SetScrollInfo();
} }
@ -379,7 +390,7 @@ namespace Sunny.UI
Invalidate(); Invalidate();
} }
[Category("Appearance"), Description("The border color used to paint the control.")] [Category("SunnyUI"), Description("The border color used to paint the control.")]
public Color ItemSelectBackColor public Color ItemSelectBackColor
{ {
get => _itemSelectBackColor; get => _itemSelectBackColor;
@ -395,7 +406,7 @@ namespace Sunny.UI
} }
} }
[Category("Appearance"), Description("The border color used to paint the control.")] [Category("SunnyUI"), Description("The border color used to paint the control.")]
public Color ItemSelectForeColor public Color ItemSelectForeColor
{ {
get => _itemSelectForeColor; get => _itemSelectForeColor;

View File

@ -157,7 +157,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 字体颜色 /// 字体颜色
/// </summary> /// </summary>
[Description("字体颜色"), Category("自定义")] [Description("字体颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "48, 48, 48")] [DefaultValue(typeof(Color), "48, 48, 48")]
public override Color ForeColor public override Color ForeColor
{ {
@ -168,7 +168,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充 /// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("填充颜色"), Category("自定义")] [Description("填充颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public Color FillColor public Color FillColor
{ {

View File

@ -84,7 +84,11 @@ namespace Sunny.UI
node.ImageIndex = imageIndex; node.ImageIndex = imageIndex;
} }
/// <summary>
/// Tag字符串
/// </summary>
[DefaultValue(null)] [DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; } public string TagString { get; set; }
private UIMenuStyle _menuStyle = UIMenuStyle.Black; private UIMenuStyle _menuStyle = UIMenuStyle.Black;
@ -109,7 +113,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 字体颜色 /// 字体颜色
/// </summary> /// </summary>
[Description("字体颜色"), Category("自定义")] [Description("字体颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "Silver")] [DefaultValue(typeof(Color), "Silver")]
public override Color ForeColor public override Color ForeColor
{ {
@ -171,7 +175,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("选中Tab页高亮"), Category("自定义")] [Description("选中Tab页高亮"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public Color SelectedHighColor public Color SelectedHighColor
@ -187,7 +191,10 @@ namespace Sunny.UI
private UIStyle _style = UIStyle.Blue; private UIStyle _style = UIStyle.Blue;
[DefaultValue(UIStyle.Blue)] /// <summary>
/// 主题样式
/// </summary>
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
public UIStyle Style public UIStyle Style
{ {
get => _style; get => _style;
@ -513,7 +520,11 @@ namespace Sunny.UI
Invalidate(); Invalidate();
} }
/// <summary>
/// 自定义主题风格
/// </summary>
[DefaultValue(false)] [DefaultValue(false)]
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
public bool StyleCustomMode { get; set; } public bool StyleCustomMode { get; set; }
public string Version { get; } public string Version { get; }

View File

@ -74,7 +74,11 @@ namespace Sunny.UI
[DefaultValue(false)] [DefaultValue(false)]
public bool ShowOneNode { get; set; } public bool ShowOneNode { get; set; }
/// <summary>
/// Tag字符串
/// </summary>
[DefaultValue(null)] [DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; } public string TagString { get; set; }
protected override void OnBackColorChanged(EventArgs e) protected override void OnBackColorChanged(EventArgs e)
@ -104,7 +108,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充 /// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("背景颜色"), Category("自定义")] [Description("背景颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "56, 56, 56")] [DefaultValue(typeof(Color), "56, 56, 56")]
public Color FillColor public Color FillColor
{ {
@ -125,7 +129,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充 /// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("背景颜色"), Category("自定义")] [Description("背景颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "Silver")] [DefaultValue(typeof(Color), "Silver")]
public override Color ForeColor public override Color ForeColor
{ {
@ -152,7 +156,11 @@ namespace Sunny.UI
ScrollBarInfo.SetScrollValue(Handle, Bar.Value); ScrollBarInfo.SetScrollValue(Handle, Bar.Value);
} }
/// <summary>
/// 自定义主题风格
/// </summary>
[DefaultValue(false)] [DefaultValue(false)]
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
public bool StyleCustomMode { get; set; } public bool StyleCustomMode { get; set; }
[DefaultValue(null)] [DefaultValue(null)]
@ -162,7 +170,7 @@ namespace Sunny.UI
private bool showTips; private bool showTips;
[Description("是否显示角标"), Category("自定义")] [Description("是否显示角标"), Category("SunnyUI")]
[DefaultValue(false)] [DefaultValue(false)]
public bool ShowTips public bool ShowTips
{ {
@ -179,7 +187,7 @@ namespace Sunny.UI
private Font tipsFont = new Font("Microsoft Sans Serif", 9); private Font tipsFont = new Font("Microsoft Sans Serif", 9);
[Description("角标文字字体"), Category("自定义")] [Description("角标文字字体"), Category("SunnyUI")]
[DefaultValue(typeof(Font), "Microsoft Sans Serif, 9pt")] [DefaultValue(typeof(Font), "Microsoft Sans Serif, 9pt")]
public Font TipsFont public Font TipsFont
{ {
@ -214,7 +222,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("选中Tab页高亮"), Category("自定义")] [Description("选中Tab页高亮"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public Color SelectedHighColor public Color SelectedHighColor
@ -243,7 +251,10 @@ namespace Sunny.UI
private UIStyle _style = UIStyle.Blue; private UIStyle _style = UIStyle.Blue;
[DefaultValue(UIStyle.Blue)] /// <summary>
/// 主题样式
/// </summary>
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
public UIStyle Style public UIStyle Style
{ {
get => _style; get => _style;

View File

@ -58,7 +58,11 @@ namespace Sunny.UI
base.Font = UIFontColor.Font; base.Font = UIFontColor.Font;
} }
/// <summary>
/// Tag字符串
/// </summary>
[DefaultValue(null)] [DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; } public string TagString { get; set; }
private string text; private string text;
@ -168,11 +172,11 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 是否显示圆角 /// 是否显示圆角
/// </summary> /// </summary>
[Description("是否显示圆角"), Category("自定义")] [Description("是否显示圆角"), Category("SunnyUI")]
protected bool ShowRadius => (int)RadiusSides > 0; protected bool ShowRadius => (int)RadiusSides > 0;
//圆角角度 //圆角角度
[Description("圆角角度"), Category("自定义")] [Description("圆角角度"), Category("SunnyUI")]
[DefaultValue(5)] [DefaultValue(5)]
public int Radius public int Radius
{ {
@ -194,14 +198,14 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 是否显示边框 /// 是否显示边框
/// </summary> /// </summary>
[Description("是否显示边框"), Category("自定义")] [Description("是否显示边框"), Category("SunnyUI")]
[DefaultValue(true)] [DefaultValue(true)]
protected bool ShowRect => (int)RectSides > 0; protected bool ShowRect => (int)RectSides > 0;
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("边框颜色"), Category("自定义")] [Description("边框颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public Color RectColor public Color RectColor
{ {
@ -225,7 +229,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充 /// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("填充颜色,当值为背景色或透明色或空值则不填充"), Category("自定义")] [Description("填充颜色,当值为背景色或透明色或空值则不填充"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "235, 243, 255")] [DefaultValue(typeof(Color), "235, 243, 255")]
public Color FillColor public Color FillColor
{ {
@ -457,12 +461,19 @@ namespace Sunny.UI
{ {
} }
/// <summary>
/// 自定义主题风格
/// </summary>
[DefaultValue(false)] [DefaultValue(false)]
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
public bool StyleCustomMode { get; set; } public bool StyleCustomMode { get; set; }
protected UIStyle _style = UIStyle.Blue; protected UIStyle _style = UIStyle.Blue;
[DefaultValue(UIStyle.Blue)] /// <summary>
/// 主题样式
/// </summary>
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
public UIStyle Style public UIStyle Style
{ {
get => _style; get => _style;
@ -494,7 +505,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 字体颜色 /// 字体颜色
/// </summary> /// </summary>
[Description("字体颜色"), Category("自定义")] [Description("字体颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "48, 48, 48")] [DefaultValue(typeof(Color), "48, 48, 48")]
public override Color ForeColor public override Color ForeColor
{ {
@ -581,7 +592,7 @@ namespace Sunny.UI
if (_textAlignment != value) if (_textAlignment != value)
{ {
_textAlignment = value; _textAlignment = value;
TextAlignmentChange?.Invoke(this,value); TextAlignmentChange?.Invoke(this, value);
Invalidate(); Invalidate();
} }
} }

View File

@ -166,7 +166,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充 /// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("填充颜色"), Category("自定义")] [Description("填充颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "235, 243, 255")] [DefaultValue(typeof(Color), "235, 243, 255")]
public Color FillColor public Color FillColor
{ {
@ -177,7 +177,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 字体颜色 /// 字体颜色
/// </summary> /// </summary>
[Description("字体颜色"), Category("自定义")] [Description("字体颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public override Color ForeColor public override Color ForeColor
{ {
@ -188,7 +188,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("边框颜色"), Category("自定义")] [Description("边框颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public Color RectColor public Color RectColor
{ {

View File

@ -139,7 +139,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 字体颜色 /// 字体颜色
/// </summary> /// </summary>
[Description("字体颜色"), Category("自定义")] [Description("字体颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public override Color ForeColor public override Color ForeColor
{ {

View File

@ -54,7 +54,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 字体颜色 /// 字体颜色
/// </summary> /// </summary>
[Description("字体颜色"), Category("自定义")] [Description("字体颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "48, 48, 48")] [DefaultValue(typeof(Color), "48, 48, 48")]
public override Color ForeColor public override Color ForeColor
{ {
@ -199,7 +199,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充 /// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("填充颜色"), Category("自定义")] [Description("填充颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public Color RadioButtonColor public Color RadioButtonColor
{ {

View File

@ -434,7 +434,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 字体颜色 /// 字体颜色
/// </summary> /// </summary>
[Description("字体颜色"), Category("自定义")] [Description("字体颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public override Color ForeColor public override Color ForeColor
{ {
@ -445,7 +445,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充 /// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("填充颜色"), Category("自定义")] [Description("填充颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "235, 243, 255")] [DefaultValue(typeof(Color), "235, 243, 255")]
public Color FillColor public Color FillColor
{ {

View File

@ -37,13 +37,13 @@ namespace Sunny.UI
timer.Stop(); timer.Stop();
} }
[DefaultValue(200),Description("刷新间隔")] [DefaultValue(200), Description("刷新间隔")]
public int Interval public int Interval
{ {
get => interval; get => interval;
set set
{ {
interval = Math.Max(value,50); interval = Math.Max(value, 50);
timer.Stop(); timer.Stop();
timer.Interval = interval; timer.Interval = interval;
timer.Start(); timer.Start();
@ -52,12 +52,12 @@ namespace Sunny.UI
private int offset = 10; private int offset = 10;
[DefaultValue(10),Description("偏移量")] [DefaultValue(10), Description("偏移量")]
public int Offset public int Offset
{ {
get => offset; get => offset;
set => offset = Math.Max(2, value); set => offset = Math.Max(2, value);
} }
private void Timer_Tick(object sender, EventArgs e) private void Timer_Tick(object sender, EventArgs e)
{ {
@ -204,7 +204,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充 /// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("填充颜色"), Category("自定义")] [Description("填充颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public Color FillColor public Color FillColor
{ {
@ -215,7 +215,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 字体颜色 /// 字体颜色
/// </summary> /// </summary>
[Description("字体颜色"), Category("自定义")] [Description("字体颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "White")] [DefaultValue(typeof(Color), "White")]
public override Color ForeColor public override Color ForeColor
{ {
@ -247,7 +247,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("边框颜色"), Category("自定义")] [Description("边框颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public Color RectColor public Color RectColor
{ {

View File

@ -50,7 +50,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 字体颜色 /// 字体颜色
/// </summary> /// </summary>
[Description("字体颜色"), Category("自定义")] [Description("字体颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "White")] [DefaultValue(typeof(Color), "White")]
public override Color ForeColor public override Color ForeColor
{ {
@ -114,7 +114,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充 /// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("填充颜色"), Category("自定义")] [Description("填充颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "White")] [DefaultValue(typeof(Color), "White")]
public Color ButtonColor public Color ButtonColor
{ {
@ -125,7 +125,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("选中颜色"), Category("自定义")] [Description("选中颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public Color ActiveColor public Color ActiveColor
{ {

View File

@ -111,10 +111,18 @@ namespace Sunny.UI
private Color _fillColor = UIColor.LightBlue; private Color _fillColor = UIColor.LightBlue;
private Color tabBackColor = Color.FromArgb(56, 56, 56); private Color tabBackColor = Color.FromArgb(56, 56, 56);
/// <summary>
/// Tag字符串
/// </summary>
[DefaultValue(null)] [DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; } public string TagString { get; set; }
/// <summary>
/// 自定义主题风格
/// </summary>
[DefaultValue(false)] [DefaultValue(false)]
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
public bool StyleCustomMode { get; set; } public bool StyleCustomMode { get; set; }
private HorizontalAlignment textAlignment = HorizontalAlignment.Center; private HorizontalAlignment textAlignment = HorizontalAlignment.Center;
@ -158,7 +166,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 当使用边框时填充颜色,当值为背景色或透明色或空值则不填充 /// 当使用边框时填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("当使用边框时填充颜色,当值为背景色或透明色或空值则不填充"), Category("自定义")] [Description("当使用边框时填充颜色,当值为背景色或透明色或空值则不填充"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "235, 243, 255")] [DefaultValue(typeof(Color), "235, 243, 255")]
public Color FillColor public Color FillColor
{ {
@ -175,7 +183,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("边框颜色"), Category("自定义")] [Description("边框颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "56, 56, 56")] [DefaultValue(typeof(Color), "56, 56, 56")]
public Color TabBackColor public Color TabBackColor
{ {
@ -193,7 +201,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("选中Tab页背景色"), Category("自定义")] [Description("选中Tab页背景色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "36, 36, 36")] [DefaultValue(typeof(Color), "36, 36, 36")]
public Color TabSelectedColor public Color TabSelectedColor
{ {
@ -211,7 +219,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("选中Tab页字体色"), Category("自定义")] [Description("选中Tab页字体色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public Color TabSelectedForeColor public Color TabSelectedForeColor
{ {
@ -229,7 +237,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("未选中Tab页字体色"), Category("自定义")] [Description("未选中Tab页字体色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "240, 240, 240")] [DefaultValue(typeof(Color), "240, 240, 240")]
public Color TabUnSelectedForeColor public Color TabUnSelectedForeColor
{ {
@ -247,7 +255,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("选中Tab页高亮"), Category("自定义")] [Description("选中Tab页高亮"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public Color TabSelectedHighColor public Color TabSelectedHighColor
@ -263,7 +271,10 @@ namespace Sunny.UI
private UIStyle _style = UIStyle.Blue; private UIStyle _style = UIStyle.Blue;
[DefaultValue(UIStyle.Blue)] /// <summary>
/// 主题样式
/// </summary>
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
public UIStyle Style public UIStyle Style
{ {
get => _style; get => _style;
@ -345,7 +356,7 @@ namespace Sunny.UI
private bool showCloseButton; private bool showCloseButton;
[DefaultValue(false),Description("所有Tab页面标题显示关闭按钮")] [DefaultValue(false), Description("所有Tab页面标题显示关闭按钮")]
public bool ShowCloseButton public bool ShowCloseButton
{ {
get => showCloseButton; get => showCloseButton;

View File

@ -20,7 +20,6 @@
******************************************************************************/ ******************************************************************************/
using System; using System;
using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Drawing; using System.Drawing;
@ -42,10 +41,18 @@ namespace Sunny.UI
Version = UIGlobal.Version; Version = UIGlobal.Version;
} }
/// <summary>
/// 自定义主题风格
/// </summary>
[DefaultValue(false)] [DefaultValue(false)]
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
public bool StyleCustomMode { get; set; } public bool StyleCustomMode { get; set; }
/// <summary>
/// Tag字符串
/// </summary>
[DefaultValue(null)] [DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; } public string TagString { get; set; }
public string Version { get; } public string Version { get; }
@ -68,7 +75,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 当使用边框时填充颜色,当值为背景色或透明色或空值则不填充 /// 当使用边框时填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("当使用边框时填充颜色,当值为背景色或透明色或空值则不填充"), Category("自定义")] [Description("当使用边框时填充颜色,当值为背景色或透明色或空值则不填充"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "235, 243, 255")] [DefaultValue(typeof(Color), "235, 243, 255")]
public Color FillColor public Color FillColor
{ {
@ -85,7 +92,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("边框颜色"), Category("自定义")] [Description("边框颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "56, 56, 56")] [DefaultValue(typeof(Color), "56, 56, 56")]
public Color TabBackColor public Color TabBackColor
{ {
@ -103,7 +110,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("选中Tab页背景色"), Category("自定义")] [Description("选中Tab页背景色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "36, 36, 36")] [DefaultValue(typeof(Color), "36, 36, 36")]
public Color TabSelectedColor public Color TabSelectedColor
{ {
@ -121,7 +128,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("选中Tab页字体色"), Category("自定义")] [Description("选中Tab页字体色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public Color TabSelectedForeColor public Color TabSelectedForeColor
{ {
@ -139,7 +146,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("未选中Tab页字体色"), Category("自定义")] [Description("未选中Tab页字体色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "Silver")] [DefaultValue(typeof(Color), "Silver")]
public Color TabUnSelectedForeColor public Color TabUnSelectedForeColor
{ {
@ -157,7 +164,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("选中Tab页高亮"), Category("自定义")] [Description("选中Tab页高亮"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public Color TabSelectedHighColor public Color TabSelectedHighColor
@ -173,7 +180,10 @@ namespace Sunny.UI
private UIStyle _style = UIStyle.Blue; private UIStyle _style = UIStyle.Blue;
[DefaultValue(UIStyle.Blue)] /// <summary>
/// 主题样式
/// </summary>
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
public UIStyle Style public UIStyle Style
{ {
get => _style; get => _style;

View File

@ -80,12 +80,12 @@ namespace Sunny.UI
private void Edit_Leave(object sender, EventArgs e) private void Edit_Leave(object sender, EventArgs e)
{ {
Leave?.Invoke(sender,e); Leave?.Invoke(sender, e);
} }
private void UITextBox_TextAlignmentChange(object sender, ContentAlignment alignment) private void UITextBox_TextAlignmentChange(object sender, ContentAlignment alignment)
{ {
if (edit==null) return; if (edit == null) return;
if (alignment == ContentAlignment.TopLeft || alignment == ContentAlignment.MiddleLeft || if (alignment == ContentAlignment.TopLeft || alignment == ContentAlignment.MiddleLeft ||
alignment == ContentAlignment.BottomLeft) alignment == ContentAlignment.BottomLeft)
edit.TextAlign = HorizontalAlignment.Left; edit.TextAlign = HorizontalAlignment.Left;
@ -101,7 +101,7 @@ namespace Sunny.UI
private void Edit_DoubleClick(object sender, EventArgs e) private void Edit_DoubleClick(object sender, EventArgs e)
{ {
DoubleClick?.Invoke(this,e); DoubleClick?.Invoke(this, e);
} }
public new event EventHandler DoubleClick; public new event EventHandler DoubleClick;
@ -109,7 +109,7 @@ namespace Sunny.UI
private void Edit_Click(object sender, EventArgs e) private void Edit_Click(object sender, EventArgs e)
{ {
Click?.Invoke(this,e); Click?.Invoke(this, e);
} }
protected override void OnCursorChanged(EventArgs e) protected override void OnCursorChanged(EventArgs e)
@ -247,7 +247,7 @@ namespace Sunny.UI
public new event KeyPressEventHandler KeyPress; public new event KeyPressEventHandler KeyPress;
public new event EventHandler Leave; public new event EventHandler Leave;
private void EditTextChanged(object s, EventArgs e) private void EditTextChanged(object s, EventArgs e)
{ {
@ -362,7 +362,7 @@ namespace Sunny.UI
} }
} }
[Description("输入类型"), Category("自定义")] [Description("输入类型"), Category("SunnyUI")]
[DefaultValue(UIEditType.String)] [DefaultValue(UIEditType.String)]
public UIEditType Type public UIEditType Type
{ {

View File

@ -102,6 +102,7 @@ namespace Sunny.UI
ItemForm = new UIDropDown(item); ItemForm = new UIDropDown(item);
} }
[Description("选中时间"), Category("SunnyUI")]
public DateTime Value public DateTime Value
{ {
get => item.Time; get => item.Time;
@ -114,7 +115,7 @@ namespace Sunny.UI
private string timeFormat = "HH:mm:ss"; private string timeFormat = "HH:mm:ss";
[Description("时间格式化掩码"), Category("自定义")] [Description("时间格式化掩码"), Category("SunnyUI")]
[DefaultValue("HH:mm:ss")] [DefaultValue("HH:mm:ss")]
public string TimeFormat public string TimeFormat
{ {

View File

@ -33,7 +33,7 @@ namespace Sunny.UI
{ {
private int _titleHeight = 35; private int _titleHeight = 35;
[Description("面板高度"), Category("自定义")] [Description("面板高度"), Category("SunnyUI")]
[DefaultValue(35)] [DefaultValue(35)]
public int TitleHeight public int TitleHeight
{ {

View File

@ -171,7 +171,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充 /// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("填充颜色"), Category("自定义")] [Description("填充颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "235, 243, 255")] [DefaultValue(typeof(Color), "235, 243, 255")]
public Color FillColor public Color FillColor
{ {
@ -182,7 +182,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 字体颜色 /// 字体颜色
/// </summary> /// </summary>
[Description("字体颜色"), Category("自定义")] [Description("字体颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public override Color ForeColor public override Color ForeColor
{ {
@ -193,7 +193,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("边框颜色"), Category("自定义")] [Description("边框颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public Color RectColor public Color RectColor
{ {

View File

@ -147,7 +147,11 @@ namespace Sunny.UI
} }
} }
/// <summary>
/// Tag字符串
/// </summary>
[DefaultValue(null)] [DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; } public string TagString { get; set; }
/// <summary> /// <summary>
@ -271,7 +275,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 标题栏高度 /// 标题栏高度
/// </summary> /// </summary>
[Description("标题栏高度"), Category("Appearance"), DefaultValue(35)] [Description("标题栏高度"), Category("SunnyUI"), DefaultValue(35)]
public int TitleHeight public int TitleHeight
{ {
get => titleHeight; get => titleHeight;
@ -292,7 +296,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 标题栏颜色 /// 标题栏颜色
/// </summary> /// </summary>
[Description("标题栏颜色"), Category("Appearance"), DefaultValue(typeof(Color), "80, 160, 255")] [Description("标题栏颜色"), Category("SunnyUI"), DefaultValue(typeof(Color), "80, 160, 255")]
public Color TitleColor public Color TitleColor
{ {
get => titleColor; get => titleColor;
@ -312,7 +316,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 标题颜色 /// 标题颜色
/// </summary> /// </summary>
[Description("标题前景色(标题颜色)"), Category("Appearance"), DefaultValue(typeof(Color), "White")] [Description("标题前景色(标题颜色)"), Category("SunnyUI"), DefaultValue(typeof(Color), "White")]
public Color TitleForeColor public Color TitleForeColor
{ {
get => titleForeColor; get => titleForeColor;
@ -413,7 +417,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充 /// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("背景颜色"), Category("Appearance")] [Description("背景颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "48, 48, 48")] [DefaultValue(typeof(Color), "48, 48, 48")]
public override Color ForeColor public override Color ForeColor
{ {
@ -434,7 +438,7 @@ namespace Sunny.UI
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
/// <value>The color of the border style.</value> /// <value>The color of the border style.</value>
[Description("边框颜色"), Category("Appearance")] [Description("边框颜色"), Category("SunnyUI")]
public Color RectColor public Color RectColor
{ {
get => rectColor; get => rectColor;
@ -909,7 +913,7 @@ namespace Sunny.UI
} }
else else
{ {
e.Graphics.DrawString(Text, Font, titleForeColor,6 + (ShowIcon && Icon != null ? 26 : 0), (TitleHeight - sf.Height) / 2); e.Graphics.DrawString(Text, Font, titleForeColor, 6 + (ShowIcon && Icon != null ? 26 : 0), (TitleHeight - sf.Height) / 2);
} }
} }
@ -924,7 +928,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 配色主题 /// 配色主题
/// </summary> /// </summary>
[Description("配色主题"), Category("Appearance")] [Description("配色主题"), Category("SunnyUI")]
[DefaultValue(UIStyle.Blue)] [DefaultValue(UIStyle.Blue)]
public UIStyle Style public UIStyle Style
{ {
@ -932,7 +936,7 @@ namespace Sunny.UI
set => SetStyle(value); set => SetStyle(value);
} }
[Description("自定义主题模式(开启后全局主题更改将对当前窗体无效)"), Category("Appearance")] [Description("自定义主题模式(开启后全局主题更改将对当前窗体无效)"), Category("SunnyUI")]
[DefaultValue(false)] [DefaultValue(false)]
public bool StyleCustomMode { get; set; } public bool StyleCustomMode { get; set; }
@ -1012,7 +1016,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 是否显示圆角 /// 是否显示圆角
/// </summary> /// </summary>
[Description("是否显示圆角"), Category("Appearance")] [Description("是否显示圆角"), Category("SunnyUI")]
[DefaultValue(true)] [DefaultValue(true)]
public bool ShowRadius public bool ShowRadius
{ {
@ -1033,7 +1037,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 是否显示边框 /// 是否显示边框
/// </summary> /// </summary>
[Description("是否显示边框"), Category("Appearance")] [Description("是否显示边框"), Category("SunnyUI")]
[DefaultValue(true)] [DefaultValue(true)]
public bool ShowRect public bool ShowRect
{ {
@ -1183,7 +1187,7 @@ namespace Sunny.UI
} }
} }
[Description("文字对齐方式"), Category("Appearance")] [Description("文字对齐方式"), Category("SunnyUI")]
public StringAlignment TextAlignment public StringAlignment TextAlignment
{ {
get => textAlignment; get => textAlignment;

View File

@ -97,7 +97,7 @@ namespace Sunny.UI
} }
} }
[DefaultValue(false),Description("在Frame框架中不被关闭")] [DefaultValue(false), Description("在Frame框架中不被关闭")]
public bool AlwaysOpen { get; set; } public bool AlwaysOpen { get; set; }
protected virtual void SymbolChange() protected virtual void SymbolChange()
@ -160,18 +160,31 @@ namespace Sunny.UI
} }
} }
[DefaultValue(null)] public string TagString { get; set; } /// <summary>
/// Tag字符串
/// </summary>
[DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; }
public string Version { get; } public string Version { get; }
[DefaultValue(UIStyle.Blue)] /// <summary>
/// 主题样式
/// </summary>
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
public UIStyle Style public UIStyle Style
{ {
get => _style; get => _style;
set => SetStyle(value); set => SetStyle(value);
} }
[DefaultValue(false)] public bool StyleCustomMode { get; set; } /// <summary>
/// 自定义主题风格
/// </summary>
[DefaultValue(false)]
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
public bool StyleCustomMode { get; set; }
public event EventHandler Initialize; public event EventHandler Initialize;

View File

@ -61,7 +61,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充 /// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("标题颜色"), Category("自定义")] [Description("标题颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "76, 76, 76")] [DefaultValue(typeof(Color), "76, 76, 76")]
public Color TitleFillColor public Color TitleFillColor
{ {
@ -76,7 +76,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 字体颜色 /// 字体颜色
/// </summary> /// </summary>
[Description("字体颜色"), Category("自定义")] [Description("字体颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "White")] [DefaultValue(typeof(Color), "White")]
public Color TitleForeColor public Color TitleForeColor
{ {
@ -100,7 +100,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充 /// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("填充颜色"), Category("自定义")] [Description("填充颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "76, 76, 76")] [DefaultValue(typeof(Color), "76, 76, 76")]
public Color FillColor public Color FillColor
{ {
@ -111,7 +111,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 字体颜色 /// 字体颜色
/// </summary> /// </summary>
[Description("字体颜色"), Category("自定义")] [Description("字体颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "White")] [DefaultValue(typeof(Color), "White")]
public override Color ForeColor public override Color ForeColor
{ {

View File

@ -31,7 +31,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 主题样式 /// 主题样式
/// </summary> /// </summary>
[DefaultValue(UIStyle.Blue)] [DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
public UIStyle Style public UIStyle Style
{ {
get => UIStyles.Style; get => UIStyles.Style;