* 增加控件属性显示值及Sunny UI分类
This commit is contained in:
parent
a13f3a96de
commit
99b7db183c
BIN
Bin/SunnyUI.dll
BIN
Bin/SunnyUI.dll
Binary file not shown.
BIN
Bin/SunnyUI.pdb
BIN
Bin/SunnyUI.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
5
SunnyUI.Demo/Controls/FCombobox.Designer.cs
generated
5
SunnyUI.Demo/Controls/FCombobox.Designer.cs
generated
@ -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);
|
||||
|
@ -88,7 +88,7 @@ namespace Sunny.UI
|
||||
/// 字体颜色
|
||||
/// </summary>
|
||||
[Description("字体颜色")]
|
||||
[Category("自定义")]
|
||||
[Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "White")]
|
||||
public override Color ForeColor
|
||||
{
|
||||
@ -100,7 +100,7 @@ namespace Sunny.UI
|
||||
/// 填充颜色,当值为背景色或透明色或空值则不填充
|
||||
/// </summary>
|
||||
[Description("填充颜色")]
|
||||
[Category("自定义")]
|
||||
[Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "235, 243, 255")]
|
||||
public Color FillColor
|
||||
{
|
||||
|
@ -270,7 +270,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// Ö÷ÌâÑùʽ
|
||||
/// </summary>
|
||||
[DefaultValue(UIStyle.Blue)]
|
||||
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
|
||||
public UIStyle Style
|
||||
{
|
||||
get => _style;
|
||||
@ -299,10 +299,20 @@ namespace Sunny.UI
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自定义主题风格
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
|
||||
public bool StyleCustomMode { get; set; }
|
||||
|
||||
public string Version { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Tag字符串
|
||||
/// </summary>
|
||||
[DefaultValue(null)]
|
||||
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
|
||||
public string TagString { get; set; }
|
||||
}
|
||||
}
|
@ -190,7 +190,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// Ö÷ÌâÑùʽ
|
||||
/// </summary>
|
||||
[DefaultValue(UIStyle.Blue)]
|
||||
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
|
||||
public UIStyle Style
|
||||
{
|
||||
get => _style;
|
||||
@ -219,10 +219,20 @@ namespace Sunny.UI
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自定义主题风格
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
|
||||
public bool StyleCustomMode { get; set; }
|
||||
|
||||
public string Version { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Tag字符串
|
||||
/// </summary>
|
||||
[DefaultValue(null)]
|
||||
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
|
||||
public string TagString { get; set; }
|
||||
}
|
||||
}
|
@ -32,16 +32,16 @@ namespace Sunny.UI
|
||||
{
|
||||
public enum UIDropDownStyle
|
||||
{
|
||||
/// <summary>
|
||||
/// 通过单击下箭头指定显示列表,并指定文本部分可编辑。 这表示用户可以输入新的值,而不仅限于选择列表中现有的值。
|
||||
/// </summary>
|
||||
DropDown,
|
||||
/// <summary>
|
||||
/// 通过单击下箭头指定显示列表,并指定文本部分不可编辑。 这表示用户不能输入新的值。 只能选择列表中已有的值。
|
||||
/// </summary>
|
||||
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;
|
||||
|
@ -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)
|
||||
]
|
||||
|
@ -178,6 +178,7 @@ namespace Sunny.UI
|
||||
/// 是否选中
|
||||
/// </summary>
|
||||
[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; }
|
||||
}
|
||||
}
|
@ -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
|
||||
/// <summary>
|
||||
/// 字体颜色
|
||||
/// </summary>
|
||||
[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
|
||||
/// <summary>
|
||||
/// 填充颜色,当值为背景色或透明色或空值则不填充
|
||||
/// </summary>
|
||||
[Description("填充颜色"), Category("自定义")]
|
||||
[Description("填充颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "80, 160, 255")]
|
||||
public Color CheckBoxColor
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -82,6 +82,8 @@ namespace Sunny.UI
|
||||
|
||||
private Color selectColor;
|
||||
|
||||
[DefaultValue(typeof(Color), "80, 159, 254")]
|
||||
[Description("选中颜色"), Category("SunnyUI")]
|
||||
public Color Value
|
||||
{
|
||||
get => selectColor;
|
||||
|
@ -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
|
||||
|
@ -38,10 +38,18 @@ namespace Sunny.UI
|
||||
Version = UIGlobal.Version;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自定义主题风格
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
|
||||
public bool StyleCustomMode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Tag字符串
|
||||
/// </summary>
|
||||
[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)]
|
||||
/// <summary>
|
||||
/// 主题样式
|
||||
/// </summary>
|
||||
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
|
||||
public UIStyle Style
|
||||
{
|
||||
get => _style;
|
||||
|
@ -52,12 +52,14 @@ namespace Sunny.UI
|
||||
/// Tag字符串
|
||||
/// </summary>
|
||||
[DefaultValue(null)]
|
||||
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
|
||||
public string TagString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义主题样式
|
||||
/// 自定义主题风格
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
|
||||
public bool StyleCustomMode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@ -85,7 +87,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 边框显示位置
|
||||
/// </summary>
|
||||
[DefaultValue(ToolStripStatusLabelBorderSides.All), Description("边框显示位置")]
|
||||
[DefaultValue(ToolStripStatusLabelBorderSides.All), Description("边框显示位置"), Category("SunnyUI")]
|
||||
public ToolStripStatusLabelBorderSides RectSides
|
||||
{
|
||||
get => _rectSides;
|
||||
@ -110,7 +112,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 圆角显示位置
|
||||
/// </summary>
|
||||
[DefaultValue(UICornerRadiusSides.All), Description("圆角显示位置")]
|
||||
[DefaultValue(UICornerRadiusSides.All), Description("圆角显示位置"), Category("SunnyUI")]
|
||||
public UICornerRadiusSides RadiusSides
|
||||
{
|
||||
get => _radiusSides;
|
||||
@ -127,7 +129,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 圆角角度
|
||||
/// </summary>
|
||||
[Description("圆角角度"), Category("自定义")]
|
||||
[Description("圆角角度"), Category("SunnyUI")]
|
||||
[DefaultValue(5)]
|
||||
public int Radius
|
||||
{
|
||||
@ -147,7 +149,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 是否显示文字
|
||||
/// </summary>
|
||||
[Description("是否显示文字")]
|
||||
[Description("是否显示文字"), Category("SunnyUI")]
|
||||
[DefaultValue(true)]
|
||||
protected bool ShowText
|
||||
{
|
||||
@ -225,7 +227,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 主题样式
|
||||
/// </summary>
|
||||
[DefaultValue(UIStyle.Blue)]
|
||||
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
|
||||
public UIStyle Style
|
||||
{
|
||||
get => _style;
|
||||
@ -249,7 +251,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 文字对齐方向
|
||||
/// </summary>
|
||||
[Description("文字对齐方向")]
|
||||
[Description("文字对齐方向"), Category("SunnyUI")]
|
||||
[DefaultValue(ContentAlignment.MiddleCenter)]
|
||||
public ContentAlignment TextAlign
|
||||
{
|
||||
|
@ -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)]
|
||||
/// <summary>
|
||||
/// 主题样式
|
||||
/// </summary>
|
||||
[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();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自定义主题风格
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
|
||||
public bool StyleCustomMode { get; set; }
|
||||
|
||||
public string Version => UIGlobal.Version;
|
||||
|
||||
/// <summary>
|
||||
/// Tag字符串
|
||||
/// </summary>
|
||||
[DefaultValue(null)]
|
||||
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
|
||||
public string TagString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否显示边框
|
||||
/// </summary>
|
||||
[Description("是否显示边框"), Category("自定义")]
|
||||
[Description("是否显示边框"), Category("SunnyUI")]
|
||||
[DefaultValue(true)]
|
||||
public bool ShowRect
|
||||
{
|
||||
@ -355,7 +369,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 是否显示表格线
|
||||
/// </summary>
|
||||
[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;
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -105,6 +105,7 @@ namespace Sunny.UI
|
||||
ItemForm = new UIDropDown(item);
|
||||
}
|
||||
|
||||
[Description("选中日期时间"), Category("SunnyUI")]
|
||||
public DateTime Value
|
||||
{
|
||||
get => item.Date;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -399,7 +399,7 @@ namespace Sunny.UI
|
||||
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_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
|
||||
/// <summary>
|
||||
/// 字体颜色
|
||||
/// </summary>
|
||||
[Description("字体颜色"), Category("自定义")]
|
||||
[Description("字体颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "80, 160, 255")]
|
||||
public override Color ForeColor
|
||||
{
|
||||
@ -440,7 +440,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 填充颜色,当值为背景色或透明色或空值则不填充
|
||||
/// </summary>
|
||||
[Description("填充颜色"), Category("自定义")]
|
||||
[Description("填充颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "235, 243, 255")]
|
||||
public Color FillColor
|
||||
{
|
||||
|
@ -43,6 +43,13 @@ namespace Sunny.UI
|
||||
private ContentAlignment textAlign = ContentAlignment.MiddleCenter;
|
||||
private Color foreColor = UIFontColor.Primary;
|
||||
|
||||
/// <summary>
|
||||
/// Tag字符串
|
||||
/// </summary>
|
||||
[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;
|
||||
|
@ -279,7 +279,11 @@ namespace Sunny.UI
|
||||
{
|
||||
private UIScrollBar bar;
|
||||
|
||||
/// <summary>
|
||||
/// Tag字符串
|
||||
/// </summary>
|
||||
[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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自定义主题风格
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
|
||||
public bool StyleCustomMode { get; set; }
|
||||
|
||||
public string Version { get; }
|
||||
@ -413,7 +421,10 @@ namespace Sunny.UI
|
||||
}
|
||||
}
|
||||
|
||||
[DefaultValue(UIStyle.Blue)]
|
||||
/// <summary>
|
||||
/// 主题样式
|
||||
/// </summary>
|
||||
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
|
||||
public UIStyle Style
|
||||
{
|
||||
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;
|
||||
|
@ -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;
|
||||
|
@ -47,13 +47,17 @@ namespace Sunny.UI
|
||||
|
||||
private Color foreColor = UIStyles.Blue.LabelForeColor;
|
||||
|
||||
/// <summary>
|
||||
/// Tag字符串
|
||||
/// </summary>
|
||||
[DefaultValue(null)]
|
||||
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
|
||||
public string TagString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字体颜色
|
||||
/// </summary>
|
||||
[Description("字体颜色"), Category("自定义")]
|
||||
[Description("字体颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "48, 48, 48")]
|
||||
public override Color ForeColor
|
||||
{
|
||||
@ -73,7 +77,11 @@ namespace Sunny.UI
|
||||
_style = style;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自定义主题风格
|
||||
/// </summary>
|
||||
[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)]
|
||||
/// <summary>
|
||||
/// 主题样式
|
||||
/// </summary>
|
||||
[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
|
||||
/// <summary>
|
||||
/// 字体颜色
|
||||
/// </summary>
|
||||
[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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tag字符串
|
||||
/// </summary>
|
||||
[DefaultValue(null)]
|
||||
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
|
||||
public string TagString { get; set; }
|
||||
|
||||
public string Version { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义主题风格
|
||||
/// </summary>
|
||||
[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)]
|
||||
/// <summary>
|
||||
/// 主题样式
|
||||
/// </summary>
|
||||
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
|
||||
public UIStyle Style
|
||||
{
|
||||
get => _style;
|
||||
|
@ -91,7 +91,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 字体颜色
|
||||
/// </summary>
|
||||
[Description("字体颜色"), Category("自定义")]
|
||||
[Description("字体颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "48, 48, 48")]
|
||||
public override Color ForeColor
|
||||
{
|
||||
@ -191,7 +191,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 填充颜色,当值为背景色或透明色或空值则不填充
|
||||
/// </summary>
|
||||
[Description("填充颜色"), Category("自定义")]
|
||||
[Description("填充颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "235, 243, 255")]
|
||||
public Color FillColor
|
||||
{
|
||||
@ -202,7 +202,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 边框颜色
|
||||
/// </summary>
|
||||
[Description("边框颜色"), Category("自定义")]
|
||||
[Description("边框颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "80, 160, 255")]
|
||||
public Color LineColor
|
||||
{
|
||||
|
@ -244,7 +244,11 @@ namespace Sunny.UI
|
||||
{
|
||||
private UIScrollBar bar;
|
||||
|
||||
/// <summary>
|
||||
/// Tag字符串
|
||||
/// </summary>
|
||||
[DefaultValue(null)]
|
||||
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
|
||||
public string TagString { get; set; }
|
||||
|
||||
public UIScrollBar Bar
|
||||
@ -302,7 +306,11 @@ namespace Sunny.UI
|
||||
|
||||
public string Version { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义主题风格
|
||||
/// </summary>
|
||||
[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)]
|
||||
/// <summary>
|
||||
/// 主题样式
|
||||
/// </summary>
|
||||
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
|
||||
public UIStyle Style
|
||||
{
|
||||
get => _style;
|
||||
@ -341,7 +352,7 @@ namespace Sunny.UI
|
||||
|
||||
protected override void OnMouseWheel(MouseEventArgs e)
|
||||
{
|
||||
/* base.OnMouseWheel(e);
|
||||
/* base.OnMouseWheel(e);
|
||||
if (Bar.Visible)
|
||||
{
|
||||
var si = ScrollBarInfo.GetInfo(Handle);
|
||||
@ -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;
|
||||
|
@ -157,7 +157,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 字体颜色
|
||||
/// </summary>
|
||||
[Description("字体颜色"), Category("自定义")]
|
||||
[Description("字体颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "48, 48, 48")]
|
||||
public override Color ForeColor
|
||||
{
|
||||
@ -168,7 +168,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 填充颜色,当值为背景色或透明色或空值则不填充
|
||||
/// </summary>
|
||||
[Description("填充颜色"), Category("自定义")]
|
||||
[Description("填充颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "80, 160, 255")]
|
||||
public Color FillColor
|
||||
{
|
||||
|
@ -84,7 +84,11 @@ namespace Sunny.UI
|
||||
node.ImageIndex = imageIndex;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tag字符串
|
||||
/// </summary>
|
||||
[DefaultValue(null)]
|
||||
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
|
||||
public string TagString { get; set; }
|
||||
|
||||
private UIMenuStyle _menuStyle = UIMenuStyle.Black;
|
||||
@ -109,7 +113,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 字体颜色
|
||||
/// </summary>
|
||||
[Description("字体颜色"), Category("自定义")]
|
||||
[Description("字体颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "Silver")]
|
||||
public override Color ForeColor
|
||||
{
|
||||
@ -171,7 +175,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 边框颜色
|
||||
/// </summary>
|
||||
[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)]
|
||||
/// <summary>
|
||||
/// 主题样式
|
||||
/// </summary>
|
||||
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
|
||||
public UIStyle Style
|
||||
{
|
||||
get => _style;
|
||||
@ -513,7 +520,11 @@ namespace Sunny.UI
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自定义主题风格
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
|
||||
public bool StyleCustomMode { get; set; }
|
||||
|
||||
public string Version { get; }
|
||||
|
@ -74,7 +74,11 @@ namespace Sunny.UI
|
||||
[DefaultValue(false)]
|
||||
public bool ShowOneNode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Tag字符串
|
||||
/// </summary>
|
||||
[DefaultValue(null)]
|
||||
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
|
||||
public string TagString { get; set; }
|
||||
|
||||
protected override void OnBackColorChanged(EventArgs e)
|
||||
@ -104,7 +108,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 填充颜色,当值为背景色或透明色或空值则不填充
|
||||
/// </summary>
|
||||
[Description("背景颜色"), Category("自定义")]
|
||||
[Description("背景颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "56, 56, 56")]
|
||||
public Color FillColor
|
||||
{
|
||||
@ -125,7 +129,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 填充颜色,当值为背景色或透明色或空值则不填充
|
||||
/// </summary>
|
||||
[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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自定义主题风格
|
||||
/// </summary>
|
||||
[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
|
||||
/// <summary>
|
||||
/// 边框颜色
|
||||
/// </summary>
|
||||
[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)]
|
||||
/// <summary>
|
||||
/// 主题样式
|
||||
/// </summary>
|
||||
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
|
||||
public UIStyle Style
|
||||
{
|
||||
get => _style;
|
||||
|
@ -58,7 +58,11 @@ namespace Sunny.UI
|
||||
base.Font = UIFontColor.Font;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tag字符串
|
||||
/// </summary>
|
||||
[DefaultValue(null)]
|
||||
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
|
||||
public string TagString { get; set; }
|
||||
|
||||
private string text;
|
||||
@ -168,11 +172,11 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 是否显示圆角
|
||||
/// </summary>
|
||||
[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
|
||||
/// <summary>
|
||||
/// 是否显示边框
|
||||
/// </summary>
|
||||
[Description("是否显示边框"), Category("自定义")]
|
||||
[Description("是否显示边框"), Category("SunnyUI")]
|
||||
[DefaultValue(true)]
|
||||
protected bool ShowRect => (int)RectSides > 0;
|
||||
|
||||
/// <summary>
|
||||
/// 边框颜色
|
||||
/// </summary>
|
||||
[Description("边框颜色"), Category("自定义")]
|
||||
[Description("边框颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "80, 160, 255")]
|
||||
public Color RectColor
|
||||
{
|
||||
@ -225,7 +229,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 填充颜色,当值为背景色或透明色或空值则不填充
|
||||
/// </summary>
|
||||
[Description("填充颜色,当值为背景色或透明色或空值则不填充"), Category("自定义")]
|
||||
[Description("填充颜色,当值为背景色或透明色或空值则不填充"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "235, 243, 255")]
|
||||
public Color FillColor
|
||||
{
|
||||
@ -457,12 +461,19 @@ namespace Sunny.UI
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自定义主题风格
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
|
||||
public bool StyleCustomMode { get; set; }
|
||||
|
||||
protected UIStyle _style = UIStyle.Blue;
|
||||
|
||||
[DefaultValue(UIStyle.Blue)]
|
||||
/// <summary>
|
||||
/// 主题样式
|
||||
/// </summary>
|
||||
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
|
||||
public UIStyle Style
|
||||
{
|
||||
get => _style;
|
||||
@ -494,7 +505,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 字体颜色
|
||||
/// </summary>
|
||||
[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();
|
||||
}
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 填充颜色,当值为背景色或透明色或空值则不填充
|
||||
/// </summary>
|
||||
[Description("填充颜色"), Category("自定义")]
|
||||
[Description("填充颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "235, 243, 255")]
|
||||
public Color FillColor
|
||||
{
|
||||
@ -177,7 +177,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 字体颜色
|
||||
/// </summary>
|
||||
[Description("字体颜色"), Category("自定义")]
|
||||
[Description("字体颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "80, 160, 255")]
|
||||
public override Color ForeColor
|
||||
{
|
||||
@ -188,7 +188,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 边框颜色
|
||||
/// </summary>
|
||||
[Description("边框颜色"), Category("自定义")]
|
||||
[Description("边框颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "80, 160, 255")]
|
||||
public Color RectColor
|
||||
{
|
||||
|
@ -139,7 +139,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 字体颜色
|
||||
/// </summary>
|
||||
[Description("字体颜色"), Category("自定义")]
|
||||
[Description("字体颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "80, 160, 255")]
|
||||
public override Color ForeColor
|
||||
{
|
||||
|
@ -54,7 +54,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 字体颜色
|
||||
/// </summary>
|
||||
[Description("字体颜色"), Category("自定义")]
|
||||
[Description("字体颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "48, 48, 48")]
|
||||
public override Color ForeColor
|
||||
{
|
||||
@ -199,7 +199,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 填充颜色,当值为背景色或透明色或空值则不填充
|
||||
/// </summary>
|
||||
[Description("填充颜色"), Category("自定义")]
|
||||
[Description("填充颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "80, 160, 255")]
|
||||
public Color RadioButtonColor
|
||||
{
|
||||
|
@ -434,7 +434,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 字体颜色
|
||||
/// </summary>
|
||||
[Description("字体颜色"), Category("自定义")]
|
||||
[Description("字体颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "80, 160, 255")]
|
||||
public override Color ForeColor
|
||||
{
|
||||
@ -445,7 +445,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 填充颜色,当值为背景色或透明色或空值则不填充
|
||||
/// </summary>
|
||||
[Description("填充颜色"), Category("自定义")]
|
||||
[Description("填充颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "235, 243, 255")]
|
||||
public Color FillColor
|
||||
{
|
||||
|
@ -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,7 +52,7 @@ namespace Sunny.UI
|
||||
|
||||
private int offset = 10;
|
||||
|
||||
[DefaultValue(10),Description("偏移量")]
|
||||
[DefaultValue(10), Description("偏移量")]
|
||||
public int Offset
|
||||
{
|
||||
get => offset;
|
||||
@ -204,7 +204,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 填充颜色,当值为背景色或透明色或空值则不填充
|
||||
/// </summary>
|
||||
[Description("填充颜色"), Category("自定义")]
|
||||
[Description("填充颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "80, 160, 255")]
|
||||
public Color FillColor
|
||||
{
|
||||
@ -215,7 +215,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 字体颜色
|
||||
/// </summary>
|
||||
[Description("字体颜色"), Category("自定义")]
|
||||
[Description("字体颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "White")]
|
||||
public override Color ForeColor
|
||||
{
|
||||
@ -247,7 +247,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 边框颜色
|
||||
/// </summary>
|
||||
[Description("边框颜色"), Category("自定义")]
|
||||
[Description("边框颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "80, 160, 255")]
|
||||
public Color RectColor
|
||||
{
|
||||
|
@ -50,7 +50,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 字体颜色
|
||||
/// </summary>
|
||||
[Description("字体颜色"), Category("自定义")]
|
||||
[Description("字体颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "White")]
|
||||
public override Color ForeColor
|
||||
{
|
||||
@ -114,7 +114,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 填充颜色,当值为背景色或透明色或空值则不填充
|
||||
/// </summary>
|
||||
[Description("填充颜色"), Category("自定义")]
|
||||
[Description("填充颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "White")]
|
||||
public Color ButtonColor
|
||||
{
|
||||
@ -125,7 +125,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 边框颜色
|
||||
/// </summary>
|
||||
[Description("选中颜色"), Category("自定义")]
|
||||
[Description("选中颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "80, 160, 255")]
|
||||
public Color ActiveColor
|
||||
{
|
||||
|
@ -111,10 +111,18 @@ namespace Sunny.UI
|
||||
private Color _fillColor = UIColor.LightBlue;
|
||||
private Color tabBackColor = Color.FromArgb(56, 56, 56);
|
||||
|
||||
/// <summary>
|
||||
/// Tag字符串
|
||||
/// </summary>
|
||||
[DefaultValue(null)]
|
||||
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
|
||||
public string TagString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义主题风格
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
|
||||
public bool StyleCustomMode { get; set; }
|
||||
|
||||
private HorizontalAlignment textAlignment = HorizontalAlignment.Center;
|
||||
@ -158,7 +166,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 当使用边框时填充颜色,当值为背景色或透明色或空值则不填充
|
||||
/// </summary>
|
||||
[Description("当使用边框时填充颜色,当值为背景色或透明色或空值则不填充"), Category("自定义")]
|
||||
[Description("当使用边框时填充颜色,当值为背景色或透明色或空值则不填充"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "235, 243, 255")]
|
||||
public Color FillColor
|
||||
{
|
||||
@ -175,7 +183,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 边框颜色
|
||||
/// </summary>
|
||||
[Description("边框颜色"), Category("自定义")]
|
||||
[Description("边框颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "56, 56, 56")]
|
||||
public Color TabBackColor
|
||||
{
|
||||
@ -193,7 +201,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 边框颜色
|
||||
/// </summary>
|
||||
[Description("选中Tab页背景色"), Category("自定义")]
|
||||
[Description("选中Tab页背景色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "36, 36, 36")]
|
||||
public Color TabSelectedColor
|
||||
{
|
||||
@ -211,7 +219,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 边框颜色
|
||||
/// </summary>
|
||||
[Description("选中Tab页字体色"), Category("自定义")]
|
||||
[Description("选中Tab页字体色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "80, 160, 255")]
|
||||
public Color TabSelectedForeColor
|
||||
{
|
||||
@ -229,7 +237,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 边框颜色
|
||||
/// </summary>
|
||||
[Description("未选中Tab页字体色"), Category("自定义")]
|
||||
[Description("未选中Tab页字体色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "240, 240, 240")]
|
||||
public Color TabUnSelectedForeColor
|
||||
{
|
||||
@ -247,7 +255,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 边框颜色
|
||||
/// </summary>
|
||||
[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)]
|
||||
/// <summary>
|
||||
/// 主题样式
|
||||
/// </summary>
|
||||
[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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自定义主题风格
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
|
||||
public bool StyleCustomMode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Tag字符串
|
||||
/// </summary>
|
||||
[DefaultValue(null)]
|
||||
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
|
||||
public string TagString { get; set; }
|
||||
|
||||
public string Version { get; }
|
||||
@ -68,7 +75,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 当使用边框时填充颜色,当值为背景色或透明色或空值则不填充
|
||||
/// </summary>
|
||||
[Description("当使用边框时填充颜色,当值为背景色或透明色或空值则不填充"), Category("自定义")]
|
||||
[Description("当使用边框时填充颜色,当值为背景色或透明色或空值则不填充"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "235, 243, 255")]
|
||||
public Color FillColor
|
||||
{
|
||||
@ -85,7 +92,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 边框颜色
|
||||
/// </summary>
|
||||
[Description("边框颜色"), Category("自定义")]
|
||||
[Description("边框颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "56, 56, 56")]
|
||||
public Color TabBackColor
|
||||
{
|
||||
@ -103,7 +110,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 边框颜色
|
||||
/// </summary>
|
||||
[Description("选中Tab页背景色"), Category("自定义")]
|
||||
[Description("选中Tab页背景色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "36, 36, 36")]
|
||||
public Color TabSelectedColor
|
||||
{
|
||||
@ -121,7 +128,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 边框颜色
|
||||
/// </summary>
|
||||
[Description("选中Tab页字体色"), Category("自定义")]
|
||||
[Description("选中Tab页字体色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "80, 160, 255")]
|
||||
public Color TabSelectedForeColor
|
||||
{
|
||||
@ -139,7 +146,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 边框颜色
|
||||
/// </summary>
|
||||
[Description("未选中Tab页字体色"), Category("自定义")]
|
||||
[Description("未选中Tab页字体色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "Silver")]
|
||||
public Color TabUnSelectedForeColor
|
||||
{
|
||||
@ -157,7 +164,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 边框颜色
|
||||
/// </summary>
|
||||
[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)]
|
||||
/// <summary>
|
||||
/// 主题样式
|
||||
/// </summary>
|
||||
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
|
||||
public UIStyle Style
|
||||
{
|
||||
get => _style;
|
||||
|
@ -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)
|
||||
@ -362,7 +362,7 @@ namespace Sunny.UI
|
||||
}
|
||||
}
|
||||
|
||||
[Description("输入类型"), Category("自定义")]
|
||||
[Description("输入类型"), Category("SunnyUI")]
|
||||
[DefaultValue(UIEditType.String)]
|
||||
public UIEditType Type
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ namespace Sunny.UI
|
||||
{
|
||||
private int _titleHeight = 35;
|
||||
|
||||
[Description("面板高度"), Category("自定义")]
|
||||
[Description("面板高度"), Category("SunnyUI")]
|
||||
[DefaultValue(35)]
|
||||
public int TitleHeight
|
||||
{
|
||||
|
@ -171,7 +171,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 填充颜色,当值为背景色或透明色或空值则不填充
|
||||
/// </summary>
|
||||
[Description("填充颜色"), Category("自定义")]
|
||||
[Description("填充颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "235, 243, 255")]
|
||||
public Color FillColor
|
||||
{
|
||||
@ -182,7 +182,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 字体颜色
|
||||
/// </summary>
|
||||
[Description("字体颜色"), Category("自定义")]
|
||||
[Description("字体颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "80, 160, 255")]
|
||||
public override Color ForeColor
|
||||
{
|
||||
@ -193,7 +193,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 边框颜色
|
||||
/// </summary>
|
||||
[Description("边框颜色"), Category("自定义")]
|
||||
[Description("边框颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "80, 160, 255")]
|
||||
public Color RectColor
|
||||
{
|
||||
|
@ -147,7 +147,11 @@ namespace Sunny.UI
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tag字符串
|
||||
/// </summary>
|
||||
[DefaultValue(null)]
|
||||
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
|
||||
public string TagString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@ -271,7 +275,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 标题栏高度
|
||||
/// </summary>
|
||||
[Description("标题栏高度"), Category("Appearance"), DefaultValue(35)]
|
||||
[Description("标题栏高度"), Category("SunnyUI"), DefaultValue(35)]
|
||||
public int TitleHeight
|
||||
{
|
||||
get => titleHeight;
|
||||
@ -292,7 +296,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 标题栏颜色
|
||||
/// </summary>
|
||||
[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
|
||||
/// <summary>
|
||||
/// 标题颜色
|
||||
/// </summary>
|
||||
[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
|
||||
/// <summary>
|
||||
/// 填充颜色,当值为背景色或透明色或空值则不填充
|
||||
/// </summary>
|
||||
[Description("背景颜色"), Category("Appearance")]
|
||||
[Description("背景颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "48, 48, 48")]
|
||||
public override Color ForeColor
|
||||
{
|
||||
@ -434,7 +438,7 @@ namespace Sunny.UI
|
||||
/// 边框颜色
|
||||
/// </summary>
|
||||
/// <value>The color of the border style.</value>
|
||||
[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
|
||||
/// <summary>
|
||||
/// 配色主题
|
||||
/// </summary>
|
||||
[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
|
||||
/// <summary>
|
||||
/// 是否显示圆角
|
||||
/// </summary>
|
||||
[Description("是否显示圆角"), Category("Appearance")]
|
||||
[Description("是否显示圆角"), Category("SunnyUI")]
|
||||
[DefaultValue(true)]
|
||||
public bool ShowRadius
|
||||
{
|
||||
@ -1033,7 +1037,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 是否显示边框
|
||||
/// </summary>
|
||||
[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;
|
||||
|
@ -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; }
|
||||
/// <summary>
|
||||
/// Tag字符串
|
||||
/// </summary>
|
||||
[DefaultValue(null)]
|
||||
[Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")]
|
||||
public string TagString { get; set; }
|
||||
|
||||
public string Version { get; }
|
||||
|
||||
[DefaultValue(UIStyle.Blue)]
|
||||
/// <summary>
|
||||
/// 主题样式
|
||||
/// </summary>
|
||||
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
|
||||
public UIStyle Style
|
||||
{
|
||||
get => _style;
|
||||
set => SetStyle(value);
|
||||
}
|
||||
|
||||
[DefaultValue(false)] public bool StyleCustomMode { get; set; }
|
||||
/// <summary>
|
||||
/// 自定义主题风格
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[Description("获取或设置可以自定义主题风格"), Category("SunnyUI")]
|
||||
public bool StyleCustomMode { get; set; }
|
||||
|
||||
public event EventHandler Initialize;
|
||||
|
||||
|
@ -61,7 +61,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 填充颜色,当值为背景色或透明色或空值则不填充
|
||||
/// </summary>
|
||||
[Description("标题颜色"), Category("自定义")]
|
||||
[Description("标题颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "76, 76, 76")]
|
||||
public Color TitleFillColor
|
||||
{
|
||||
@ -76,7 +76,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 字体颜色
|
||||
/// </summary>
|
||||
[Description("字体颜色"), Category("自定义")]
|
||||
[Description("字体颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "White")]
|
||||
public Color TitleForeColor
|
||||
{
|
||||
@ -100,7 +100,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 填充颜色,当值为背景色或透明色或空值则不填充
|
||||
/// </summary>
|
||||
[Description("填充颜色"), Category("自定义")]
|
||||
[Description("填充颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "76, 76, 76")]
|
||||
public Color FillColor
|
||||
{
|
||||
@ -111,7 +111,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 字体颜色
|
||||
/// </summary>
|
||||
[Description("字体颜色"), Category("自定义")]
|
||||
[Description("字体颜色"), Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "White")]
|
||||
public override Color ForeColor
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ namespace Sunny.UI
|
||||
/// <summary>
|
||||
/// 主题样式
|
||||
/// </summary>
|
||||
[DefaultValue(UIStyle.Blue)]
|
||||
[DefaultValue(UIStyle.Blue), Description("主题样式"), Category("SunnyUI")]
|
||||
public UIStyle Style
|
||||
{
|
||||
get => UIStyles.Style;
|
||||
|
Loading…
x
Reference in New Issue
Block a user