diff --git a/Bin/SunnyUI.dll b/Bin/SunnyUI.dll index 6ebf8dd6..9ac75265 100644 Binary files a/Bin/SunnyUI.dll and b/Bin/SunnyUI.dll differ diff --git a/Bin/SunnyUI.pdb b/Bin/SunnyUI.pdb index 136f0e4b..ce6665cd 100644 Binary files a/Bin/SunnyUI.pdb and b/Bin/SunnyUI.pdb differ diff --git a/SunnyUI.Demo/Bin/SunnyUI.Demo.exe b/SunnyUI.Demo/Bin/SunnyUI.Demo.exe index 1ec5f41d..16d251cd 100644 Binary files a/SunnyUI.Demo/Bin/SunnyUI.Demo.exe and b/SunnyUI.Demo/Bin/SunnyUI.Demo.exe differ diff --git a/SunnyUI.Demo/Bin/SunnyUI.dll b/SunnyUI.Demo/Bin/SunnyUI.dll index 6ebf8dd6..9ac75265 100644 Binary files a/SunnyUI.Demo/Bin/SunnyUI.dll and b/SunnyUI.Demo/Bin/SunnyUI.dll differ diff --git a/SunnyUI.Demo/Controls/FCombobox.Designer.cs b/SunnyUI.Demo/Controls/FCombobox.Designer.cs index c9f0d274..7cc8b0f8 100644 --- a/SunnyUI.Demo/Controls/FCombobox.Designer.cs +++ b/SunnyUI.Demo/Controls/FCombobox.Designer.cs @@ -73,10 +73,13 @@ this.uiDatetimePicker1.Font = new System.Drawing.Font("微软雅黑", 12F); this.uiDatetimePicker1.Location = new System.Drawing.Point(388, 136); 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.Name = "uiDatetimePicker1"; this.uiDatetimePicker1.Padding = new System.Windows.Forms.Padding(0, 0, 30, 0); this.uiDatetimePicker1.Size = new System.Drawing.Size(306, 29); + this.uiDatetimePicker1.SymbolDropDown = 61555; + this.uiDatetimePicker1.SymbolNormal = 61555; this.uiDatetimePicker1.TabIndex = 41; this.uiDatetimePicker1.Text = "2020-06-02 17:57:28"; this.uiDatetimePicker1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; @@ -127,6 +130,7 @@ this.uiTimePicker1.Font = new System.Drawing.Font("微软雅黑", 12F); this.uiTimePicker1.Location = new System.Drawing.Point(188, 136); 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.Name = "uiTimePicker1"; 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.Location = new System.Drawing.Point(30, 136); 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.Name = "uiDatePicker1"; this.uiDatePicker1.Padding = new System.Windows.Forms.Padding(0, 0, 30, 0); diff --git a/SunnyUI/Charts/UIChart.cs b/SunnyUI/Charts/UIChart.cs index 92608b5b..c725bc0e 100644 --- a/SunnyUI/Charts/UIChart.cs +++ b/SunnyUI/Charts/UIChart.cs @@ -88,7 +88,7 @@ namespace Sunny.UI /// 字体颜色 /// [Description("字体颜色")] - [Category("自定义")] + [Category("SunnyUI")] [DefaultValue(typeof(Color), "White")] public override Color ForeColor { @@ -100,7 +100,7 @@ namespace Sunny.UI /// 填充颜色,当值为背景色或透明色或空值则不填充 /// [Description("填充颜色")] - [Category("自定义")] + [Category("SunnyUI")] [DefaultValue(typeof(Color), "235, 243, 255")] public Color FillColor { diff --git a/SunnyUI/Controls/Color/UIColorWheel.cs b/SunnyUI/Controls/Color/UIColorWheel.cs index b908a9d7..a93e6fa3 100644 --- a/SunnyUI/Controls/Color/UIColorWheel.cs +++ b/SunnyUI/Controls/Color/UIColorWheel.cs @@ -270,7 +270,7 @@ namespace Sunny.UI /// /// ʽ /// - [DefaultValue(UIStyle.Blue)] + [DefaultValue(UIStyle.Blue), Description("ʽ"), Category("SunnyUI")] public UIStyle Style { get => _style; @@ -299,10 +299,20 @@ namespace Sunny.UI Invalidate(); } + /// + /// Զ + /// + [DefaultValue(false)] + [Description("ȡÿԶ"), Category("SunnyUI")] public bool StyleCustomMode { get; set; } public string Version { get; } + /// + /// Tagַ + /// + [DefaultValue(null)] + [Description("ȡðйؿؼݵĶַ"), Category("SunnyUI")] public string TagString { get; set; } } } \ No newline at end of file diff --git a/SunnyUI/Controls/Color/UILabelRotate.cs b/SunnyUI/Controls/Color/UILabelRotate.cs index f3716747..bdf9236b 100644 --- a/SunnyUI/Controls/Color/UILabelRotate.cs +++ b/SunnyUI/Controls/Color/UILabelRotate.cs @@ -190,7 +190,7 @@ namespace Sunny.UI /// /// ʽ /// - [DefaultValue(UIStyle.Blue)] + [DefaultValue(UIStyle.Blue), Description("ʽ"), Category("SunnyUI")] public UIStyle Style { get => _style; @@ -219,10 +219,20 @@ namespace Sunny.UI Invalidate(); } + /// + /// Զ + /// + [DefaultValue(false)] + [Description("ȡÿԶ"), Category("SunnyUI")] public bool StyleCustomMode { get; set; } public string Version { get; } + /// + /// Tagַ + /// + [DefaultValue(null)] + [Description("ȡðйؿؼݵĶַ"), Category("SunnyUI")] public string TagString { get; set; } } } \ No newline at end of file diff --git a/SunnyUI/Controls/DropItem/UIDropControl.cs b/SunnyUI/Controls/DropItem/UIDropControl.cs index 73c39837..a2f14e3c 100644 --- a/SunnyUI/Controls/DropItem/UIDropControl.cs +++ b/SunnyUI/Controls/DropItem/UIDropControl.cs @@ -32,16 +32,16 @@ namespace Sunny.UI { public enum UIDropDownStyle { + /// + /// 通过单击下箭头指定显示列表,并指定文本部分可编辑。 这表示用户可以输入新的值,而不仅限于选择列表中现有的值。 + /// DropDown, + /// + /// 通过单击下箭头指定显示列表,并指定文本部分不可编辑。 这表示用户不能输入新的值。 只能选择列表中已有的值。 + /// DropDownList } - public enum UIDropItemPos - { - Top, - Bottom - } - [ToolboxItem(false)] public partial class UIDropControl : UIPanel { @@ -106,6 +106,7 @@ namespace Sunny.UI } [DefaultValue(null)] + [Description("水印文字"), Category("SunnyUI")] public string Watermark { get => edit.Watermark; @@ -153,6 +154,7 @@ namespace Sunny.UI private int dropSymbol = 61703; [DefaultValue(61703)] + [Description("正常显示时字体图标"), Category("SunnyUI")] public int SymbolNormal { get => symbolNormal; @@ -164,6 +166,7 @@ namespace Sunny.UI } [DefaultValue(61702)] + [Description("下拉框显示时字体图标"), Category("SunnyUI")] public int SymbolDropDown { get; set; } = 61702; protected virtual void CreateInstance() @@ -182,6 +185,7 @@ namespace Sunny.UI private UIDropDownStyle _dropDownStyle = UIDropDownStyle.DropDown; [DefaultValue(UIDropDownStyle.DropDown)] + [Description("下拉框显示样式"), Category("SunnyUI")] public UIDropDownStyle DropDownStyle { get => _dropDownStyle; @@ -196,9 +200,6 @@ namespace Sunny.UI } } - [DefaultValue(UIDropItemPos.Bottom)] - public UIDropItemPos DropItemPos { get; set; } = UIDropItemPos.Bottom; - public event EventHandler ButtonClick; protected readonly TextBoxEx edit = new TextBoxEx(); @@ -274,6 +275,7 @@ namespace Sunny.UI } [DefaultValue('\0')] + [Description("m"), Category("SunnyUI")] public char PasswordChar { get => edit.PasswordChar; diff --git a/SunnyUI/Controls/UIAnalogMeter.cs b/SunnyUI/Controls/UIAnalogMeter.cs index ea680ab9..68ef025e 100644 --- a/SunnyUI/Controls/UIAnalogMeter.cs +++ b/SunnyUI/Controls/UIAnalogMeter.cs @@ -117,7 +117,7 @@ namespace Sunny.UI #region Properties [ - Category("Appearance"), + Category("SunnyUI"), Description("Style of the control"), DefaultValue(AnalogMeterStyle.Circular) ] @@ -132,7 +132,7 @@ namespace Sunny.UI } [ - Category("Appearance"), + Category("SunnyUI"), Description("Color of the body of the control"), DefaultValue(typeof(Color), "80, 160, 255") ] @@ -143,7 +143,7 @@ namespace Sunny.UI } [ - Category("Appearance"), + Category("SunnyUI"), Description("Color of the needle"), DefaultValue(typeof(Color), "Yellow") ] @@ -158,7 +158,7 @@ namespace Sunny.UI } [ - Category("Appearance"), + Category("SunnyUI"), Description("Show or hide the glass effect"), DefaultValue(false) ] @@ -173,7 +173,7 @@ namespace Sunny.UI } [ - Category("Appearance"), + Category("SunnyUI"), Description("Color of the scale of the control"), DefaultValue(typeof(Color), "White") ] @@ -240,7 +240,7 @@ namespace Sunny.UI } [ - Category("Appearance"), + Category("SunnyUI"), Description("Number of the scale divisions"), DefaultValue(11) ] @@ -256,7 +256,7 @@ namespace Sunny.UI } [ - Category("Appearance"), + Category("SunnyUI"), Description("Number of the scale subdivisions"), DefaultValue(4) ] diff --git a/SunnyUI/Controls/UIButton.cs b/SunnyUI/Controls/UIButton.cs index 5a8d822a..64aa9332 100644 --- a/SunnyUI/Controls/UIButton.cs +++ b/SunnyUI/Controls/UIButton.cs @@ -178,6 +178,7 @@ namespace Sunny.UI /// 是否选中 /// [DefaultValue(false)] + [Description("是否选中"), Category("SunnyUI")] public bool Selected { get => selected; @@ -245,6 +246,7 @@ namespace Sunny.UI } [DefaultValue(typeof(Color), "244, 244, 244"), Category("SunnyUI")] + [Description("不可用时填充颜色")] public Color FillDisableColor { get => fillDisableColor; @@ -252,6 +254,7 @@ namespace Sunny.UI } [DefaultValue(typeof(Color), "173, 178, 181"), Category("SunnyUI")] + [Description("不可用时边框颜色")] public Color RectDisableColor { get => rectDisableColor; @@ -259,6 +262,7 @@ namespace Sunny.UI } [DefaultValue(typeof(Color), "109, 109, 103"), Category("SunnyUI")] + [Description("不可用时字体颜色")] public Color ForeDisableColor { get => foreDisableColor; @@ -266,6 +270,7 @@ namespace Sunny.UI } [DefaultValue(typeof(Color), "111, 168, 255"), Category("SunnyUI")] + [Description("鼠标移上时填充颜色")] public Color FillHoverColor { get => fillHoverColor; @@ -273,6 +278,7 @@ namespace Sunny.UI } [DefaultValue(typeof(Color), "74, 131, 229"), Category("SunnyUI")] + [Description("鼠标按下时填充颜色")] public Color FillPressColor { get => fillPressColor; @@ -280,6 +286,7 @@ namespace Sunny.UI } [DefaultValue(typeof(Color), "White"), Category("SunnyUI")] + [Description("鼠标移上时字体颜色")] public Color ForeHoverColor { get => foreHoverColor; @@ -287,6 +294,7 @@ namespace Sunny.UI } [DefaultValue(typeof(Color), "White"), Category("SunnyUI")] + [Description("鼠标按下时字体颜色")] public Color ForePressColor { get => forePressColor; @@ -294,6 +302,7 @@ namespace Sunny.UI } [DefaultValue(typeof(Color), "111, 168, 255"), Category("SunnyUI")] + [Description("鼠标移上时边框颜色")] public Color RectHoverColor { get => rectHoverColor; @@ -301,6 +310,7 @@ namespace Sunny.UI } [DefaultValue(typeof(Color), "74, 131, 229"), Category("SunnyUI")] + [Description("鼠标按下时边框颜色")] public Color RectPressColor { get => rectPressColor; @@ -308,6 +318,7 @@ namespace Sunny.UI } [DefaultValue(typeof(Color), "74, 131, 229"), Category("SunnyUI")] + [Description("选中时填充颜色")] public Color FillSelectedColor { get => fillSelectedColor; @@ -315,6 +326,7 @@ namespace Sunny.UI } [DefaultValue(typeof(Color), "White"), Category("SunnyUI")] + [Description("选中时字体颜色")] public Color ForeSelectedColor { get => foreSelectedColor; @@ -322,6 +334,7 @@ namespace Sunny.UI } [DefaultValue(typeof(Color), "74, 131, 229"), Category("SunnyUI")] + [Description("选中时边框颜色")] public Color RectSelectedColor { get => rectSelectedColor; @@ -362,6 +375,7 @@ namespace Sunny.UI } [DefaultValue(DialogResult.None)] + [Description("指定标识符以指示对话框的返回值"), Category("SunnyUI")] public DialogResult DialogResult { get; set; } = DialogResult.None; protected override void OnKeyDown(KeyEventArgs e) @@ -375,6 +389,7 @@ namespace Sunny.UI } [DefaultValue(false)] + [Description("显示激活时边框线"), Category("SunnyUI")] public bool ShowFocusLine { get; set; } } } \ No newline at end of file diff --git a/SunnyUI/Controls/UICheckBox.cs b/SunnyUI/Controls/UICheckBox.cs index eeae5160..e23a1e0d 100644 --- a/SunnyUI/Controls/UICheckBox.cs +++ b/SunnyUI/Controls/UICheckBox.cs @@ -51,7 +51,7 @@ namespace Sunny.UI private int _imageInterval = 3; [DefaultValue(16)] - [Description("图标大小"), Category("自定义")] + [Description("图标大小"), Category("SunnyUI")] public int ImageSize { get => _imageSize; @@ -69,7 +69,7 @@ namespace Sunny.UI /// /// 字体颜色 /// - [Description("字体颜色"), Category("自定义")] + [Description("字体颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "48, 48, 48")] public override Color ForeColor { @@ -78,7 +78,7 @@ namespace Sunny.UI } [DefaultValue(3)] - [Description("图标与文字之间间隔"), Category("自定义")] + [Description("图标与文字之间间隔"), Category("SunnyUI")] public int ImageInterval { get => _imageInterval; @@ -91,7 +91,7 @@ namespace Sunny.UI private bool _checked; - [Description("是否选中"), Category("自定义")] + [Description("是否选中"), Category("SunnyUI")] [DefaultValue(false)] public bool Checked { @@ -173,7 +173,7 @@ namespace Sunny.UI /// /// 填充颜色,当值为背景色或透明色或空值则不填充 /// - [Description("填充颜色"), Category("自定义")] + [Description("填充颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public Color CheckBoxColor { diff --git a/SunnyUI/Controls/UICheckBoxGroup.cs b/SunnyUI/Controls/UICheckBoxGroup.cs index af623807..dde717f4 100644 --- a/SunnyUI/Controls/UICheckBoxGroup.cs +++ b/SunnyUI/Controls/UICheckBoxGroup.cs @@ -76,6 +76,7 @@ namespace Sunny.UI [Localizable(true)] [Editor("System.Windows.Forms.Design.ListControlStringCollectionEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))] [MergableProperty(false)] + [Description("获取该多选框组中项的集合"), Category("SunnyUI")] public ListBox.ObjectCollection Items => ListBox.Items; private CheckedListBoxEx listbox; @@ -227,6 +228,7 @@ namespace Sunny.UI private int columnCount = 1; [DefaultValue(1)] + [Description("显示列的个数"), Category("SunnyUI")] public int ColumnCount { get => columnCount; @@ -240,6 +242,7 @@ namespace Sunny.UI private Size _itemSize = new Size(150, 35); [DefaultValue(typeof(Size), "150, 35")] + [Description("显示项的大小"), Category("SunnyUI")] public Size ItemSize { get => _itemSize; @@ -253,6 +256,7 @@ namespace Sunny.UI private Point startPos = new Point(12, 12); [DefaultValue(typeof(Point), "12, 12")] + [Description("显示项的起始位置"), Category("SunnyUI")] public Point StartPos { get => startPos; @@ -266,6 +270,7 @@ namespace Sunny.UI public int columnInterval; [DefaultValue(0)] + [Description("显示项列之间的间隔"), Category("SunnyUI")] public int ColumnInterval { get => columnInterval; @@ -279,6 +284,7 @@ namespace Sunny.UI private int rowInterval; [DefaultValue(0)] + [Description("显示项行之间的间隔"), Category("SunnyUI")] public int RowInterval { get => rowInterval; diff --git a/SunnyUI/Controls/UIColorPicker.cs b/SunnyUI/Controls/UIColorPicker.cs index f1d9fef6..88a9f689 100644 --- a/SunnyUI/Controls/UIColorPicker.cs +++ b/SunnyUI/Controls/UIColorPicker.cs @@ -82,6 +82,8 @@ namespace Sunny.UI private Color selectColor; + [DefaultValue(typeof(Color), "80, 159, 254")] + [Description("选中颜色"), Category("SunnyUI")] public Color Value { get => selectColor; diff --git a/SunnyUI/Controls/UIComboBox.cs b/SunnyUI/Controls/UIComboBox.cs index 3a2521d5..c9499db4 100644 --- a/SunnyUI/Controls/UIComboBox.cs +++ b/SunnyUI/Controls/UIComboBox.cs @@ -105,6 +105,7 @@ namespace Sunny.UI } [DefaultValue(25)] + [Description("列表项高度"), Category("SunnyUI")] public int ItemHeight { get => ListBox.ItemHeight; @@ -112,6 +113,7 @@ namespace Sunny.UI } [DefaultValue(8)] + [Description("列表下拉最大个数"), Category("SunnyUI")] public int MaxDropDownItems { get; set; } = 8; private void UIComboBox_FontChanged(object sender, EventArgs e) @@ -150,6 +152,7 @@ namespace Sunny.UI private object dataSource; [DefaultValue(null), RefreshProperties(RefreshProperties.Repaint), AttributeProvider(typeof(IListSource))] + [Description("数据源"), Category("SunnyUI")] public object 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))] [Localizable(true)] [MergableProperty(false)] + [Description("下拉显示项"), Category("SunnyUI")] public ObjectCollection Items { get => box.Items; } [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] + [Description("选中索引"), Category("SunnyUI")] public int SelectedIndex { get => box.SelectedIndex; @@ -221,6 +226,7 @@ namespace Sunny.UI } [Browsable(false), Bindable(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] + [Description("选中项"), Category("SunnyUI")] public object SelectedItem { get => box.SelectedItem; @@ -228,6 +234,7 @@ namespace Sunny.UI } [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] + [Description("选中文字"), Category("SunnyUI")] public string SelectedText { get @@ -248,6 +255,7 @@ namespace Sunny.UI Clear(); } + [Description("获取或设置要为此列表框显示的属性。"), Category("SunnyUI")] [DefaultValue("")] [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")] @@ -261,7 +269,7 @@ namespace Sunny.UI } } - + [Description("获取或设置指示显示值的方式的格式说明符字符。"), Category("SunnyUI")] [DefaultValue("")] [Editor("System.Windows.Forms.Design.FormatStringEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))] [MergableProperty(false)] @@ -271,6 +279,7 @@ namespace Sunny.UI set => box.FormatString = value; } + [Description("获取或设置指示显示值是否可以进行格式化操作。"), Category("SunnyUI")] [DefaultValue(false)] public bool FormattingEnabled { @@ -278,6 +287,7 @@ namespace Sunny.UI set => box.FormattingEnabled = value; } + [Description("获取或设置要为此列表框实际值的属性。"), Category("SunnyUI")] [DefaultValue("")] [Editor("System.Windows.Forms.Design.DataMemberFieldEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))] public string ValueMember diff --git a/SunnyUI/Controls/UIContextMenuStrip.cs b/SunnyUI/Controls/UIContextMenuStrip.cs index fe75b4ca..dcef740c 100644 --- a/SunnyUI/Controls/UIContextMenuStrip.cs +++ b/SunnyUI/Controls/UIContextMenuStrip.cs @@ -38,10 +38,18 @@ namespace Sunny.UI Version = UIGlobal.Version; } + /// + /// 自定义主题风格 + /// [DefaultValue(false)] + [Description("获取或设置可以自定义主题风格"), Category("SunnyUI")] public bool StyleCustomMode { get; set; } + /// + /// Tag字符串 + /// [DefaultValue(null)] + [Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")] public string TagString { get; set; } public void SetStyle(UIStyle style) @@ -63,7 +71,10 @@ namespace Sunny.UI private UIStyle _style = UIStyle.Blue; - [DefaultValue(UIStyle.Blue)] + /// + /// 主题样式 + /// + [DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")] public UIStyle Style { get => _style; diff --git a/SunnyUI/Controls/UIControl.cs b/SunnyUI/Controls/UIControl.cs index 822ec798..ded48a83 100644 --- a/SunnyUI/Controls/UIControl.cs +++ b/SunnyUI/Controls/UIControl.cs @@ -52,12 +52,14 @@ namespace Sunny.UI /// Tag字符串 /// [DefaultValue(null)] + [Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")] public string TagString { get; set; } /// - /// 自定义主题样式 + /// 自定义主题风格 /// [DefaultValue(false)] + [Description("获取或设置可以自定义主题风格"), Category("SunnyUI")] public bool StyleCustomMode { get; set; } /// @@ -85,7 +87,7 @@ namespace Sunny.UI /// /// 边框显示位置 /// - [DefaultValue(ToolStripStatusLabelBorderSides.All), Description("边框显示位置")] + [DefaultValue(ToolStripStatusLabelBorderSides.All), Description("边框显示位置"), Category("SunnyUI")] public ToolStripStatusLabelBorderSides RectSides { get => _rectSides; @@ -110,7 +112,7 @@ namespace Sunny.UI /// /// 圆角显示位置 /// - [DefaultValue(UICornerRadiusSides.All), Description("圆角显示位置")] + [DefaultValue(UICornerRadiusSides.All), Description("圆角显示位置"), Category("SunnyUI")] public UICornerRadiusSides RadiusSides { get => _radiusSides; @@ -127,7 +129,7 @@ namespace Sunny.UI /// /// 圆角角度 /// - [Description("圆角角度"), Category("自定义")] + [Description("圆角角度"), Category("SunnyUI")] [DefaultValue(5)] public int Radius { @@ -147,7 +149,7 @@ namespace Sunny.UI /// /// 是否显示文字 /// - [Description("是否显示文字")] + [Description("是否显示文字"), Category("SunnyUI")] [DefaultValue(true)] protected bool ShowText { @@ -225,7 +227,7 @@ namespace Sunny.UI /// /// 主题样式 /// - [DefaultValue(UIStyle.Blue)] + [DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")] public UIStyle Style { get => _style; @@ -249,7 +251,7 @@ namespace Sunny.UI /// /// 文字对齐方向 /// - [Description("文字对齐方向")] + [Description("文字对齐方向"), Category("SunnyUI")] [DefaultValue(ContentAlignment.MiddleCenter)] public ContentAlignment TextAlign { @@ -588,7 +590,7 @@ namespace Sunny.UI Invalidate(); } } - + protected Color rectSelectedColor; /// diff --git a/SunnyUI/Controls/UIDataGridView.cs b/SunnyUI/Controls/UIDataGridView.cs index 98c27048..154585a6 100644 --- a/SunnyUI/Controls/UIDataGridView.cs +++ b/SunnyUI/Controls/UIDataGridView.cs @@ -108,11 +108,11 @@ namespace Sunny.UI public void Init() { - //列占满行 - //AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //自动生成行 + AutoGenerateColumns = false; - //行选 - SelectionMode = DataGridViewSelectionMode.FullRowSelect; + //列占满行 + AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; //禁止调整数据行行高 AllowUserToResizeRows = false; @@ -120,24 +120,24 @@ namespace Sunny.UI //允许调整标题行行宽 AllowUserToResizeColumns = true; - //不显示数据行标题 - RowHeadersVisible = false; - - //禁止行多选 - //MultiSelect = false; - - //自动生成行 - //AutoGenerateColumns = true; - //禁用最后一行空白,自动新增行 AllowUserToAddRows = false; AllowUserToDeleteRows = false; + //不显示表格线 + CellBorderStyle = DataGridViewCellBorderStyle.None; + + //禁止行多选 + MultiSelect = false; + + //不显示数据行标题 + RowHeadersVisible = false; + //禁止只读 //ReadOnly = false; - //不显示表格线 - CellBorderStyle = DataGridViewCellBorderStyle.None; + //行选 + SelectionMode = DataGridViewSelectionMode.FullRowSelect; } protected override void OnPaint(PaintEventArgs e) @@ -268,7 +268,10 @@ namespace Sunny.UI private UIStyle _style = UIStyle.Blue; - [DefaultValue(UIStyle.Blue)] + /// + /// 主题样式 + /// + [DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")] public UIStyle Style { get => _style; @@ -276,6 +279,7 @@ namespace Sunny.UI } [DefaultValue(typeof(Color), "White")] + [Description("偶数行显示颜色"), Category("SunnyUI")] public Color StripeEvenColor { get => RowsDefaultCellStyle.BackColor; @@ -287,6 +291,7 @@ namespace Sunny.UI } [DefaultValue(typeof(Color), "235, 243, 255")] + [Description("奇数行显示颜色"), Category("SunnyUI")] public Color StripeOddColor { get => AlternatingRowsDefaultCellStyle.BackColor; @@ -330,17 +335,26 @@ namespace Sunny.UI Invalidate(); } + /// + /// 自定义主题风格 + /// [DefaultValue(false)] + [Description("获取或设置可以自定义主题风格"), Category("SunnyUI")] public bool StyleCustomMode { get; set; } public string Version => UIGlobal.Version; + /// + /// Tag字符串 + /// + [DefaultValue(null)] + [Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")] public string TagString { get; set; } /// /// 是否显示边框 /// - [Description("是否显示边框"), Category("自定义")] + [Description("是否显示边框"), Category("SunnyUI")] [DefaultValue(true)] public bool ShowRect { @@ -355,7 +369,7 @@ namespace Sunny.UI /// /// 是否显示表格线 /// - [Description("是否显示表格线"), Category("自定义")] + [Description("是否显示表格线"), Category("SunnyUI")] [DefaultValue(false)] public bool ShowGridLine { @@ -365,7 +379,8 @@ namespace Sunny.UI 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 { get => _rectColor; diff --git a/SunnyUI/Controls/UIDatePicker.cs b/SunnyUI/Controls/UIDatePicker.cs index a0aa7e48..042c9115 100644 --- a/SunnyUI/Controls/UIDatePicker.cs +++ b/SunnyUI/Controls/UIDatePicker.cs @@ -86,6 +86,7 @@ namespace Sunny.UI ItemForm = new UIDropDown(item); } + [Description("选中日期"), Category("SunnyUI")] public DateTime Value { get => item.Date; @@ -106,7 +107,7 @@ namespace Sunny.UI private string dateFormat = "yyyy-MM-dd"; - [Description("日期格式化掩码"), Category("自定义")] + [Description("日期格式化掩码"), Category("SunnyUI")] [DefaultValue("yyyy-MM-dd")] public string DateFormat { diff --git a/SunnyUI/Controls/UIDateTimePicker.cs b/SunnyUI/Controls/UIDateTimePicker.cs index af747968..98e03c4f 100644 --- a/SunnyUI/Controls/UIDateTimePicker.cs +++ b/SunnyUI/Controls/UIDateTimePicker.cs @@ -105,6 +105,7 @@ namespace Sunny.UI ItemForm = new UIDropDown(item); } + [Description("选中日期时间"), Category("SunnyUI")] public DateTime Value { get => item.Date; diff --git a/SunnyUI/Controls/UIDoubleUpDown.cs b/SunnyUI/Controls/UIDoubleUpDown.cs index 49bcf2bb..17be9ac8 100644 --- a/SunnyUI/Controls/UIDoubleUpDown.cs +++ b/SunnyUI/Controls/UIDoubleUpDown.cs @@ -42,6 +42,7 @@ namespace Sunny.UI private double _value = 0; [DefaultValue(0)] + [Description("选中数值"), Category("SunnyUI")] public double Value { get => _value; @@ -55,11 +56,13 @@ namespace Sunny.UI } [DefaultValue(1)] + [Description("小数位数"), Category("SunnyUI")] public int Decimal { get; set; } = 1; private double step = 0.1; [DefaultValue(0.1)] + [Description("步进值"), Category("SunnyUI")] public double Step { get => step; @@ -83,6 +86,7 @@ namespace Sunny.UI private double _minimum = double.MinValue; [DefaultValue(double.MaxValue)] + [Description("最大值"), Category("SunnyUI")] public double Maximum { get => _maximum; @@ -98,6 +102,7 @@ namespace Sunny.UI } [DefaultValue(double.MinValue)] + [Description("最小值"), Category("SunnyUI")] public double Minimum { get => _minimum; @@ -133,6 +138,7 @@ namespace Sunny.UI private bool hasMinimum; [DefaultValue(false)] + [Description("检查最大值"), Category("SunnyUI")] public bool HasMaximum { get => hasMaximum; @@ -148,6 +154,7 @@ namespace Sunny.UI } [DefaultValue(false)] + [Description("检查最小值"), Category("SunnyUI")] public bool HasMinimum { get => hasMinimum; diff --git a/SunnyUI/Controls/UIEdit.cs b/SunnyUI/Controls/UIEdit.cs index 49435009..49d7fb00 100644 --- a/SunnyUI/Controls/UIEdit.cs +++ b/SunnyUI/Controls/UIEdit.cs @@ -72,12 +72,12 @@ namespace Sunny.UI { EnterKeyPress?.Invoke(this, e); } - + if (EnterAsTab) { SendKeys.Send("{tab}"); } - + e.Handled = true; } @@ -122,7 +122,7 @@ namespace Sunny.UI public event EventHandler EnterKeyPress; - [DefaultValue(false), Category("Appearance"), Description("整型、浮点型可以为空")] + [DefaultValue(false), Category("SunnyUI"), Description("整型、浮点型可以为空")] public bool CanEmpty { get => canEmpty; @@ -138,7 +138,7 @@ namespace Sunny.UI [ DefaultValue(UITextBox.UIEditType.String), - Category("Appearance"), + Category("SunnyUI"), Description("设置编辑框输入内容属性") ] public UITextBox.UIEditType Type diff --git a/SunnyUI/Controls/UIGroupBox.cs b/SunnyUI/Controls/UIGroupBox.cs index d73d595e..a70e4959 100644 --- a/SunnyUI/Controls/UIGroupBox.cs +++ b/SunnyUI/Controls/UIGroupBox.cs @@ -71,6 +71,7 @@ namespace Sunny.UI private int _titleTop = 16; [DefaultValue(16)] + [Description("标题高度"), Category("SunnyUI")] public int TitleTop { get => _titleTop; @@ -79,7 +80,7 @@ namespace Sunny.UI if (_titleTop != value) { _titleTop = value; - Padding = new Padding(0, value+16, 0, 0); + Padding = new Padding(0, value + 16, 0, 0); Invalidate(); } } @@ -88,6 +89,7 @@ namespace Sunny.UI private int _titleInterval = 10; [DefaultValue(10)] + [Description("标题显示间隔"), Category("SunnyUI")] public int TitleInterval { get => _titleInterval; @@ -104,6 +106,7 @@ namespace Sunny.UI public HorizontalAlignment titleAlignment = HorizontalAlignment.Left; [DefaultValue(HorizontalAlignment.Left)] + [Description("文字显示位置"), Category("SunnyUI")] public HorizontalAlignment TitleAlignment { get => titleAlignment; diff --git a/SunnyUI/Controls/UIHorScrollBar.cs b/SunnyUI/Controls/UIHorScrollBar.cs index 1641eb65..b51c9133 100644 --- a/SunnyUI/Controls/UIHorScrollBar.cs +++ b/SunnyUI/Controls/UIHorScrollBar.cs @@ -398,8 +398,8 @@ namespace Sunny.UI var rect_left = GetUpRect(); var rect_right = GetDownRect(); var rect_value = GetValueRect(); - 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_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); if (rect_left.Contains(x, y)) return 1; else if (rect_right.Contains(x, y)) @@ -429,7 +429,7 @@ namespace Sunny.UI /// /// 字体颜色 /// - [Description("字体颜色"), Category("自定义")] + [Description("字体颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public override Color ForeColor { @@ -440,7 +440,7 @@ namespace Sunny.UI /// /// 填充颜色,当值为背景色或透明色或空值则不填充 /// - [Description("填充颜色"), Category("自定义")] + [Description("填充颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "235, 243, 255")] public Color FillColor { diff --git a/SunnyUI/Controls/UIImageButton.cs b/SunnyUI/Controls/UIImageButton.cs index c16987d9..e27803b1 100644 --- a/SunnyUI/Controls/UIImageButton.cs +++ b/SunnyUI/Controls/UIImageButton.cs @@ -43,6 +43,13 @@ namespace Sunny.UI private ContentAlignment textAlign = ContentAlignment.MiddleCenter; private Color foreColor = UIFontColor.Primary; + /// + /// Tag字符串 + /// + [DefaultValue(null)] + [Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")] + public string TagString { get; set; } + [Category("外观")] [Description("按钮文字")] [Browsable(true)] @@ -264,7 +271,7 @@ namespace Sunny.UI public Point imageOffset; - [DefaultValue(typeof(Point),"0, 0")] + [DefaultValue(typeof(Point), "0, 0")] public Point ImageOffset { get => imageOffset; diff --git a/SunnyUI/Controls/UIImageListBox.cs b/SunnyUI/Controls/UIImageListBox.cs index 3c5798a2..a9174446 100644 --- a/SunnyUI/Controls/UIImageListBox.cs +++ b/SunnyUI/Controls/UIImageListBox.cs @@ -279,7 +279,11 @@ namespace Sunny.UI { private UIScrollBar bar; + /// + /// Tag字符串 + /// [DefaultValue(null)] + [Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")] public string TagString { get; set; } public UIScrollBar Bar @@ -337,7 +341,11 @@ namespace Sunny.UI e.ItemHeight = e.ItemHeight + ItemHeight; } + /// + /// 自定义主题风格 + /// [DefaultValue(false)] + [Description("获取或设置可以自定义主题风格"), Category("SunnyUI")] public bool StyleCustomMode { get; set; } public string Version { get; } @@ -413,7 +421,10 @@ namespace Sunny.UI } } - [DefaultValue(UIStyle.Blue)] + /// + /// 主题样式 + /// + [DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")] public UIStyle Style { get => _style; @@ -436,7 +447,7 @@ namespace Sunny.UI 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 { 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 { get => _itemSelectForeColor; diff --git a/SunnyUI/Controls/UIIntegerUpDown.cs b/SunnyUI/Controls/UIIntegerUpDown.cs index e921cbc3..68ee230d 100644 --- a/SunnyUI/Controls/UIIntegerUpDown.cs +++ b/SunnyUI/Controls/UIIntegerUpDown.cs @@ -42,6 +42,7 @@ namespace Sunny.UI private int _value; [DefaultValue(0)] + [Description("选中数值"), Category("SunnyUI")] public int Value { get => _value; @@ -57,6 +58,7 @@ namespace Sunny.UI private int step = 1; [DefaultValue(1)] + [Description("步进值"), Category("SunnyUI")] public int Step { get => step; @@ -76,6 +78,7 @@ namespace Sunny.UI private int _maximum = int.MaxValue; private int _minimum = int.MinValue; + [Description("最大值"), Category("SunnyUI")] [DefaultValue(int.MaxValue)] public int Maximum { @@ -91,6 +94,7 @@ namespace Sunny.UI } } + [Description("最小值"), Category("SunnyUI")] [DefaultValue(int.MinValue)] public int Minimum { @@ -127,6 +131,7 @@ namespace Sunny.UI private bool hasMinimum; [DefaultValue(false)] + [Description("检查最大值"), Category("SunnyUI")] public bool HasMaximum { get => hasMaximum; @@ -142,6 +147,7 @@ namespace Sunny.UI } [DefaultValue(false)] + [Description("检查最小值"), Category("SunnyUI")] public bool HasMinimum { get => hasMinimum; diff --git a/SunnyUI/Controls/UILabel.cs b/SunnyUI/Controls/UILabel.cs index 958112fd..c1bd143f 100644 --- a/SunnyUI/Controls/UILabel.cs +++ b/SunnyUI/Controls/UILabel.cs @@ -47,13 +47,17 @@ namespace Sunny.UI private Color foreColor = UIStyles.Blue.LabelForeColor; + /// + /// Tag字符串 + /// [DefaultValue(null)] + [Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")] public string TagString { get; set; } /// /// 字体颜色 /// - [Description("字体颜色"), Category("自定义")] + [Description("字体颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "48, 48, 48")] public override Color ForeColor { @@ -73,7 +77,11 @@ namespace Sunny.UI _style = style; } + /// + /// 自定义主题风格 + /// [DefaultValue(false)] + [Description("获取或设置可以自定义主题风格"), Category("SunnyUI")] public bool StyleCustomMode { get; set; } public void SetStyleColor(UIBaseStyle uiColor) @@ -86,7 +94,10 @@ namespace Sunny.UI private UIStyle _style = UIStyle.Blue; - [DefaultValue(UIStyle.Blue)] + /// + /// 主题样式 + /// + [DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")] public UIStyle Style { get => _style; @@ -132,7 +143,7 @@ namespace Sunny.UI } } - [Description("图标颜色"), Category("自定义")] + [Description("图标颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "48, 48, 48")] public Color SymbolColor { @@ -147,7 +158,7 @@ namespace Sunny.UI /// /// 字体颜色 /// - [Description("字体颜色"), Category("自定义")] + [Description("字体颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "48, 48, 48")] public override Color ForeColor { @@ -335,12 +346,20 @@ namespace Sunny.UI _style = UIStyle.Custom; } + /// + /// Tag字符串 + /// [DefaultValue(null)] + [Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")] public string TagString { get; set; } public string Version { get; } + /// + /// 自定义主题风格 + /// [DefaultValue(false)] + [Description("获取或设置可以自定义主题风格"), Category("SunnyUI")] public bool StyleCustomMode { get; set; } public void SetStyle(UIStyle style) @@ -360,7 +379,10 @@ namespace Sunny.UI private UIStyle _style = UIStyle.Blue; - [DefaultValue(UIStyle.Blue)] + /// + /// 主题样式 + /// + [DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")] public UIStyle Style { get => _style; diff --git a/SunnyUI/Controls/UILine.cs b/SunnyUI/Controls/UILine.cs index 1fe10b22..d8af5562 100644 --- a/SunnyUI/Controls/UILine.cs +++ b/SunnyUI/Controls/UILine.cs @@ -91,7 +91,7 @@ namespace Sunny.UI /// /// 字体颜色 /// - [Description("字体颜色"), Category("自定义")] + [Description("字体颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "48, 48, 48")] public override Color ForeColor { @@ -191,7 +191,7 @@ namespace Sunny.UI /// /// 填充颜色,当值为背景色或透明色或空值则不填充 /// - [Description("填充颜色"), Category("自定义")] + [Description("填充颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "235, 243, 255")] public Color FillColor { @@ -202,7 +202,7 @@ namespace Sunny.UI /// /// 边框颜色 /// - [Description("边框颜色"), Category("自定义")] + [Description("边框颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public Color LineColor { diff --git a/SunnyUI/Controls/UIListBox.cs b/SunnyUI/Controls/UIListBox.cs index 413b9efc..04915c22 100644 --- a/SunnyUI/Controls/UIListBox.cs +++ b/SunnyUI/Controls/UIListBox.cs @@ -244,7 +244,11 @@ namespace Sunny.UI { private UIScrollBar bar; + /// + /// Tag字符串 + /// [DefaultValue(null)] + [Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")] public string TagString { get; set; } public UIScrollBar Bar @@ -302,7 +306,11 @@ namespace Sunny.UI public string Version { get; } + /// + /// 自定义主题风格 + /// [DefaultValue(false)] + [Description("获取或设置可以自定义主题风格"), Category("SunnyUI")] public bool StyleCustomMode { get; set; } #region 组件设计器生成的代码 @@ -332,7 +340,10 @@ namespace Sunny.UI private Color _itemSelectBackColor = UIColor.Blue; private Color _itemSelectForeColor = Color.White; - [DefaultValue(UIStyle.Blue)] + /// + /// 主题样式 + /// + [DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")] public UIStyle Style { get => _style; @@ -341,25 +352,25 @@ namespace Sunny.UI protected override void OnMouseWheel(MouseEventArgs e) { -/* base.OnMouseWheel(e); - if (Bar.Visible) - { - var si = ScrollBarInfo.GetInfo(Handle); - if (e.Delta > 10) - { - if (si.nPos > 0) - { - ScrollBarInfo.ScrollUp(Handle); - } - } - else if (e.Delta < -10) - { - if (si.nPos < si.ScrollMax) - { - ScrollBarInfo.ScrollDown(Handle); - } - } - }*/ + /* base.OnMouseWheel(e); + if (Bar.Visible) + { + var si = ScrollBarInfo.GetInfo(Handle); + if (e.Delta > 10) + { + if (si.nPos > 0) + { + ScrollBarInfo.ScrollUp(Handle); + } + } + else if (e.Delta < -10) + { + if (si.nPos < si.ScrollMax) + { + ScrollBarInfo.ScrollDown(Handle); + } + } + }*/ SetScrollInfo(); } @@ -379,7 +390,7 @@ namespace Sunny.UI 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 { 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 { get => _itemSelectForeColor; diff --git a/SunnyUI/Controls/UILogo.cs b/SunnyUI/Controls/UILogo.cs index ef7b0b78..d76dca82 100644 --- a/SunnyUI/Controls/UILogo.cs +++ b/SunnyUI/Controls/UILogo.cs @@ -157,7 +157,7 @@ namespace Sunny.UI /// /// 字体颜色 /// - [Description("字体颜色"), Category("自定义")] + [Description("字体颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "48, 48, 48")] public override Color ForeColor { @@ -168,7 +168,7 @@ namespace Sunny.UI /// /// 填充颜色,当值为背景色或透明色或空值则不填充 /// - [Description("填充颜色"), Category("自定义")] + [Description("填充颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public Color FillColor { diff --git a/SunnyUI/Controls/UINavBar.cs b/SunnyUI/Controls/UINavBar.cs index cdc9aed3..84cded8b 100644 --- a/SunnyUI/Controls/UINavBar.cs +++ b/SunnyUI/Controls/UINavBar.cs @@ -84,7 +84,11 @@ namespace Sunny.UI node.ImageIndex = imageIndex; } + /// + /// Tag字符串 + /// [DefaultValue(null)] + [Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")] public string TagString { get; set; } private UIMenuStyle _menuStyle = UIMenuStyle.Black; @@ -109,7 +113,7 @@ namespace Sunny.UI /// /// 字体颜色 /// - [Description("字体颜色"), Category("自定义")] + [Description("字体颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "Silver")] public override Color ForeColor { @@ -171,7 +175,7 @@ namespace Sunny.UI /// /// 边框颜色 /// - [Description("选中Tab页高亮"), Category("自定义")] + [Description("选中Tab页高亮"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public Color SelectedHighColor @@ -187,7 +191,10 @@ namespace Sunny.UI private UIStyle _style = UIStyle.Blue; - [DefaultValue(UIStyle.Blue)] + /// + /// 主题样式 + /// + [DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")] public UIStyle Style { get => _style; @@ -513,7 +520,11 @@ namespace Sunny.UI Invalidate(); } + /// + /// 自定义主题风格 + /// [DefaultValue(false)] + [Description("获取或设置可以自定义主题风格"), Category("SunnyUI")] public bool StyleCustomMode { get; set; } public string Version { get; } diff --git a/SunnyUI/Controls/UINavMenu.cs b/SunnyUI/Controls/UINavMenu.cs index 60aa9823..3c650843 100644 --- a/SunnyUI/Controls/UINavMenu.cs +++ b/SunnyUI/Controls/UINavMenu.cs @@ -74,7 +74,11 @@ namespace Sunny.UI [DefaultValue(false)] public bool ShowOneNode { get; set; } + /// + /// Tag字符串 + /// [DefaultValue(null)] + [Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")] public string TagString { get; set; } protected override void OnBackColorChanged(EventArgs e) @@ -104,7 +108,7 @@ namespace Sunny.UI /// /// 填充颜色,当值为背景色或透明色或空值则不填充 /// - [Description("背景颜色"), Category("自定义")] + [Description("背景颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "56, 56, 56")] public Color FillColor { @@ -125,7 +129,7 @@ namespace Sunny.UI /// /// 填充颜色,当值为背景色或透明色或空值则不填充 /// - [Description("背景颜色"), Category("自定义")] + [Description("背景颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "Silver")] public override Color ForeColor { @@ -152,7 +156,11 @@ namespace Sunny.UI ScrollBarInfo.SetScrollValue(Handle, Bar.Value); } + /// + /// 自定义主题风格 + /// [DefaultValue(false)] + [Description("获取或设置可以自定义主题风格"), Category("SunnyUI")] public bool StyleCustomMode { get; set; } [DefaultValue(null)] @@ -162,7 +170,7 @@ namespace Sunny.UI private bool showTips; - [Description("是否显示角标"), Category("自定义")] + [Description("是否显示角标"), Category("SunnyUI")] [DefaultValue(false)] public bool ShowTips { @@ -179,7 +187,7 @@ namespace Sunny.UI private Font tipsFont = new Font("Microsoft Sans Serif", 9); - [Description("角标文字字体"), Category("自定义")] + [Description("角标文字字体"), Category("SunnyUI")] [DefaultValue(typeof(Font), "Microsoft Sans Serif, 9pt")] public Font TipsFont { @@ -214,7 +222,7 @@ namespace Sunny.UI /// /// 边框颜色 /// - [Description("选中Tab页高亮"), Category("自定义")] + [Description("选中Tab页高亮"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public Color SelectedHighColor @@ -243,7 +251,10 @@ namespace Sunny.UI private UIStyle _style = UIStyle.Blue; - [DefaultValue(UIStyle.Blue)] + /// + /// 主题样式 + /// + [DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")] public UIStyle Style { get => _style; diff --git a/SunnyUI/Controls/UIPanel.cs b/SunnyUI/Controls/UIPanel.cs index 08363fcb..c0ec43ed 100644 --- a/SunnyUI/Controls/UIPanel.cs +++ b/SunnyUI/Controls/UIPanel.cs @@ -58,7 +58,11 @@ namespace Sunny.UI base.Font = UIFontColor.Font; } + /// + /// Tag字符串 + /// [DefaultValue(null)] + [Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")] public string TagString { get; set; } private string text; @@ -168,11 +172,11 @@ namespace Sunny.UI /// /// 是否显示圆角 /// - [Description("是否显示圆角"), Category("自定义")] + [Description("是否显示圆角"), Category("SunnyUI")] protected bool ShowRadius => (int)RadiusSides > 0; //圆角角度 - [Description("圆角角度"), Category("自定义")] + [Description("圆角角度"), Category("SunnyUI")] [DefaultValue(5)] public int Radius { @@ -194,14 +198,14 @@ namespace Sunny.UI /// /// 是否显示边框 /// - [Description("是否显示边框"), Category("自定义")] + [Description("是否显示边框"), Category("SunnyUI")] [DefaultValue(true)] protected bool ShowRect => (int)RectSides > 0; /// /// 边框颜色 /// - [Description("边框颜色"), Category("自定义")] + [Description("边框颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public Color RectColor { @@ -225,7 +229,7 @@ namespace Sunny.UI /// /// 填充颜色,当值为背景色或透明色或空值则不填充 /// - [Description("填充颜色,当值为背景色或透明色或空值则不填充"), Category("自定义")] + [Description("填充颜色,当值为背景色或透明色或空值则不填充"), Category("SunnyUI")] [DefaultValue(typeof(Color), "235, 243, 255")] public Color FillColor { @@ -457,12 +461,19 @@ namespace Sunny.UI { } + /// + /// 自定义主题风格 + /// [DefaultValue(false)] + [Description("获取或设置可以自定义主题风格"), Category("SunnyUI")] public bool StyleCustomMode { get; set; } protected UIStyle _style = UIStyle.Blue; - [DefaultValue(UIStyle.Blue)] + /// + /// 主题样式 + /// + [DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")] public UIStyle Style { get => _style; @@ -494,7 +505,7 @@ namespace Sunny.UI /// /// 字体颜色 /// - [Description("字体颜色"), Category("自定义")] + [Description("字体颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "48, 48, 48")] public override Color ForeColor { @@ -581,7 +592,7 @@ namespace Sunny.UI if (_textAlignment != value) { _textAlignment = value; - TextAlignmentChange?.Invoke(this,value); + TextAlignmentChange?.Invoke(this, value); Invalidate(); } } diff --git a/SunnyUI/Controls/UIProcessBar.cs b/SunnyUI/Controls/UIProcessBar.cs index 67afb1fc..4504aecd 100644 --- a/SunnyUI/Controls/UIProcessBar.cs +++ b/SunnyUI/Controls/UIProcessBar.cs @@ -166,7 +166,7 @@ namespace Sunny.UI /// /// 填充颜色,当值为背景色或透明色或空值则不填充 /// - [Description("填充颜色"), Category("自定义")] + [Description("填充颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "235, 243, 255")] public Color FillColor { @@ -177,7 +177,7 @@ namespace Sunny.UI /// /// 字体颜色 /// - [Description("字体颜色"), Category("自定义")] + [Description("字体颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public override Color ForeColor { @@ -188,7 +188,7 @@ namespace Sunny.UI /// /// 边框颜色 /// - [Description("边框颜色"), Category("自定义")] + [Description("边框颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public Color RectColor { diff --git a/SunnyUI/Controls/UIProgressIndicator.cs b/SunnyUI/Controls/UIProgressIndicator.cs index c390c852..9a7d2311 100644 --- a/SunnyUI/Controls/UIProgressIndicator.cs +++ b/SunnyUI/Controls/UIProgressIndicator.cs @@ -139,7 +139,7 @@ namespace Sunny.UI /// /// 字体颜色 /// - [Description("字体颜色"), Category("自定义")] + [Description("字体颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public override Color ForeColor { diff --git a/SunnyUI/Controls/UIRadioButton.cs b/SunnyUI/Controls/UIRadioButton.cs index 92c958ae..d800a94e 100644 --- a/SunnyUI/Controls/UIRadioButton.cs +++ b/SunnyUI/Controls/UIRadioButton.cs @@ -54,7 +54,7 @@ namespace Sunny.UI /// /// 字体颜色 /// - [Description("字体颜色"), Category("自定义")] + [Description("字体颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "48, 48, 48")] public override Color ForeColor { @@ -199,7 +199,7 @@ namespace Sunny.UI /// /// 填充颜色,当值为背景色或透明色或空值则不填充 /// - [Description("填充颜色"), Category("自定义")] + [Description("填充颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public Color RadioButtonColor { diff --git a/SunnyUI/Controls/UIScrollBar.cs b/SunnyUI/Controls/UIScrollBar.cs index b38176f9..9b47343a 100644 --- a/SunnyUI/Controls/UIScrollBar.cs +++ b/SunnyUI/Controls/UIScrollBar.cs @@ -434,7 +434,7 @@ namespace Sunny.UI /// /// 字体颜色 /// - [Description("字体颜色"), Category("自定义")] + [Description("字体颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public override Color ForeColor { @@ -445,7 +445,7 @@ namespace Sunny.UI /// /// 填充颜色,当值为背景色或透明色或空值则不填充 /// - [Description("填充颜色"), Category("自定义")] + [Description("填充颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "235, 243, 255")] public Color FillColor { diff --git a/SunnyUI/Controls/UIScrollingText.cs b/SunnyUI/Controls/UIScrollingText.cs index 414acb59..d20b503b 100644 --- a/SunnyUI/Controls/UIScrollingText.cs +++ b/SunnyUI/Controls/UIScrollingText.cs @@ -37,13 +37,13 @@ namespace Sunny.UI timer.Stop(); } - [DefaultValue(200),Description("刷新间隔")] + [DefaultValue(200), Description("刷新间隔")] public int Interval { get => interval; set { - interval = Math.Max(value,50); + interval = Math.Max(value, 50); timer.Stop(); timer.Interval = interval; timer.Start(); @@ -52,12 +52,12 @@ namespace Sunny.UI private int offset = 10; - [DefaultValue(10),Description("偏移量")] + [DefaultValue(10), Description("偏移量")] public int Offset { get => offset; set => offset = Math.Max(2, value); - } + } private void Timer_Tick(object sender, EventArgs e) { @@ -204,7 +204,7 @@ namespace Sunny.UI /// /// 填充颜色,当值为背景色或透明色或空值则不填充 /// - [Description("填充颜色"), Category("自定义")] + [Description("填充颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public Color FillColor { @@ -215,7 +215,7 @@ namespace Sunny.UI /// /// 字体颜色 /// - [Description("字体颜色"), Category("自定义")] + [Description("字体颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "White")] public override Color ForeColor { @@ -247,7 +247,7 @@ namespace Sunny.UI /// /// 边框颜色 /// - [Description("边框颜色"), Category("自定义")] + [Description("边框颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public Color RectColor { diff --git a/SunnyUI/Controls/UISwitch.cs b/SunnyUI/Controls/UISwitch.cs index 47365b0a..1add1030 100644 --- a/SunnyUI/Controls/UISwitch.cs +++ b/SunnyUI/Controls/UISwitch.cs @@ -50,7 +50,7 @@ namespace Sunny.UI /// /// 字体颜色 /// - [Description("字体颜色"), Category("自定义")] + [Description("字体颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "White")] public override Color ForeColor { @@ -114,7 +114,7 @@ namespace Sunny.UI /// /// 填充颜色,当值为背景色或透明色或空值则不填充 /// - [Description("填充颜色"), Category("自定义")] + [Description("填充颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "White")] public Color ButtonColor { @@ -125,7 +125,7 @@ namespace Sunny.UI /// /// 边框颜色 /// - [Description("选中颜色"), Category("自定义")] + [Description("选中颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public Color ActiveColor { diff --git a/SunnyUI/Controls/UITabControl.cs b/SunnyUI/Controls/UITabControl.cs index 28e5bdd8..17da578d 100644 --- a/SunnyUI/Controls/UITabControl.cs +++ b/SunnyUI/Controls/UITabControl.cs @@ -111,10 +111,18 @@ namespace Sunny.UI private Color _fillColor = UIColor.LightBlue; private Color tabBackColor = Color.FromArgb(56, 56, 56); + /// + /// Tag字符串 + /// [DefaultValue(null)] + [Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")] public string TagString { get; set; } + /// + /// 自定义主题风格 + /// [DefaultValue(false)] + [Description("获取或设置可以自定义主题风格"), Category("SunnyUI")] public bool StyleCustomMode { get; set; } private HorizontalAlignment textAlignment = HorizontalAlignment.Center; @@ -158,7 +166,7 @@ namespace Sunny.UI /// /// 当使用边框时填充颜色,当值为背景色或透明色或空值则不填充 /// - [Description("当使用边框时填充颜色,当值为背景色或透明色或空值则不填充"), Category("自定义")] + [Description("当使用边框时填充颜色,当值为背景色或透明色或空值则不填充"), Category("SunnyUI")] [DefaultValue(typeof(Color), "235, 243, 255")] public Color FillColor { @@ -175,7 +183,7 @@ namespace Sunny.UI /// /// 边框颜色 /// - [Description("边框颜色"), Category("自定义")] + [Description("边框颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "56, 56, 56")] public Color TabBackColor { @@ -193,7 +201,7 @@ namespace Sunny.UI /// /// 边框颜色 /// - [Description("选中Tab页背景色"), Category("自定义")] + [Description("选中Tab页背景色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "36, 36, 36")] public Color TabSelectedColor { @@ -211,7 +219,7 @@ namespace Sunny.UI /// /// 边框颜色 /// - [Description("选中Tab页字体色"), Category("自定义")] + [Description("选中Tab页字体色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public Color TabSelectedForeColor { @@ -229,7 +237,7 @@ namespace Sunny.UI /// /// 边框颜色 /// - [Description("未选中Tab页字体色"), Category("自定义")] + [Description("未选中Tab页字体色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "240, 240, 240")] public Color TabUnSelectedForeColor { @@ -247,7 +255,7 @@ namespace Sunny.UI /// /// 边框颜色 /// - [Description("选中Tab页高亮"), Category("自定义")] + [Description("选中Tab页高亮"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public Color TabSelectedHighColor @@ -263,7 +271,10 @@ namespace Sunny.UI private UIStyle _style = UIStyle.Blue; - [DefaultValue(UIStyle.Blue)] + /// + /// 主题样式 + /// + [DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")] public UIStyle Style { get => _style; @@ -345,7 +356,7 @@ namespace Sunny.UI private bool showCloseButton; - [DefaultValue(false),Description("所有Tab页面标题显示关闭按钮")] + [DefaultValue(false), Description("所有Tab页面标题显示关闭按钮")] public bool ShowCloseButton { get => showCloseButton; diff --git a/SunnyUI/Controls/UITabControlMenu.cs b/SunnyUI/Controls/UITabControlMenu.cs index 2b80ec6a..8d91883a 100644 --- a/SunnyUI/Controls/UITabControlMenu.cs +++ b/SunnyUI/Controls/UITabControlMenu.cs @@ -20,7 +20,6 @@ ******************************************************************************/ using System; -using System.Collections.Concurrent; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; @@ -42,10 +41,18 @@ namespace Sunny.UI Version = UIGlobal.Version; } + /// + /// 自定义主题风格 + /// [DefaultValue(false)] + [Description("获取或设置可以自定义主题风格"), Category("SunnyUI")] public bool StyleCustomMode { get; set; } + /// + /// Tag字符串 + /// [DefaultValue(null)] + [Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")] public string TagString { get; set; } public string Version { get; } @@ -68,7 +75,7 @@ namespace Sunny.UI /// /// 当使用边框时填充颜色,当值为背景色或透明色或空值则不填充 /// - [Description("当使用边框时填充颜色,当值为背景色或透明色或空值则不填充"), Category("自定义")] + [Description("当使用边框时填充颜色,当值为背景色或透明色或空值则不填充"), Category("SunnyUI")] [DefaultValue(typeof(Color), "235, 243, 255")] public Color FillColor { @@ -85,7 +92,7 @@ namespace Sunny.UI /// /// 边框颜色 /// - [Description("边框颜色"), Category("自定义")] + [Description("边框颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "56, 56, 56")] public Color TabBackColor { @@ -103,7 +110,7 @@ namespace Sunny.UI /// /// 边框颜色 /// - [Description("选中Tab页背景色"), Category("自定义")] + [Description("选中Tab页背景色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "36, 36, 36")] public Color TabSelectedColor { @@ -121,7 +128,7 @@ namespace Sunny.UI /// /// 边框颜色 /// - [Description("选中Tab页字体色"), Category("自定义")] + [Description("选中Tab页字体色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public Color TabSelectedForeColor { @@ -139,7 +146,7 @@ namespace Sunny.UI /// /// 边框颜色 /// - [Description("未选中Tab页字体色"), Category("自定义")] + [Description("未选中Tab页字体色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "Silver")] public Color TabUnSelectedForeColor { @@ -157,7 +164,7 @@ namespace Sunny.UI /// /// 边框颜色 /// - [Description("选中Tab页高亮"), Category("自定义")] + [Description("选中Tab页高亮"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public Color TabSelectedHighColor @@ -173,7 +180,10 @@ namespace Sunny.UI private UIStyle _style = UIStyle.Blue; - [DefaultValue(UIStyle.Blue)] + /// + /// 主题样式 + /// + [DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")] public UIStyle Style { get => _style; diff --git a/SunnyUI/Controls/UITextBox.cs b/SunnyUI/Controls/UITextBox.cs index 9a32f356..fa9fff0a 100644 --- a/SunnyUI/Controls/UITextBox.cs +++ b/SunnyUI/Controls/UITextBox.cs @@ -80,12 +80,12 @@ namespace Sunny.UI private void Edit_Leave(object sender, EventArgs e) { - Leave?.Invoke(sender,e); + Leave?.Invoke(sender, e); } private void UITextBox_TextAlignmentChange(object sender, ContentAlignment alignment) { - if (edit==null) return; + if (edit == null) return; if (alignment == ContentAlignment.TopLeft || alignment == ContentAlignment.MiddleLeft || alignment == ContentAlignment.BottomLeft) edit.TextAlign = HorizontalAlignment.Left; @@ -101,7 +101,7 @@ namespace Sunny.UI private void Edit_DoubleClick(object sender, EventArgs e) { - DoubleClick?.Invoke(this,e); + DoubleClick?.Invoke(this, e); } public new event EventHandler DoubleClick; @@ -109,7 +109,7 @@ namespace Sunny.UI private void Edit_Click(object sender, EventArgs e) { - Click?.Invoke(this,e); + Click?.Invoke(this, e); } protected override void OnCursorChanged(EventArgs e) @@ -247,7 +247,7 @@ namespace Sunny.UI public new event KeyPressEventHandler KeyPress; - public new event EventHandler Leave; + public new event EventHandler Leave; private void EditTextChanged(object s, EventArgs e) { @@ -362,7 +362,7 @@ namespace Sunny.UI } } - [Description("输入类型"), Category("自定义")] + [Description("输入类型"), Category("SunnyUI")] [DefaultValue(UIEditType.String)] public UIEditType Type { diff --git a/SunnyUI/Controls/UITimePicker.cs b/SunnyUI/Controls/UITimePicker.cs index c22a366a..d277647d 100644 --- a/SunnyUI/Controls/UITimePicker.cs +++ b/SunnyUI/Controls/UITimePicker.cs @@ -102,6 +102,7 @@ namespace Sunny.UI ItemForm = new UIDropDown(item); } + [Description("选中时间"), Category("SunnyUI")] public DateTime Value { get => item.Time; @@ -114,7 +115,7 @@ namespace Sunny.UI private string timeFormat = "HH:mm:ss"; - [Description("时间格式化掩码"), Category("自定义")] + [Description("时间格式化掩码"), Category("SunnyUI")] [DefaultValue("HH:mm:ss")] public string TimeFormat { diff --git a/SunnyUI/Controls/UITitlePanel.cs b/SunnyUI/Controls/UITitlePanel.cs index 93007dbd..0813f79b 100644 --- a/SunnyUI/Controls/UITitlePanel.cs +++ b/SunnyUI/Controls/UITitlePanel.cs @@ -33,7 +33,7 @@ namespace Sunny.UI { private int _titleHeight = 35; - [Description("面板高度"), Category("自定义")] + [Description("面板高度"), Category("SunnyUI")] [DefaultValue(35)] public int TitleHeight { diff --git a/SunnyUI/Controls/UITrackBar.cs b/SunnyUI/Controls/UITrackBar.cs index 223f2196..dcef8ad6 100644 --- a/SunnyUI/Controls/UITrackBar.cs +++ b/SunnyUI/Controls/UITrackBar.cs @@ -171,7 +171,7 @@ namespace Sunny.UI /// /// 填充颜色,当值为背景色或透明色或空值则不填充 /// - [Description("填充颜色"), Category("自定义")] + [Description("填充颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "235, 243, 255")] public Color FillColor { @@ -182,7 +182,7 @@ namespace Sunny.UI /// /// 字体颜色 /// - [Description("字体颜色"), Category("自定义")] + [Description("字体颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public override Color ForeColor { @@ -193,7 +193,7 @@ namespace Sunny.UI /// /// 边框颜色 /// - [Description("边框颜色"), Category("自定义")] + [Description("边框颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "80, 160, 255")] public Color RectColor { diff --git a/SunnyUI/Forms/UIForm.cs b/SunnyUI/Forms/UIForm.cs index b6acd3a6..975f2d4b 100644 --- a/SunnyUI/Forms/UIForm.cs +++ b/SunnyUI/Forms/UIForm.cs @@ -147,7 +147,11 @@ namespace Sunny.UI } } + /// + /// Tag字符串 + /// [DefaultValue(null)] + [Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")] public string TagString { get; set; } /// @@ -271,7 +275,7 @@ namespace Sunny.UI /// /// 标题栏高度 /// - [Description("标题栏高度"), Category("Appearance"), DefaultValue(35)] + [Description("标题栏高度"), Category("SunnyUI"), DefaultValue(35)] public int TitleHeight { get => titleHeight; @@ -292,7 +296,7 @@ namespace Sunny.UI /// /// 标题栏颜色 /// - [Description("标题栏颜色"), Category("Appearance"), DefaultValue(typeof(Color), "80, 160, 255")] + [Description("标题栏颜色"), Category("SunnyUI"), DefaultValue(typeof(Color), "80, 160, 255")] public Color TitleColor { get => titleColor; @@ -312,7 +316,7 @@ namespace Sunny.UI /// /// 标题颜色 /// - [Description("标题前景色(标题颜色)"), Category("Appearance"), DefaultValue(typeof(Color), "White")] + [Description("标题前景色(标题颜色)"), Category("SunnyUI"), DefaultValue(typeof(Color), "White")] public Color TitleForeColor { get => titleForeColor; @@ -413,7 +417,7 @@ namespace Sunny.UI /// /// 填充颜色,当值为背景色或透明色或空值则不填充 /// - [Description("背景颜色"), Category("Appearance")] + [Description("背景颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "48, 48, 48")] public override Color ForeColor { @@ -434,7 +438,7 @@ namespace Sunny.UI /// 边框颜色 /// /// The color of the border style. - [Description("边框颜色"), Category("Appearance")] + [Description("边框颜色"), Category("SunnyUI")] public Color RectColor { get => rectColor; @@ -909,7 +913,7 @@ namespace Sunny.UI } 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 /// /// 配色主题 /// - [Description("配色主题"), Category("Appearance")] + [Description("配色主题"), Category("SunnyUI")] [DefaultValue(UIStyle.Blue)] public UIStyle Style { @@ -932,7 +936,7 @@ namespace Sunny.UI set => SetStyle(value); } - [Description("自定义主题模式(开启后全局主题更改将对当前窗体无效)"), Category("Appearance")] + [Description("自定义主题模式(开启后全局主题更改将对当前窗体无效)"), Category("SunnyUI")] [DefaultValue(false)] public bool StyleCustomMode { get; set; } @@ -1012,7 +1016,7 @@ namespace Sunny.UI /// /// 是否显示圆角 /// - [Description("是否显示圆角"), Category("Appearance")] + [Description("是否显示圆角"), Category("SunnyUI")] [DefaultValue(true)] public bool ShowRadius { @@ -1033,7 +1037,7 @@ namespace Sunny.UI /// /// 是否显示边框 /// - [Description("是否显示边框"), Category("Appearance")] + [Description("是否显示边框"), Category("SunnyUI")] [DefaultValue(true)] public bool ShowRect { @@ -1183,7 +1187,7 @@ namespace Sunny.UI } } - [Description("文字对齐方式"), Category("Appearance")] + [Description("文字对齐方式"), Category("SunnyUI")] public StringAlignment TextAlignment { get => textAlignment; diff --git a/SunnyUI/Pages/UIPage.cs b/SunnyUI/Pages/UIPage.cs index 611f2258..38caf76f 100644 --- a/SunnyUI/Pages/UIPage.cs +++ b/SunnyUI/Pages/UIPage.cs @@ -97,7 +97,7 @@ namespace Sunny.UI } } - [DefaultValue(false),Description("在Frame框架中不被关闭")] + [DefaultValue(false), Description("在Frame框架中不被关闭")] public bool AlwaysOpen { get; set; } protected virtual void SymbolChange() @@ -160,18 +160,31 @@ namespace Sunny.UI } } - [DefaultValue(null)] public string TagString { get; set; } + /// + /// Tag字符串 + /// + [DefaultValue(null)] + [Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")] + public string TagString { get; set; } public string Version { get; } - [DefaultValue(UIStyle.Blue)] + /// + /// 主题样式 + /// + [DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")] public UIStyle Style { get => _style; set => SetStyle(value); } - [DefaultValue(false)] public bool StyleCustomMode { get; set; } + /// + /// 自定义主题风格 + /// + [DefaultValue(false)] + [Description("获取或设置可以自定义主题风格"), Category("SunnyUI")] + public bool StyleCustomMode { get; set; } public event EventHandler Initialize; diff --git a/SunnyUI/Pages/UITitlePage.cs b/SunnyUI/Pages/UITitlePage.cs index d0f27595..3c6a9436 100644 --- a/SunnyUI/Pages/UITitlePage.cs +++ b/SunnyUI/Pages/UITitlePage.cs @@ -61,7 +61,7 @@ namespace Sunny.UI /// /// 填充颜色,当值为背景色或透明色或空值则不填充 /// - [Description("标题颜色"), Category("自定义")] + [Description("标题颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "76, 76, 76")] public Color TitleFillColor { @@ -76,7 +76,7 @@ namespace Sunny.UI /// /// 字体颜色 /// - [Description("字体颜色"), Category("自定义")] + [Description("字体颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "White")] public Color TitleForeColor { @@ -100,7 +100,7 @@ namespace Sunny.UI /// /// 填充颜色,当值为背景色或透明色或空值则不填充 /// - [Description("填充颜色"), Category("自定义")] + [Description("填充颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "76, 76, 76")] public Color FillColor { @@ -111,7 +111,7 @@ namespace Sunny.UI /// /// 字体颜色 /// - [Description("字体颜色"), Category("自定义")] + [Description("字体颜色"), Category("SunnyUI")] [DefaultValue(typeof(Color), "White")] public override Color ForeColor { diff --git a/SunnyUI/Style/UIStyleManager.cs b/SunnyUI/Style/UIStyleManager.cs index 41033c6e..4cc0b070 100644 --- a/SunnyUI/Style/UIStyleManager.cs +++ b/SunnyUI/Style/UIStyleManager.cs @@ -31,7 +31,7 @@ namespace Sunny.UI /// /// 主题样式 /// - [DefaultValue(UIStyle.Blue)] + [DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")] public UIStyle Style { get => UIStyles.Style;