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

This commit is contained in:
Sunny 2020-08-09 15:06:09 +08:00
parent 99b7db183c
commit 00f8d9e293
36 changed files with 228 additions and 68 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -256,6 +256,7 @@
this.uiLedBulb4.BlinkInterval = 500; this.uiLedBulb4.BlinkInterval = 500;
this.uiLedBulb4.Location = new System.Drawing.Point(507, 52); this.uiLedBulb4.Location = new System.Drawing.Point(507, 52);
this.uiLedBulb4.Name = "uiLedBulb4"; this.uiLedBulb4.Name = "uiLedBulb4";
this.uiLedBulb4.On = false;
this.uiLedBulb4.Size = new System.Drawing.Size(32, 32); this.uiLedBulb4.Size = new System.Drawing.Size(32, 32);
this.uiLedBulb4.TabIndex = 41; this.uiLedBulb4.TabIndex = 41;
this.uiLedBulb4.Text = "uiLedBulb4"; this.uiLedBulb4.Text = "uiLedBulb4";

View File

@ -123,6 +123,9 @@
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="uiToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>107, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>35</value> <value>35</value>
</metadata> </metadata>

View File

@ -63,6 +63,7 @@ namespace Sunny.UI
public event EventHandler ValueChanged; public event EventHandler ValueChanged;
[Description("滚动条当前值"), Category("SunnyUI")]
[DefaultValue(0)] [DefaultValue(0)]
public int Value public int Value
{ {
@ -75,6 +76,7 @@ namespace Sunny.UI
} }
} }
[Description("滚动条最大值"), Category("SunnyUI")]
[DefaultValue(100)] [DefaultValue(100)]
public int Maximum public int Maximum
{ {
@ -448,6 +450,7 @@ namespace Sunny.UI
set => SetFillColor(value); set => SetFillColor(value);
} }
[Description("鼠标移上颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "111, 168, 255")] [DefaultValue(typeof(Color), "111, 168, 255")]
public Color HoverColor public Color HoverColor
{ {
@ -455,6 +458,7 @@ namespace Sunny.UI
set => SetFillHoveColor(value); set => SetFillHoveColor(value);
} }
[Description("鼠标按下颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "74, 131, 229")] [DefaultValue(typeof(Color), "74, 131, 229")]
public Color PressColor public Color PressColor
{ {

View File

@ -50,7 +50,7 @@ namespace Sunny.UI
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")] [Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; } public string TagString { get; set; }
[Category("外观")] [Category("SunnyUI")]
[Description("按钮文字")] [Description("按钮文字")]
[Browsable(true)] [Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
@ -67,6 +67,7 @@ namespace Sunny.UI
} }
} }
[Description("文字对齐方式"), Category("SunnyUI")]
[DefaultValue(ContentAlignment.MiddleCenter)] [DefaultValue(ContentAlignment.MiddleCenter)]
public ContentAlignment TextAlign public ContentAlignment TextAlign
{ {
@ -78,7 +79,7 @@ namespace Sunny.UI
} }
} }
[Category("外观")] [Category("SunnyUI")]
[Description("文字字体")] [Description("文字字体")]
[Browsable(true)] [Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
@ -92,7 +93,7 @@ namespace Sunny.UI
} }
} }
[Category("外观")] [Category("SunnyUI")]
[Description("文字颜色")] [Description("文字颜色")]
[Browsable(true)] [Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
@ -109,10 +110,12 @@ namespace Sunny.UI
[Browsable(false)] [Browsable(false)]
[DefaultValue(typeof(Image), "null")] [DefaultValue(typeof(Image), "null")]
[Description("初始化图片"), Category("SunnyUI")]
public new Image InitialImage { get; set; } public new Image InitialImage { get; set; }
[Browsable(false)] [Browsable(false)]
[DefaultValue(typeof(Image), "null")] [DefaultValue(typeof(Image), "null")]
[Description("出错图片"), Category("SunnyUI")]
public new Image ErrorImage { get; set; } public new Image ErrorImage { get; set; }
/// <summary> /// <summary>
@ -137,6 +140,7 @@ namespace Sunny.UI
/// 鼠标移上图片 /// 鼠标移上图片
/// </summary> /// </summary>
[DefaultValue(typeof(Image), "null")] [DefaultValue(typeof(Image), "null")]
[Description("鼠标移上图片"), Category("SunnyUI")]
public Image ImageHover public Image ImageHover
{ {
get => imageHover; get => imageHover;
@ -152,6 +156,7 @@ namespace Sunny.UI
/// 鼠标按下图片 /// 鼠标按下图片
/// </summary> /// </summary>
[DefaultValue(typeof(Image), "null")] [DefaultValue(typeof(Image), "null")]
[Description("鼠标按下图片"), Category("SunnyUI")]
public Image ImagePress public Image ImagePress
{ {
get => imagePress; get => imagePress;
@ -167,6 +172,7 @@ namespace Sunny.UI
/// 不可用时图片 /// 不可用时图片
/// </summary> /// </summary>
[DefaultValue(typeof(Image), "null")] [DefaultValue(typeof(Image), "null")]
[Description("不可用时图片"), Category("SunnyUI")]
public Image ImageDisabled public Image ImageDisabled
{ {
get => imageDisabled; get => imageDisabled;
@ -178,9 +184,10 @@ namespace Sunny.UI
} }
/// <summary> /// <summary>
/// 不可用时图片 /// 选中时图片
/// </summary> /// </summary>
[DefaultValue(typeof(Image), "null")] [DefaultValue(typeof(Image), "null")]
[Description("选中时图片"), Category("SunnyUI")]
public Image ImageSelected public Image ImageSelected
{ {
get => imageSelected; get => imageSelected;
@ -195,6 +202,7 @@ namespace Sunny.UI
/// 是否选中 /// 是否选中
/// </summary> /// </summary>
[DefaultValue(typeof(bool), "false")] [DefaultValue(typeof(bool), "false")]
[Description("是否选中"), Category("SunnyUI")]
public bool Selected public bool Selected
{ {
get => selected; get => selected;
@ -272,6 +280,7 @@ namespace Sunny.UI
public Point imageOffset; public Point imageOffset;
[DefaultValue(typeof(Point), "0, 0")] [DefaultValue(typeof(Point), "0, 0")]
[Description("图片偏移位置"), Category("SunnyUI")]
public Point ImageOffset public Point ImageOffset
{ {
get => imageOffset; get => imageOffset;

View File

@ -124,6 +124,7 @@ namespace Sunny.UI
} }
[DefaultValue(100)] [DefaultValue(100)]
[Description("列表项高度"), Category("SunnyUI")]
public int ItemHeight public int ItemHeight
{ {
get => listbox.ItemHeight; get => listbox.ItemHeight;
@ -131,6 +132,7 @@ namespace Sunny.UI
} }
[DefaultValue(4)] [DefaultValue(4)]
[Description("图片文字间间隔"), Category("SunnyUI")]
public int ImageInterval public int ImageInterval
{ {
get => listbox.ImageInterval; get => listbox.ImageInterval;
@ -138,6 +140,7 @@ namespace Sunny.UI
} }
[DefaultValue(true)] [DefaultValue(true)]
[Description("显示说明文字"), Category("SunnyUI")]
public bool ShowDescription public bool ShowDescription
{ {
get => listbox.ShowDescription; get => listbox.ShowDescription;
@ -197,6 +200,7 @@ 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))]
[MergableProperty(false)] [MergableProperty(false)]
[Browsable(false)] [Browsable(false)]
[Description("列表项"), Category("SunnyUI")]
public ListBox.ObjectCollection Items => listbox.Items; public ListBox.ObjectCollection Items => listbox.Items;
/// <summary> /// <summary>
@ -224,6 +228,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
[Description("选中项背景颜色"), Category("SunnyUI")]
public Color ItemSelectBackColor public Color ItemSelectBackColor
{ {
get => listbox.ItemSelectBackColor; get => listbox.ItemSelectBackColor;
@ -231,6 +236,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "White")] [DefaultValue(typeof(Color), "White")]
[Description("选中项字体颜色"), Category("SunnyUI")]
public Color ItemSelectForeColor public Color ItemSelectForeColor
{ {
get => listbox.ItemSelectForeColor; get => listbox.ItemSelectForeColor;
@ -264,6 +270,7 @@ namespace Sunny.UI
private Color hoverColor = Color.FromArgb(155, 200, 255); private Color hoverColor = Color.FromArgb(155, 200, 255);
[DefaultValue(typeof(Color), "155, 200, 255")] [DefaultValue(typeof(Color), "155, 200, 255")]
[Description("鼠标移上颜色"), Category("SunnyUI")]
public Color HoverColor public Color HoverColor
{ {
get => hoverColor; get => hoverColor;
@ -275,6 +282,7 @@ namespace Sunny.UI
} }
} }
[ToolboxItem(false)]
private sealed class ImageListBox : ListBox, IStyleInterface private sealed class ImageListBox : ListBox, IStyleInterface
{ {
private UIScrollBar bar; private UIScrollBar bar;

View File

@ -30,6 +30,9 @@ using System.Windows.Forms;
namespace Sunny.UI namespace Sunny.UI
{ {
[ToolboxItem(true)]
[DefaultEvent("Click")]
[DefaultProperty("Text")]
public class UILabel : Label, IStyleInterface public class UILabel : Label, IStyleInterface
{ {
public UILabel() public UILabel()
@ -133,6 +136,7 @@ namespace Sunny.UI
private bool autoSize; private bool autoSize;
[Browsable(true)] [Browsable(true)]
[Description("自动大小"), Category("SunnyUI")]
public override bool AutoSize public override bool AutoSize
{ {
get => autoSize; get => autoSize;
@ -167,6 +171,7 @@ namespace Sunny.UI
} }
[DefaultValue(24)] [DefaultValue(24)]
[Description("字体大小"), Category("SunnyUI")]
public int SymbolSize public int SymbolSize
{ {
get => _symbolSize; get => _symbolSize;
@ -179,6 +184,7 @@ namespace Sunny.UI
} }
[DefaultValue(2)] [DefaultValue(2)]
[Description("图标和文字间间隔"), Category("SunnyUI")]
public int ImageInterval public int ImageInterval
{ {
get => _imageInterval; get => _imageInterval;
@ -192,6 +198,7 @@ namespace Sunny.UI
private bool _isCircle; private bool _isCircle;
[DefaultValue(false)] [DefaultValue(false)]
[Description("显示为圆形"), Category("SunnyUI")]
public bool IsCircle public bool IsCircle
{ {
get => _isCircle; get => _isCircle;
@ -214,6 +221,7 @@ namespace Sunny.UI
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[Editor(typeof(UIImagePropertyEditor), typeof(UITypeEditor))] [Editor(typeof(UIImagePropertyEditor), typeof(UITypeEditor))]
[DefaultValue(61452)] [DefaultValue(61452)]
[Description("字体图标"), Category("SunnyUI")]
public int Symbol public int Symbol
{ {
get => _symbol; get => _symbol;
@ -232,6 +240,7 @@ namespace Sunny.UI
private int circleRectWidth = 1; private int circleRectWidth = 1;
[DefaultValue(1)] [DefaultValue(1)]
[Description("圆形边框大小"), Category("SunnyUI")]
public int CircleRectWidth public int CircleRectWidth
{ {
get => circleRectWidth; get => circleRectWidth;
@ -328,6 +337,9 @@ namespace Sunny.UI
} }
} }
[ToolboxItem(true)]
[DefaultEvent("Click")]
[DefaultProperty("Text")]
public sealed class UILinkLabel : LinkLabel, IStyleInterface public sealed class UILinkLabel : LinkLabel, IStyleInterface
{ {
public UILinkLabel() public UILinkLabel()
@ -341,11 +353,6 @@ namespace Sunny.UI
LinkColor = UIColor.Blue; LinkColor = UIColor.Blue;
} }
private void UILabel_ForeColorChanged(object sender, EventArgs e)
{
_style = UIStyle.Custom;
}
/// <summary> /// <summary>
/// Tag字符串 /// Tag字符串
/// </summary> /// </summary>

View File

@ -94,7 +94,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("边框颜色")] [Description("边框颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "0, 0, 0")] [DefaultValue(typeof(Color), "0, 0, 0")]
public Color BorderColor public Color BorderColor
{ {
@ -109,7 +109,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 内线颜色 /// 内线颜色
/// </summary> /// </summary>
[Description("内线颜色")] [Description("内线颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "0xC0, 0xC0, 0xC0")] [DefaultValue(typeof(Color), "0xC0, 0xC0, 0xC0")]
public Color BorderInColor public Color BorderInColor
{ {
@ -124,7 +124,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// LED背景色 /// LED背景色
/// </summary> /// </summary>
[Description("LED背景色")] [Description("LED背景色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "0, 0x33, 0")] [DefaultValue(typeof(Color), "0, 0x33, 0")]
public Color LedBackColor public Color LedBackColor
{ {
@ -147,7 +147,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框宽度 /// 边框宽度
/// </summary> /// </summary>
[DefaultValue(1), Description("边框宽度")] [DefaultValue(1), Description("边框宽度"), Category("SunnyUI")]
public int BorderWidth public int BorderWidth
{ {
get => borderWidth; get => borderWidth;
@ -165,7 +165,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 内线宽度 /// 内线宽度
/// </summary> /// </summary>
[DefaultValue(1), Description("内线宽度")] [DefaultValue(1), Description("内线宽度"), Category("SunnyUI")]
public int BorderInWidth public int BorderInWidth
{ {
get => borderInWidth; get => borderInWidth;
@ -183,7 +183,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 左右边距 /// 左右边距
/// </summary> /// </summary>
[DefaultValue(2), Description("左右边距")] [DefaultValue(2), Description("左右边距"), Category("SunnyUI")]
public int IntervalH public int IntervalH
{ {
get => intervalH; get => intervalH;
@ -201,7 +201,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 上下边距 /// 上下边距
/// </summary> /// </summary>
[DefaultValue(5), Description("上下边距")] [DefaultValue(5), Description("上下边距"), Category("SunnyUI")]
public int IntervalV public int IntervalV
{ {
get => intervalV; get => intervalV;
@ -219,7 +219,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// LED亮块间距 /// LED亮块间距
/// </summary> /// </summary>
[DefaultValue(1), Description("LED亮块间距")] [DefaultValue(1), Description("LED亮块间距"), Category("SunnyUI")]
public int IntervalIn public int IntervalIn
{ {
get => intervalIn; get => intervalIn;
@ -237,7 +237,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// LED亮块大小 /// LED亮块大小
/// </summary> /// </summary>
[DefaultValue(2), Description("LED亮块大小")] [DefaultValue(2), Description("LED亮块大小"), Category("SunnyUI")]
public int IntervalOn public int IntervalOn
{ {
get => intervalOn; get => intervalOn;
@ -255,7 +255,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 显示字符个数 /// 显示字符个数
/// </summary> /// </summary>
[DefaultValue(10), Description("显示字符个数")] [DefaultValue(10), Description("显示字符个数"), Category("SunnyUI")]
public int CharCount public int CharCount
{ {
get => charCount; get => charCount;

View File

@ -94,6 +94,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 计时 /// 计时
/// </summary> /// </summary>
[Browsable(false)]
public TimeSpan TimeSpan { get; private set; } public TimeSpan TimeSpan { get; private set; }
private DateTime StartTime; private DateTime StartTime;
@ -119,11 +120,12 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 是否开始工作 /// 是否开始工作
/// </summary> /// </summary>
[Browsable(false)]
public bool IsWorking => timer.Enabled; public bool IsWorking => timer.Enabled;
private bool _active; private bool _active;
[DefaultValue(false)] [DefaultValue(false), Description("是否开始工作"), Category("SunnyUI")]
public bool Active public bool Active
{ {
get => _active; get => _active;

View File

@ -48,7 +48,7 @@ namespace Sunny.UI
private int interval = 500; private int interval = 500;
[DefaultValue(500)] [DefaultValue(500), Description("显示间隔"), Category("SunnyUI")]
public int Interval public int Interval
{ {
get => interval; get => interval;
@ -72,6 +72,7 @@ namespace Sunny.UI
private UILightState state = UILightState.On; private UILightState state = UILightState.On;
[DefaultValue(UILightState.On)] [DefaultValue(UILightState.On)]
[Description("显示状态"), Category("SunnyUI")]
public UILightState State public UILightState State
{ {
get => state; get => state;
@ -162,6 +163,7 @@ namespace Sunny.UI
private bool showCenterColor = true; private bool showCenterColor = true;
[DefaultValue(true)] [DefaultValue(true)]
[Description("是否显示中心颜色"), Category("SunnyUI")]
public bool ShowCenterColor public bool ShowCenterColor
{ {
get => showCenterColor; get => showCenterColor;
@ -175,6 +177,7 @@ namespace Sunny.UI
private bool showLightLine = true; private bool showLightLine = true;
[DefaultValue(true)] [DefaultValue(true)]
[Description("显示灯光亮线"), Category("SunnyUI")]
public bool ShowLightLine public bool ShowLightLine
{ {
get => showLightLine; get => showLightLine;
@ -188,6 +191,7 @@ namespace Sunny.UI
private Color onColor = UIColor.Green; private Color onColor = UIColor.Green;
[DefaultValue(typeof(Color), "110, 190, 40")] [DefaultValue(typeof(Color), "110, 190, 40")]
[Description("打开状态颜色"), Category("SunnyUI")]
public Color OnColor public Color OnColor
{ {
get => onColor; get => onColor;
@ -201,6 +205,7 @@ namespace Sunny.UI
private Color centerColor = UIColor.LightGreen; private Color centerColor = UIColor.LightGreen;
[DefaultValue(typeof(Color), "110, 190, 40")] [DefaultValue(typeof(Color), "110, 190, 40")]
[Description("中心颜色"), Category("SunnyUI")]
public Color CenterColor public Color CenterColor
{ {
get => centerColor; get => centerColor;
@ -214,6 +219,7 @@ namespace Sunny.UI
private Color offColor = UIColor.Gray; private Color offColor = UIColor.Gray;
[DefaultValue(typeof(Color), "140, 140, 140")] [DefaultValue(typeof(Color), "140, 140, 140")]
[Description("关闭状态颜色"), Category("SunnyUI")]
public Color OffColor public Color OffColor
{ {
get => offColor; get => offColor;

View File

@ -53,6 +53,7 @@ namespace Sunny.UI
private LineDirection direction = LineDirection.Horizontal; private LineDirection direction = LineDirection.Horizontal;
[DefaultValue(LineDirection.Horizontal)] [DefaultValue(LineDirection.Horizontal)]
[Description("线条方向"), Category("SunnyUI")]
public LineDirection Direction public LineDirection Direction
{ {
get => direction; get => direction;
@ -65,7 +66,7 @@ namespace Sunny.UI
private int lineSize = 1; private int lineSize = 1;
[Description("线宽")] [Description("线度"), Category("SunnyUI")]
[DefaultValue(1)] [DefaultValue(1)]
public int LineSize public int LineSize
{ {
@ -119,6 +120,7 @@ namespace Sunny.UI
private int textInterval = 10; private int textInterval = 10;
[DefaultValue(10)] [DefaultValue(10)]
[Description("文字边距间隔"), Category("SunnyUI")]
public int TextInterval public int TextInterval
{ {
get => textInterval; get => textInterval;

View File

@ -121,6 +121,7 @@ namespace Sunny.UI
} }
[DefaultValue(25)] [DefaultValue(25)]
[Description("列表项高度"), Category("SunnyUI")]
public int ItemHeight public int ItemHeight
{ {
get => listbox.ItemHeight; get => listbox.ItemHeight;
@ -173,6 +174,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;
[Browsable(false)] [Browsable(false)]
@ -184,6 +186,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
[Description("列表项选中背景颜色"), Category("SunnyUI")]
public Color ItemSelectBackColor public Color ItemSelectBackColor
{ {
get => listbox.ItemSelectBackColor; get => listbox.ItemSelectBackColor;
@ -191,6 +194,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "White")] [DefaultValue(typeof(Color), "White")]
[Description("列表项选中字体颜色"), Category("SunnyUI")]
public Color ItemSelectForeColor public Color ItemSelectForeColor
{ {
get => listbox.ItemSelectForeColor; get => listbox.ItemSelectForeColor;
@ -224,6 +228,7 @@ namespace Sunny.UI
private Color hoverColor = Color.FromArgb(155, 200, 255); private Color hoverColor = Color.FromArgb(155, 200, 255);
[DefaultValue(typeof(Color), "155, 200, 255")] [DefaultValue(typeof(Color), "155, 200, 255")]
[Description("列表项鼠标移上颜色"), Category("SunnyUI")]
public Color HoverColor public Color HoverColor
{ {
get => hoverColor; get => hoverColor;

View File

@ -57,6 +57,7 @@ namespace Sunny.UI
} }
[DefaultValue(null)] [DefaultValue(null)]
[Description("关联的TabControl"), Category("SunnyUI")]
public UITabControl TabControl { get; set; } public UITabControl TabControl { get; set; }
public void SetNodeItem(TreeNode node, NavMenuItem item) public void SetNodeItem(TreeNode node, NavMenuItem item)
@ -94,6 +95,7 @@ namespace Sunny.UI
private UIMenuStyle _menuStyle = UIMenuStyle.Black; private UIMenuStyle _menuStyle = UIMenuStyle.Black;
[DefaultValue(UIMenuStyle.Black)] [DefaultValue(UIMenuStyle.Black)]
[Description("导航栏主题风格"), Category("SunnyUI")]
public UIMenuStyle MenuStyle public UIMenuStyle MenuStyle
{ {
get => _menuStyle; get => _menuStyle;
@ -137,6 +139,7 @@ namespace Sunny.UI
private Color backColor = Color.FromArgb(56, 56, 56); private Color backColor = Color.FromArgb(56, 56, 56);
[DefaultValue(typeof(Color), "56, 56, 56")] [DefaultValue(typeof(Color), "56, 56, 56")]
[Description("背景颜色"), Category("SunnyUI")]
public override Color BackColor public override Color BackColor
{ {
get => backColor; get => backColor;
@ -160,6 +163,7 @@ namespace Sunny.UI
private Color menuHoverColor = Color.FromArgb(76, 76, 76); private Color menuHoverColor = Color.FromArgb(76, 76, 76);
[DefaultValue(typeof(Color), "76, 76, 76")] [DefaultValue(typeof(Color), "76, 76, 76")]
[Description("菜单栏鼠标移上颜色"), Category("SunnyUI")]
public Color MenuHoverColor public Color MenuHoverColor
{ {
get => menuHoverColor; get => menuHoverColor;
@ -209,9 +213,11 @@ namespace Sunny.UI
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[Localizable(true)] [Localizable(true)]
[MergableProperty(false)] [MergableProperty(false)]
[Description("菜单栏显示节点集合"), Category("SunnyUI")]
public TreeNodeCollection Nodes => Menu.Nodes; public TreeNodeCollection Nodes => Menu.Nodes;
[DefaultValue(null)] [DefaultValue(null)]
[Description("图片列表"), Category("SunnyUI")]
public ImageList ImageList public ImageList ImageList
{ {
get => Menu.ImageList; get => Menu.ImageList;
@ -219,6 +225,7 @@ namespace Sunny.UI
} }
[DefaultValue(null)] [DefaultValue(null)]
[Description("下拉菜单图片列表"), Category("SunnyUI")]
public ImageList DropMenuImageList public ImageList DropMenuImageList
{ {
get => NavBarMenu.ImageList; get => NavBarMenu.ImageList;
@ -228,6 +235,7 @@ namespace Sunny.UI
private StringAlignment nodeAlignment = StringAlignment.Far; private StringAlignment nodeAlignment = StringAlignment.Far;
[DefaultValue(StringAlignment.Far)] [DefaultValue(StringAlignment.Far)]
[Description("显示节点位置"), Category("SunnyUI")]
public StringAlignment NodeAlignment public StringAlignment NodeAlignment
{ {
get => nodeAlignment; get => nodeAlignment;
@ -247,6 +255,7 @@ namespace Sunny.UI
private readonly NavMenuHelper MenuHelper = new NavMenuHelper(); private readonly NavMenuHelper MenuHelper = new NavMenuHelper();
[DefaultValue(-1)] [DefaultValue(-1)]
[Description("选中菜单索引"), Category("SunnyUI")]
public int SelectedIndex public int SelectedIndex
{ {
get => selectedIndex; get => selectedIndex;
@ -271,6 +280,7 @@ namespace Sunny.UI
private Color selectedForeColor = UIColor.Blue; private Color selectedForeColor = UIColor.Blue;
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
[Description("选中菜单字体颜色"), Category("SunnyUI")]
public Color SelectedForeColor public Color SelectedForeColor
{ {
get => selectedForeColor; get => selectedForeColor;
@ -363,6 +373,7 @@ namespace Sunny.UI
private int _nodeInterval = 100; private int _nodeInterval = 100;
[DefaultValue(100)] [DefaultValue(100)]
[Description("显示菜单边距"), Category("SunnyUI")]
public int NodeInterval public int NodeInterval
{ {
get => _nodeInterval; get => _nodeInterval;
@ -379,6 +390,7 @@ namespace Sunny.UI
private Size nodeSize = new Size(130, 45); private Size nodeSize = new Size(130, 45);
[DefaultValue(typeof(Size), "130, 45")] [DefaultValue(typeof(Size), "130, 45")]
[Description("显示菜单大小"), Category("SunnyUI")]
public Size NodeSize public Size NodeSize
{ {
get => nodeSize; get => nodeSize;

View File

@ -17,7 +17,7 @@
* : 2020-01-01 * : 2020-01-01
* *
* 2020-01-01: V2.2.0 * 2020-01-01: V2.2.0
* 2020-07-01: V2.2.6 * 2020-07-01: V2.2.6
******************************************************************************/ ******************************************************************************/
using System; using System;
@ -72,6 +72,7 @@ namespace Sunny.UI
} }
[DefaultValue(false)] [DefaultValue(false)]
[Description("只显示一个打开的节点"), Category("SunnyUI")]
public bool ShowOneNode { get; set; } public bool ShowOneNode { get; set; }
/// <summary> /// <summary>
@ -91,6 +92,7 @@ namespace Sunny.UI
private Color backColor = Color.FromArgb(56, 56, 56); private Color backColor = Color.FromArgb(56, 56, 56);
[DefaultValue(typeof(Color), "56, 56, 56")] [DefaultValue(typeof(Color), "56, 56, 56")]
[Description("背景颜色"), Category("SunnyUI")]
public override Color BackColor public override Color BackColor
{ {
get => backColor; get => backColor;
@ -108,7 +110,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充 /// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("背景颜色"), Category("SunnyUI")] [Description("填充颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "56, 56, 56")] [DefaultValue(typeof(Color), "56, 56, 56")]
public Color FillColor public Color FillColor
{ {
@ -129,7 +131,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 填充颜色,当值为背景色或透明色或空值则不填充 /// 填充颜色,当值为背景色或透明色或空值则不填充
/// </summary> /// </summary>
[Description("背景颜色"), Category("SunnyUI")] [Description("字体颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "Silver")] [DefaultValue(typeof(Color), "Silver")]
public override Color ForeColor public override Color ForeColor
{ {
@ -164,6 +166,7 @@ namespace Sunny.UI
public bool StyleCustomMode { get; set; } public bool StyleCustomMode { get; set; }
[DefaultValue(null)] [DefaultValue(null)]
[Description("关联的TabControl"), Category("SunnyUI")]
public UITabControl TabControl { get; set; } public UITabControl TabControl { get; set; }
private Color selectedColor = Color.FromArgb(36, 36, 36); private Color selectedColor = Color.FromArgb(36, 36, 36);
@ -203,6 +206,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "36, 36, 36")] [DefaultValue(typeof(Color), "36, 36, 36")]
[Description("选中节点颜色"), Category("SunnyUI")]
public Color SelectedColor public Color SelectedColor
{ {
get => selectedColor; get => selectedColor;
@ -222,7 +226,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("选中Tab页高亮"), Category("SunnyUI")] [Description("选中节点高亮颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public Color SelectedHighColor public Color SelectedHighColor
@ -239,6 +243,7 @@ namespace Sunny.UI
private Color hoverColor = Color.FromArgb(76, 76, 76); private Color hoverColor = Color.FromArgb(76, 76, 76);
[DefaultValue(typeof(Color), "76, 76, 76")] [DefaultValue(typeof(Color), "76, 76, 76")]
[Description("鼠标移上颜色"), Category("SunnyUI")]
public Color HoverColor public Color HoverColor
{ {
get => hoverColor; get => hoverColor;
@ -278,6 +283,7 @@ namespace Sunny.UI
private UIMenuStyle menuStyle = UIMenuStyle.Black; private UIMenuStyle menuStyle = UIMenuStyle.Black;
[DefaultValue(UIMenuStyle.Black)] [DefaultValue(UIMenuStyle.Black)]
[Description("导航菜单主题风格"), Category("SunnyUI")]
public UIMenuStyle MenuStyle public UIMenuStyle MenuStyle
{ {
get => menuStyle; get => menuStyle;
@ -314,6 +320,7 @@ namespace Sunny.UI
private Color selectedForeColor = UIColor.Blue; private Color selectedForeColor = UIColor.Blue;
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
[Description("选中节点字体颜色"), Category("SunnyUI")]
public Color SelectedForeColor public Color SelectedForeColor
{ {
get => selectedForeColor; get => selectedForeColor;
@ -499,7 +506,7 @@ namespace Sunny.UI
e.State == (TreeNodeStates.Focused | TreeNodeStates.Selected); e.State == (TreeNodeStates.Focused | TreeNodeStates.Selected);
} }
[Description("展开节点后选中第一个子节点"), DefaultValue(true)] [Description("展开节点后选中第一个子节点"), DefaultValue(true), Category("SunnyUI")]
public bool ExpandSelectFirst { get; set; } = true; public bool ExpandSelectFirst { get; set; } = true;
public string Version { get; } public string Version { get; }
@ -815,6 +822,4 @@ namespace Sunny.UI
return childNode; return childNode;
} }
} }
} }

View File

@ -69,6 +69,7 @@ namespace Sunny.UI
/// 总页数 /// 总页数
/// </summary> /// </summary>
[Browsable(false)] [Browsable(false)]
[Description("总页数"), Category("SunnyUI")]
public int PageCount { get; private set; } public int PageCount { get; private set; }
private int pagerCount = 7; private int pagerCount = 7;
@ -213,6 +214,7 @@ namespace Sunny.UI
} }
[DefaultValue(true)] [DefaultValue(true)]
[Description("显示页面跳转按钮"), Category("SunnyUI")]
public bool ShowJumpButton public bool ShowJumpButton
{ {
get => p1.Visible; get => p1.Visible;
@ -224,6 +226,7 @@ namespace Sunny.UI
[DefaultValue(null)] [DefaultValue(null)]
[RefreshProperties(RefreshProperties.Repaint)] [RefreshProperties(RefreshProperties.Repaint)]
[AttributeProvider(typeof(IListSource))] [AttributeProvider(typeof(IListSource))]
[Description("数据源"), Category("SunnyUI")]
public object DataSource public object DataSource
{ {
get => dataSource; get => dataSource;
@ -241,11 +244,12 @@ namespace Sunny.UI
dataSource = value; dataSource = value;
activePage = 1; activePage = 1;
TotalCount = dataManager?.List.Count ?? 0; TotalCount = dataManager?.List.Count ?? 0;
DataSourceChanged?.Invoke(this,null); DataSourceChanged?.Invoke(this, null);
} }
} }
[Browsable(false)] public object PageDataSource { get; private set; } [Browsable(false)]
public object PageDataSource { get; private set; }
private void UIDataGridPage_Click(object sender, EventArgs e) private void UIDataGridPage_Click(object sender, EventArgs e)
{ {

View File

@ -67,7 +67,7 @@ namespace Sunny.UI
private string text; private string text;
[Category("外观")] [Category("SunnyUI")]
[Description("按钮文字")] [Description("按钮文字")]
[Browsable(true)] [Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
@ -107,7 +107,7 @@ namespace Sunny.UI
private ToolStripStatusLabelBorderSides _rectSides = ToolStripStatusLabelBorderSides.All; private ToolStripStatusLabelBorderSides _rectSides = ToolStripStatusLabelBorderSides.All;
[DefaultValue(ToolStripStatusLabelBorderSides.All), Description("边框显示位置")] [DefaultValue(ToolStripStatusLabelBorderSides.All), Description("边框显示位置"), Category("SunnyUI")]
public ToolStripStatusLabelBorderSides RectSides public ToolStripStatusLabelBorderSides RectSides
{ {
get => _rectSides; get => _rectSides;
@ -157,7 +157,7 @@ namespace Sunny.UI
private UICornerRadiusSides _radiusSides = UICornerRadiusSides.All; private UICornerRadiusSides _radiusSides = UICornerRadiusSides.All;
[DefaultValue(UICornerRadiusSides.All), Description("圆角显示位置")] [DefaultValue(UICornerRadiusSides.All), Description("圆角显示位置"), Category("SunnyUI")]
public UICornerRadiusSides RadiusSides public UICornerRadiusSides RadiusSides
{ {
get => _radiusSides; get => _radiusSides;
@ -270,7 +270,7 @@ namespace Sunny.UI
private bool showText = true; private bool showText = true;
[Description("是否显示文字")] [Description("是否显示文字"), Category("SunnyUI")]
[Browsable(false)] [Browsable(false)]
protected bool ShowText protected bool ShowText
{ {
@ -520,6 +520,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "244, 244, 244")] [DefaultValue(typeof(Color), "244, 244, 244")]
[Description("不可用时填充颜色"), Category("SunnyUI")]
public Color FillDisableColor public Color FillDisableColor
{ {
get => fillDisableColor; get => fillDisableColor;
@ -527,6 +528,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "173, 178, 181")] [DefaultValue(typeof(Color), "173, 178, 181")]
[Description("不可用时边框颜色"), Category("SunnyUI")]
public Color RectDisableColor public Color RectDisableColor
{ {
get => rectDisableColor; get => rectDisableColor;
@ -534,6 +536,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "109, 109, 103")] [DefaultValue(typeof(Color), "109, 109, 103")]
[Description("不可用时字体颜色"), Category("SunnyUI")]
public Color ForeDisableColor public Color ForeDisableColor
{ {
get => foreDisableColor; get => foreDisableColor;
@ -582,7 +585,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 文字对齐方向 /// 文字对齐方向
/// </summary> /// </summary>
[Description("文字对齐方向")] [Description("文字对齐方向"), Category("SunnyUI")]
[DefaultValue(ContentAlignment.MiddleCenter)] [DefaultValue(ContentAlignment.MiddleCenter)]
public ContentAlignment TextAlignment public ContentAlignment TextAlignment
{ {

View File

@ -50,6 +50,7 @@ namespace Sunny.UI
} }
[DefaultValue(100)] [DefaultValue(100)]
[Description("最大值"), Category("SunnyUI")]
public int Maximum public int Maximum
{ {
get => maximum; get => maximum;
@ -63,6 +64,7 @@ namespace Sunny.UI
private int posValue; private int posValue;
[DefaultValue(0)] [DefaultValue(0)]
[Description("当前位置"), Category("SunnyUI")]
public int Value public int Value
{ {
get => posValue; get => posValue;
@ -84,6 +86,7 @@ namespace Sunny.UI
private bool showValue = true; private bool showValue = true;
[DefaultValue(true)] [DefaultValue(true)]
[Description("显示进度值"), Category("SunnyUI")]
public bool ShowValue public bool ShowValue
{ {
get => showValue; get => showValue;
@ -95,6 +98,7 @@ namespace Sunny.UI
} }
[DefaultValue(1)] [DefaultValue(1)]
[Description("步进值"), Category("SunnyUI")]
public int Step { get; set; } = 1; public int Step { get; set; } = 1;
public void StepIt() public void StepIt()

View File

@ -49,6 +49,7 @@ namespace Sunny.UI
} }
[DefaultValue(false)] [DefaultValue(false)]
[Description("是否只读"), Category("SunnyUI")]
public bool ReadOnly { get; set; } public bool ReadOnly { get; set; }
/// <summary> /// <summary>
@ -66,6 +67,7 @@ namespace Sunny.UI
private int _imageInterval = 3; private int _imageInterval = 3;
[DefaultValue(16)] [DefaultValue(16)]
[Description("按钮图片大小"), Category("SunnyUI")]
public int ImageSize public int ImageSize
{ {
get => _imageSize; get => _imageSize;
@ -78,6 +80,7 @@ namespace Sunny.UI
} }
[DefaultValue(3)] [DefaultValue(3)]
[Description("按钮图片文字间间隔"), Category("SunnyUI")]
public int ImageInterval public int ImageInterval
{ {
get => _imageInterval; get => _imageInterval;
@ -91,6 +94,7 @@ namespace Sunny.UI
private bool _checked; private bool _checked;
[DefaultValue(false)] [DefaultValue(false)]
[Description("是否选中"), Category("SunnyUI")]
public bool Checked public bool Checked
{ {
get => _checked; get => _checked;

View File

@ -60,6 +60,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;
@ -173,6 +174,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;
@ -186,6 +188,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;
@ -199,6 +202,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;
@ -212,6 +216,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;
@ -225,6 +230,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

@ -62,6 +62,7 @@ namespace Sunny.UI
// } // }
[DefaultValue(false)] [DefaultValue(false)]
[Description("是否只读"), Category("SunnyUI")]
public bool ReadOnly public bool ReadOnly
{ {
get => edit.ReadOnly; get => edit.ReadOnly;
@ -176,8 +177,7 @@ namespace Sunny.UI
KeyUp?.Invoke(sender, e); KeyUp?.Invoke(sender, e);
} }
[CategoryAttribute("文字"), Browsable(true)] [Category("SunnyUI"), Browsable(true), DefaultValue(""), Description("文字")]
[DefaultValue("")]
public override string Text public override string Text
{ {
get => edit.Text; get => edit.Text;
@ -209,7 +209,7 @@ namespace Sunny.UI
private void OnMouseWheel(object sender, MouseEventArgs e) private void OnMouseWheel(object sender, MouseEventArgs e)
{ {
base.OnMouseWheel(e); base.OnMouseWheel(e);
if (bar!=null && bar.Visible && edit!=null) if (bar != null && bar.Visible && edit != null)
{ {
var si = ScrollBarInfo.GetInfo(edit.Handle); var si = ScrollBarInfo.GetInfo(edit.Handle);
if (e.Delta > 10) if (e.Delta > 10)
@ -785,7 +785,7 @@ namespace Sunny.UI
public void Select(int start, int length) public void Select(int start, int length)
{ {
edit.Select(start,length); edit.Select(start, length);
} }
public void SelectAll() public void SelectAll()

View File

@ -100,6 +100,7 @@ namespace Sunny.UI
/// 旋转方式 /// 旋转方式
/// </summary> /// </summary>
[DefaultValue(TRunType.ClockWise)] [DefaultValue(TRunType.ClockWise)]
[Description("旋转方式"), Category("SunnyUI")]
public TRunType RunType public TRunType RunType
{ {
get => _runType; get => _runType;
@ -116,6 +117,7 @@ namespace Sunny.UI
} }
[DefaultValue(TMeterType.Gps)] [DefaultValue(TMeterType.Gps)]
[Description("显示类型"), Category("SunnyUI")]
public TMeterType MeterType public TMeterType MeterType
{ {
get => _meterType; get => _meterType;
@ -147,6 +149,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 背景图片 /// 背景图片
/// </summary> /// </summary>
[Description("背景图片"), Category("SunnyUI")]
public new Image BackgroundImage public new Image BackgroundImage
{ {
get => _backImage; get => _backImage;
@ -172,6 +175,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 箭头图片 /// 箭头图片
/// </summary> /// </summary>
[Description("箭头图片"), Category("SunnyUI")]
public Image AngleImage public Image AngleImage
{ {
get => _angleImage; get => _angleImage;
@ -186,6 +190,7 @@ namespace Sunny.UI
/// 角度 /// 角度
/// </summary> /// </summary>
[DefaultValue(0)] [DefaultValue(0)]
[Description("角度"), Category("SunnyUI")]
public double Angle public double Angle
{ {
get => _angle; get => _angle;

View File

@ -65,6 +65,7 @@ namespace Sunny.UI
public event EventHandler ValueChanged; public event EventHandler ValueChanged;
[DefaultValue(0)] [DefaultValue(0)]
[Description("当前值"), Category("SunnyUI")]
public int Value public int Value
{ {
get => scrollValue; get => scrollValue;
@ -77,6 +78,7 @@ namespace Sunny.UI
} }
[DefaultValue(100)] [DefaultValue(100)]
[Description("最大值"), Category("SunnyUI")]
public int Maximum public int Maximum
{ {
get => maximum; get => maximum;
@ -454,6 +456,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "111, 168, 255")] [DefaultValue(typeof(Color), "111, 168, 255")]
[Description("鼠标移上颜色"), Category("SunnyUI")]
public Color HoverColor public Color HoverColor
{ {
get => fillHoverColor; get => fillHoverColor;
@ -461,6 +464,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "74, 131, 229")] [DefaultValue(typeof(Color), "74, 131, 229")]
[Description("鼠标按下颜色"), Category("SunnyUI")]
public Color PressColor public Color PressColor
{ {
get => fillPressColor; get => fillPressColor;

View File

@ -1,4 +1,25 @@
using System; /******************************************************************************
* SunnyUI
* CopyRight (C) 2012-2020 ShenYongHua().
* QQ群56829229 QQ17612584 EMailSunnyUI@qq.com
*
* Blog: https://www.cnblogs.com/yhuse
* Gitee: https://gitee.com/yhuse/SunnyUI
* GitHub: https://github.com/yhuse/SunnyUI
*
* SunnyUI.dll can be used for free under the GPL-3.0 license.
* If you use this code, please keep this note.
* 使
******************************************************************************
* : UIScrollingText.cs
* :
* : V2.2
* : 2020-06-29
*
* 2020-06-29: V2.2.6
******************************************************************************/
using System;
using System.ComponentModel; using System.ComponentModel;
using System.Drawing; using System.Drawing;
using System.Drawing.Drawing2D; using System.Drawing.Drawing2D;
@ -37,7 +58,7 @@ namespace Sunny.UI
timer.Stop(); timer.Stop();
} }
[DefaultValue(200), Description("刷新间隔")] [DefaultValue(200), Description("刷新间隔"), Category("SunnyUI")]
public int Interval public int Interval
{ {
get => interval; get => interval;
@ -52,7 +73,7 @@ namespace Sunny.UI
private int offset = 10; private int offset = 10;
[DefaultValue(10), Description("偏移量")] [DefaultValue(10), Description("偏移量"), Category("SunnyUI")]
public int Offset public int Offset
{ {
get => offset; get => offset;
@ -167,7 +188,7 @@ namespace Sunny.UI
private UIScrollingType scrollingType; private UIScrollingType scrollingType;
[DefaultValue(UIScrollingType.RightToLeft), Description("滚动方向")] [DefaultValue(UIScrollingType.RightToLeft), Description("滚动方向"), Category("SunnyUI")]
public UIScrollingType ScrollingType public UIScrollingType ScrollingType
{ {
get => scrollingType; get => scrollingType;
@ -224,6 +245,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "244, 244, 244")] [DefaultValue(typeof(Color), "244, 244, 244")]
[Description("不可用时填充颜色"), Category("SunnyUI")]
public Color FillDisableColor public Color FillDisableColor
{ {
get => fillDisableColor; get => fillDisableColor;
@ -231,6 +253,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "173, 178, 181")] [DefaultValue(typeof(Color), "173, 178, 181")]
[Description("不可用时边框颜色"), Category("SunnyUI")]
public Color RectDisableColor public Color RectDisableColor
{ {
get => rectDisableColor; get => rectDisableColor;
@ -238,6 +261,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "109, 109, 103")] [DefaultValue(typeof(Color), "109, 109, 103")]
[Description("不可用时字体颜色"), Category("SunnyUI")]
public Color ForeDisableColor public Color ForeDisableColor
{ {
get => foreDisableColor; get => foreDisableColor;

View File

@ -61,6 +61,7 @@ namespace Sunny.UI
private bool activeValue; private bool activeValue;
[DefaultValue(false)] [DefaultValue(false)]
[Description("是否打开"), Category("SunnyUI")]
public bool Active public bool Active
{ {
get => activeValue; get => activeValue;
@ -75,6 +76,7 @@ namespace Sunny.UI
private string activeText = "开"; private string activeText = "开";
[DefaultValue("开")] [DefaultValue("开")]
[Description("打开文字"), Category("SunnyUI")]
public string ActiveText public string ActiveText
{ {
get => activeText; get => activeText;
@ -88,6 +90,7 @@ namespace Sunny.UI
private string inActiveText = "关"; private string inActiveText = "关";
[DefaultValue("关")] [DefaultValue("关")]
[Description("关闭文字"), Category("SunnyUI")]
public string InActiveText public string InActiveText
{ {
get => inActiveText; get => inActiveText;
@ -101,6 +104,7 @@ namespace Sunny.UI
private Color inActiveColor; private Color inActiveColor;
[DefaultValue(typeof(Color), "Silver")] [DefaultValue(typeof(Color), "Silver")]
[Description("关闭颜色"), Category("SunnyUI")]
public Color InActiveColor public Color InActiveColor
{ {
get => inActiveColor; get => inActiveColor;
@ -125,7 +129,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 边框颜色 /// 边框颜色
/// </summary> /// </summary>
[Description("选中颜色"), Category("SunnyUI")] [Description("打开颜色"), Category("SunnyUI")]
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
public Color ActiveColor public Color ActiveColor
{ {

View File

@ -42,6 +42,7 @@ namespace Sunny.UI
} }
[DefaultValue(24)] [DefaultValue(24)]
[Description("字体图标大小"), Category("SunnyUI")]
public int SymbolSize public int SymbolSize
{ {
get => _symbolSize; get => _symbolSize;
@ -54,11 +55,13 @@ namespace Sunny.UI
} }
[DefaultValue(null)] [DefaultValue(null)]
[Description("图片"), Category("SunnyUI")]
public Image Image { get; set; } public Image Image { get; set; }
private ContentAlignment imageAlign = ContentAlignment.MiddleCenter; private ContentAlignment imageAlign = ContentAlignment.MiddleCenter;
[DefaultValue(ContentAlignment.MiddleCenter)] [DefaultValue(ContentAlignment.MiddleCenter)]
[Description("图片放置位置"), Category("SunnyUI")]
public ContentAlignment ImageAlign public ContentAlignment ImageAlign
{ {
get => imageAlign; get => imageAlign;
@ -70,6 +73,7 @@ namespace Sunny.UI
} }
[DefaultValue(2)] [DefaultValue(2)]
[Description("图片文字间间隔"), Category("SunnyUI")]
public int ImageInterval public int ImageInterval
{ {
get => _imageInterval; get => _imageInterval;
@ -83,6 +87,7 @@ namespace Sunny.UI
private bool _isCircle; private bool _isCircle;
[DefaultValue(false)] [DefaultValue(false)]
[Description("是否是圆形"), Category("SunnyUI")]
public bool IsCircle public bool IsCircle
{ {
get => _isCircle; get => _isCircle;
@ -105,6 +110,7 @@ namespace Sunny.UI
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[Editor(typeof(UIImagePropertyEditor), typeof(UITypeEditor))] [Editor(typeof(UIImagePropertyEditor), typeof(UITypeEditor))]
[DefaultValue(61452)] [DefaultValue(61452)]
[Description("字体图标"), Category("SunnyUI")]
public int Symbol public int Symbol
{ {
get => _symbol; get => _symbol;
@ -131,6 +137,7 @@ namespace Sunny.UI
private int circleRectWidth = 1; private int circleRectWidth = 1;
[DefaultValue(1)] [DefaultValue(1)]
[Description("圆形边框大小"), Category("SunnyUI")]
public int CircleRectWidth public int CircleRectWidth
{ {
get => circleRectWidth; get => circleRectWidth;

View File

@ -85,6 +85,7 @@ namespace Sunny.UI
} }
[DefaultValue(true)] [DefaultValue(true)]
[Description("是否禁用Ctrl+Tab"), Category("SunnyUI")]
public bool ForbidCtrlTab { get; set; } = true; public bool ForbidCtrlTab { get; set; } = true;
public void SelectPage(int pageIndex) => Helper.SelectPage(pageIndex); public void SelectPage(int pageIndex) => Helper.SelectPage(pageIndex);
@ -128,6 +129,7 @@ namespace Sunny.UI
private HorizontalAlignment textAlignment = HorizontalAlignment.Center; private HorizontalAlignment textAlignment = HorizontalAlignment.Center;
[DefaultValue(HorizontalAlignment.Center)] [DefaultValue(HorizontalAlignment.Center)]
[Description("文字显示方向"), Category("SunnyUI")]
public HorizontalAlignment TextAlignment public HorizontalAlignment TextAlignment
{ {
get => textAlignment; get => textAlignment;
@ -141,6 +143,7 @@ namespace Sunny.UI
private bool tabVisible = true; private bool tabVisible = true;
[DefaultValue(true)] [DefaultValue(true)]
[Description("标签页是否显示"), Category("SunnyUI")]
public bool TabVisible public bool TabVisible
{ {
get => tabVisible; get => tabVisible;
@ -281,6 +284,7 @@ namespace Sunny.UI
set => SetStyle(value); set => SetStyle(value);
} }
[Browsable(false)]
public override Rectangle DisplayRectangle public override Rectangle DisplayRectangle
{ {
get get
@ -323,6 +327,7 @@ namespace Sunny.UI
private UIMenuStyle _menuStyle = UIMenuStyle.Black; private UIMenuStyle _menuStyle = UIMenuStyle.Black;
[DefaultValue(UIMenuStyle.Black)] [DefaultValue(UIMenuStyle.Black)]
[Description("主题风格"), Category("SunnyUI")]
public UIMenuStyle MenuStyle public UIMenuStyle MenuStyle
{ {
get => _menuStyle; get => _menuStyle;
@ -356,7 +361,7 @@ namespace Sunny.UI
private bool showCloseButton; private bool showCloseButton;
[DefaultValue(false), Description("所有Tab页面标题显示关闭按钮")] [DefaultValue(false), Description("所有Tab页面标题显示关闭按钮"), Category("SunnyUI")]
public bool ShowCloseButton public bool ShowCloseButton
{ {
get => showCloseButton; get => showCloseButton;
@ -370,7 +375,7 @@ namespace Sunny.UI
private bool showActiveCloseButton; private bool showActiveCloseButton;
[DefaultValue(false), Description("当前激活的Tab页面标题显示关闭按钮")] [DefaultValue(false), Description("当前激活的Tab页面标题显示关闭按钮"), Category("SunnyUI")]
public bool ShowActiveCloseButton public bool ShowActiveCloseButton
{ {
get => showActiveCloseButton; get => showActiveCloseButton;
@ -526,6 +531,7 @@ namespace Sunny.UI
} }
[DefaultValue(UITabPosition.Left)] [DefaultValue(UITabPosition.Left)]
[Description("标签页显示位置"), Category("SunnyUI")]
public UITabPosition TabPosition public UITabPosition TabPosition
{ {
get => (RightToLeftLayout && RightToLeft == RightToLeft.Yes) get => (RightToLeftLayout && RightToLeft == RightToLeft.Yes)

View File

@ -59,6 +59,8 @@ namespace Sunny.UI
private HorizontalAlignment textAlignment = HorizontalAlignment.Center; private HorizontalAlignment textAlignment = HorizontalAlignment.Center;
[Description("文字显示方向"), Category("SunnyUI")]
[DefaultValue(HorizontalAlignment.Center)]
public HorizontalAlignment TextAlignment public HorizontalAlignment TextAlignment
{ {
get => textAlignment; get => textAlignment;
@ -225,6 +227,7 @@ namespace Sunny.UI
private UIMenuStyle _menuStyle = UIMenuStyle.Black; private UIMenuStyle _menuStyle = UIMenuStyle.Black;
[DefaultValue(UIMenuStyle.Black)] [DefaultValue(UIMenuStyle.Black)]
[Description("主题风格"), Category("SunnyUI")]
public UIMenuStyle MenuStyle public UIMenuStyle MenuStyle
{ {
get => _menuStyle; get => _menuStyle;

View File

@ -222,6 +222,7 @@ namespace Sunny.UI
} }
[DefaultValue(null)] [DefaultValue(null)]
[Description("水印文字"), Category("SunnyUI")]
public string Watermark public string Watermark
{ {
get => edit.Watermark; get => edit.Watermark;
@ -345,6 +346,7 @@ namespace Sunny.UI
} }
[DefaultValue('\0')] [DefaultValue('\0')]
[Description("密码掩码"), Category("SunnyUI")]
public char PasswordChar public char PasswordChar
{ {
get => edit.PasswordChar; get => edit.PasswordChar;
@ -352,6 +354,7 @@ namespace Sunny.UI
} }
[DefaultValue(false)] [DefaultValue(false)]
[Description("是否只读"), Category("SunnyUI")]
public bool ReadOnly public bool ReadOnly
{ {
get => edit.ReadOnly; get => edit.ReadOnly;
@ -373,7 +376,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 当InputType为数字类型时能输入的最大值 /// 当InputType为数字类型时能输入的最大值
/// </summary> /// </summary>
[Description("当InputType为数字类型时能输入的最大值。")] [Description("当InputType为数字类型时能输入的最大值。"), Category("SunnyUI")]
[DefaultValue(int.MaxValue)] [DefaultValue(int.MaxValue)]
public double Maximum public double Maximum
{ {
@ -384,7 +387,7 @@ namespace Sunny.UI
/// <summary> /// <summary>
/// 当InputType为数字类型时能输入的最小值 /// 当InputType为数字类型时能输入的最小值
/// </summary> /// </summary>
[Description("当InputType为数字类型时能输入的最小值。")] [Description("当InputType为数字类型时能输入的最小值。"), Category("SunnyUI")]
[DefaultValue(int.MinValue)] [DefaultValue(int.MinValue)]
public double Minimum public double Minimum
{ {
@ -393,6 +396,7 @@ namespace Sunny.UI
} }
[DefaultValue(false)] [DefaultValue(false)]
[Description("是否判断最大值显示"), Category("SunnyUI")]
public bool HasMaximum public bool HasMaximum
{ {
get => edit.HasMaxValue; get => edit.HasMaxValue;
@ -400,6 +404,7 @@ namespace Sunny.UI
} }
[DefaultValue(false)] [DefaultValue(false)]
[Description("是否判断最小值显示"), Category("SunnyUI")]
public bool HasMinimum public bool HasMinimum
{ {
get => edit.HasMinValue; get => edit.HasMinValue;
@ -407,6 +412,7 @@ namespace Sunny.UI
} }
[DefaultValue(0.00)] [DefaultValue(0.00)]
[Description("浮点返回值"), Category("SunnyUI")]
public double DoubleValue public double DoubleValue
{ {
get => edit.DoubleValue; get => edit.DoubleValue;
@ -414,13 +420,15 @@ namespace Sunny.UI
} }
[DefaultValue(0)] [DefaultValue(0)]
[Description("整形返回值"), Category("SunnyUI")]
public int IntValue public int IntValue
{ {
get => edit.IntValue; get => edit.IntValue;
set => edit.IntValue = value; set => edit.IntValue = value;
} }
[CategoryAttribute("文字"), Browsable(true)] [Description("文本返回值"), Category("SunnyUI")]
[Browsable(true)]
[DefaultValue("")] [DefaultValue("")]
public override string Text public override string Text
{ {
@ -432,7 +440,7 @@ namespace Sunny.UI
/// 当InputType为数字类型时小数位数。 /// 当InputType为数字类型时小数位数。
/// </summary> /// </summary>
[Description("当InputType为数字类型时小数位数。")] [Description("当InputType为数字类型时小数位数。")]
[DefaultValue(2)] [DefaultValue(2), Category("SunnyUI")]
public int DecLength public int DecLength
{ {
get => edit.DecLength; get => edit.DecLength;
@ -440,6 +448,7 @@ namespace Sunny.UI
} }
[DefaultValue(false)] [DefaultValue(false)]
[Description("整形或浮点输入时,是否可空显示"), Category("SunnyUI")]
public bool CanEmpty public bool CanEmpty
{ {
get => edit.CanEmpty; get => edit.CanEmpty;

View File

@ -81,6 +81,7 @@ namespace Sunny.UI
/// 文字对齐方向 /// 文字对齐方向
/// </summary> /// </summary>
[DefaultValue(HorizontalAlignment.Center)] [DefaultValue(HorizontalAlignment.Center)]
[Description("文字对齐方向"), Category("SunnyUI")]
public HorizontalAlignment TextAlign public HorizontalAlignment TextAlign
{ {
get => textAlign; get => textAlign;
@ -94,6 +95,7 @@ namespace Sunny.UI
private Color titleColor = UIColor.Blue; private Color titleColor = UIColor.Blue;
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
[Description("标题颜色"), Category("SunnyUI")]
public Color TitleColor public Color TitleColor
{ {
get => titleColor; get => titleColor;
@ -171,6 +173,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;

View File

@ -47,20 +47,22 @@ namespace Sunny.UI
InitOwnerDraw(); InitOwnerDraw();
} }
[DefaultValue("ToolTip title"), Category("SunnyUI"), Description("标题")]
public new string ToolTipTitle { get; set; } = "ToolTip title"; public new string ToolTipTitle { get; set; } = "ToolTip title";
[DefaultValue(typeof(Font), "微软雅黑, 9pt")] [DefaultValue(typeof(Font), "微软雅黑, 9pt"), Description("字体"), Category("SunnyUI")]
public Font Font { get; set; } = new Font("微软雅黑", 9); public Font Font { get; set; } = new Font("微软雅黑", 9);
[DefaultValue(typeof(Font), "微软雅黑, 12pt")] [DefaultValue(typeof(Font), "微软雅黑, 12pt"), Description("标题字体"), Category("SunnyUI")]
public Font TitleFont { get; set; } = new Font("微软雅黑", 12); public Font TitleFont { get; set; } = new Font("微软雅黑", 12);
[DefaultValue(typeof(Color), "239, 239, 239")] [DefaultValue(typeof(Color), "239, 239, 239"), Description("边框颜色"), Category("SunnyUI")]
public Color RectColor { get; set; } = UIChartStyles.Dark.ForeColor; public Color RectColor { get; set; } = UIChartStyles.Dark.ForeColor;
[DefaultValue(true)] public bool AutoSize { get; set; } = true; [DefaultValue(true), Description("自动大小"), Category("SunnyUI")]
public bool AutoSize { get; set; } = true;
[DefaultValue(typeof(Size), "100, 70")] [DefaultValue(typeof(Size), "100, 70"), Description("不自动缩放时大小"), Category("SunnyUI")]
public Size Size { get; set; } = new Size(100, 70); public Size Size { get; set; } = new Size(100, 70);
public void SetToolTip(Control control, string description, string title, int symbol, int symbolSize, public void SetToolTip(Control control, string description, string title, int symbol, int symbolSize,
@ -86,7 +88,7 @@ namespace Sunny.UI
Symbol = symbol, Symbol = symbol,
SymbolSize = symbolSize, SymbolSize = symbolSize,
SymbolColor = symbolColor SymbolColor = symbolColor
}; };
ToolTipControls.TryAdd(control, ctrl); ToolTipControls.TryAdd(control, ctrl);
} }
@ -189,10 +191,10 @@ namespace Sunny.UI
} }
SizeF textSize = g.MeasureString(tooltip.Description, Font); SizeF textSize = g.MeasureString(tooltip.Description, Font);
int allWidth = (int) Math.Max(textSize.Width, titleSize.Width) + 10; int allWidth = (int)Math.Max(textSize.Width, titleSize.Width) + 10;
if (symbolWidth > 0) allWidth = allWidth + symbolWidth + 5; if (symbolWidth > 0) allWidth = allWidth + symbolWidth + 5;
int allHeight = titleSize.Height > 0 ? int allHeight = titleSize.Height > 0 ?
(int)titleSize.Height + (int)textSize.Height + 15 : (int)titleSize.Height + (int)textSize.Height + 15 :
(int)textSize.Height + 10; (int)textSize.Height + 10;
e.ToolTipSize = new Size(allWidth, allHeight); e.ToolTipSize = new Size(allWidth, allHeight);
bmp.Dispose(); bmp.Dispose();
@ -226,20 +228,20 @@ namespace Sunny.UI
titleSize = e.Graphics.MeasureString(tooltip.Title, TitleFont); titleSize = e.Graphics.MeasureString(tooltip.Title, TitleFont);
} }
e.Graphics.DrawString(tooltip.Title,TitleFont,ForeColor, e.Graphics.DrawString(tooltip.Title, TitleFont, ForeColor,
tooltip.Symbol>0?tooltip.SymbolSize+5:5, 5); tooltip.Symbol > 0 ? tooltip.SymbolSize + 5 : 5, 5);
} }
if (titleSize.Height > 0) if (titleSize.Height > 0)
{ {
e.Graphics.DrawLine(ForeColor, e.Graphics.DrawLine(ForeColor,
symbolWidth==0?5:symbolWidth+5, 5+ titleSize.Height + 3, symbolWidth == 0 ? 5 : symbolWidth + 5, 5 + titleSize.Height + 3,
e.Bounds.Width - 5, 5 + titleSize.Height + 3); e.Bounds.Width - 5, 5 + titleSize.Height + 3);
} }
e.Graphics.DrawString(e.ToolTipText, Font, ForeColor, e.Graphics.DrawString(e.ToolTipText, Font, ForeColor,
tooltip.Symbol > 0 ? tooltip.SymbolSize + 5 : 5, tooltip.Symbol > 0 ? tooltip.SymbolSize + 5 : 5,
titleSize.Height > 0? 10+ titleSize.Height : 5); titleSize.Height > 0 ? 10 + titleSize.Height : 5);
} }
else else
{ {

View File

@ -52,9 +52,11 @@ namespace Sunny.UI
private int trackBarValue; private int trackBarValue;
[DefaultValue(false)] [DefaultValue(false)]
[Description("是否只读"), Category("SunnyUI")]
public bool ReadOnly { get; set; } public bool ReadOnly { get; set; }
[DefaultValue(100)] [DefaultValue(100)]
[Description("最大值"), Category("SunnyUI")]
public int Maximum public int Maximum
{ {
get => _maximum; get => _maximum;
@ -69,6 +71,7 @@ namespace Sunny.UI
} }
[DefaultValue(0)] [DefaultValue(0)]
[Description("最小值"), Category("SunnyUI")]
public int Minimum public int Minimum
{ {
get => _minimum; get => _minimum;
@ -83,6 +86,7 @@ namespace Sunny.UI
} }
[DefaultValue(0)] [DefaultValue(0)]
[Description("当前值"), Category("SunnyUI")]
public int Value public int Value
{ {
get => trackBarValue; get => trackBarValue;
@ -202,6 +206,7 @@ namespace Sunny.UI
} }
[DefaultValue(typeof(Color), "173, 178, 181")] [DefaultValue(typeof(Color), "173, 178, 181")]
[Description("不可用时颜色"), Category("SunnyUI")]
public Color DisableColor public Color DisableColor
{ {
get => rectDisableColor; get => rectDisableColor;

View File

@ -48,7 +48,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("左侧列表")] [Description("左侧列表"), Category("SunnyUI")]
public ListBox.ObjectCollection ItemsLeft => l1.Items; public ListBox.ObjectCollection ItemsLeft => l1.Items;
/// <summary> /// <summary>
@ -58,7 +58,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("右侧列表")] [Description("右侧列表"), Category("SunnyUI")]
public ListBox.ObjectCollection ItemsRight => l2.Items; public ListBox.ObjectCollection ItemsRight => l2.Items;
private void b1_Click(object sender, EventArgs e) private void b1_Click(object sender, EventArgs e)

View File

@ -59,6 +59,7 @@ namespace Sunny.UI
private int blockCount = 20; private int blockCount = 20;
[DefaultValue(20)] [DefaultValue(20)]
[Description("显示块个数,此数越大,移动速度越快"), Category("SunnyUI")]
public int BlockCount public int BlockCount
{ {
get => blockCount; get => blockCount;
@ -88,6 +89,7 @@ namespace Sunny.UI
} }
[DefaultValue(200)] [DefaultValue(200)]
[Description("移动显示时间间隔"), Category("SunnyUI")]
public int Interval public int Interval
{ {
get => timer.Interval; get => timer.Interval;
@ -102,6 +104,7 @@ namespace Sunny.UI
private int sliderWidth = 60; private int sliderWidth = 60;
[DefaultValue(60)] [DefaultValue(60)]
[Description("滑块宽度"), Category("SunnyUI")]
public int SliderWidth public int SliderWidth
{ {
get => sliderWidth; get => sliderWidth;