* 写WIKI时对控件的一些描述进行了更新

This commit is contained in:
Sunny 2021-04-17 10:26:06 +08:00
parent 46d36e6636
commit 74271f14ea
10 changed files with 27 additions and 11 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -23,6 +23,7 @@
uiRoundMeter2.Angle = value * 10;
uiAnalogMeter1.Value = value;
uiBattery1.Power = value;
uiLedDisplay1.Text = value + " Ω";
}
}
}

View File

@ -26,6 +26,7 @@ using System.Drawing.Drawing2D;
namespace Sunny.UI
{
[DefaultProperty("Power")]
[ToolboxItem(true)]
public sealed class UIBattery : UIControl
{
@ -119,9 +120,9 @@ namespace Sunny.UI
}
/// <summary>
/// 字体颜色
/// 默认电量颜色
/// </summary>
[Description("字体颜色")]
[Description("默认电量颜色")]
[Category("SunnyUI")]
[DefaultValue(typeof(Color), "White")]
public override Color ForeColor

View File

@ -48,11 +48,16 @@ namespace Sunny.UI
foreColor = Color.White;
}
~UIBreadcrumb()
{
listbox.Dispose();
}
public delegate void OnValueChanged(object sender, int value);
public event OnValueChanged ItemIndexChanged;
private readonly ListBoxEx listbox = new ListBoxEx();
private readonly ListBox listbox = new ListBox();
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[Localizable(true)]

View File

@ -12,7 +12,7 @@
* 使
******************************************************************************
* : UILedDisplay.cs
* : LED
* : LED显示屏
* : V3.0
* : 2020-01-01
*
@ -30,6 +30,7 @@ namespace Sunny.UI
/// <summary>
/// LED显示屏
/// </summary>
[DefaultProperty("Text")]
public class UILedDisplay : Control
{
#region
@ -86,6 +87,13 @@ namespace Sunny.UI
public string Version { get; }
/// <summary>
/// Tag字符串
/// </summary>
[DefaultValue(null)]
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
public string TagString { get; set; }
private Color borderColor = Color.Black;
private Color borderInColor = Color.Silver;
private Color ledBackColor = Color.FromArgb(0, 0x33, 0);
@ -272,7 +280,7 @@ namespace Sunny.UI
/// <summary>
/// 计算大小
/// </summary>
public void CalcSize()
private void CalcSize()
{
Width = BorderWidth * 2 + BorderInWidth * 2 + IntervalH * 2 + CharCount * IntervalOn * 5 +
CharCount * IntervalIn * 4 + (CharCount + 1) * IntervalOn + CharCount * 2 * IntervalIn;

View File

@ -12,7 +12,7 @@
* 使
******************************************************************************
* : UILedStopwatch.cs
* : LED
* : LED计时器
* : V3.0
* : 2020-01-01
*
@ -27,14 +27,14 @@ namespace Sunny.UI
/// <summary>
/// LED计时器
/// </summary>
[DefaultEvent("Click")]
[DefaultProperty("TimerTick")]
[DefaultEvent("TimerTick")]
[DefaultProperty("Text")]
public sealed class UILedStopwatch : UILedDisplay
{
private readonly System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer();
/// <summary>
/// 当定时器启动后,每隔1秒触发一次
/// 当定时器启动后,Text变化时触发一次
/// </summary>
public event EventHandler TimerTick;
@ -43,7 +43,7 @@ namespace Sunny.UI
/// </summary>
public UILedStopwatch()
{
timer.Interval = 50;
timer.Interval = 100;
timer.Tick += Timer_Tick;
}
@ -61,6 +61,7 @@ namespace Sunny.UI
}
[DefaultValue(TimeShowType.mmss)]
[Description("显示方式"), Category("SunnyUI")]
public TimeShowType ShowType { get; set; } = TimeShowType.mmss;
private void Timer_Tick(object sender, EventArgs e)
@ -85,7 +86,7 @@ namespace Sunny.UI
if (text != Text)
{
Text = text;
TimerTick?.Invoke(this, null);
TimerTick?.Invoke(this, e);
}
}