diff --git a/Bin/net40/SunnyUI.dll b/Bin/net40/SunnyUI.dll index 74c487d0..b276f498 100644 Binary files a/Bin/net40/SunnyUI.dll and b/Bin/net40/SunnyUI.dll differ diff --git a/SunnyUI/Common/UChineseColors.cs b/SunnyUI/Common/UChineseColors.cs new file mode 100644 index 00000000..8d7bcab9 --- /dev/null +++ b/SunnyUI/Common/UChineseColors.cs @@ -0,0 +1,181 @@ +//https://colors.ichuantong.cn/ +//http://blog.sina.com.cn/s/blog_5c3b139d0101deia.html + +using System.Drawing; + +namespace Sunny.UI +{ + public static class ChineseColor + { + public static class 红 + { + /// + /// #ffb3a7 + /// 粉红 浅红色:别称:妃色 杨妃色 湘妃色 妃红色 + /// + public static Color 粉红 = Color.FromArgb(255, 179, 167); + + /// + /// #ed5736 + /// 妃色 妃红色:古同"绯",粉红色。杨妃色 湘妃色 粉红皆同义 + /// + public static Color 妃色 = Color.FromArgb(237, 87, 54); + + /// + /// #f00056 + /// 品红:比大红浅的红色(quester注:这里的"品红"估计是指的"一品红",是基于大红色系的,和现在我们印刷用色的"品红M100"不是一个概念) + /// + public static Color 品红 = Color.FromArgb(240, 0, 86); + + /// + /// #f47983 + /// 桃红:桃花的颜色,比粉红略鲜润的颜色。(quester注:不大于M70的色彩,有时可加入适量黄色) + /// + public static Color 桃红 = Color.FromArgb(244, 121, 131); + + /// + /// #db5a6b + /// 海棠红:淡紫红色、较桃红色深一些,是非常妩媚娇艳的颜色 + /// + public static Color 海棠红 = Color.FromArgb(219, 90, 107); + + /// + /// #f20c00 + /// 石榴红:石榴花的颜色,高色度和纯度的红色 + /// + public static Color 石榴红 = Color.FromArgb(242, 12, 0); + + /// + /// #c93756 + /// 樱桃色:鲜红色 + /// + public static Color 樱桃色 = Color.FromArgb(201, 55, 86); + + /// + /// #f05654 + /// 银红:银朱和粉红色颜料配成的颜色。多用来形容有光泽的各种红色,尤指有光泽浅红 + /// + public static Color 银红 = Color.FromArgb(240, 86, 84); + + /// + /// #ff2121 + /// 大红:正红色,三原色中的红,传统的中国红,又称绛色(quester注:RGB 色中的 R255 系列明度) + /// + public static Color 大红 = Color.FromArgb(255, 33, 33); + + /// + /// #8c4356 + /// 绛紫:紫中略带红的颜色 + /// + public static Color 绛紫 = Color.FromArgb(140, 67, 86); + + /// + /// #c83c23 + /// 绯红:艳丽的深红 + /// + public static Color 绯红 = Color.FromArgb(200, 60, 35); + + /// + /// #9d2933 + /// 胭脂:1,女子装扮时用的胭脂的颜色。2,国画暗红色颜料 + /// + public static Color 胭脂 = Color.FromArgb(157, 41, 51); + + /// + /// #ff4c00 + /// 朱红:朱砂的颜色,比大红活泼,也称铅朱 朱色 丹色(quester注:在YM对等的情况下,适量减少红色的成分就是该色的色彩系列感觉) + /// + public static Color 朱红 = Color.FromArgb(255, 76, 0); + + /// + /// #ff4e20 + /// 丹:丹砂的鲜艳红色 + /// + public static Color 丹 = Color.FromArgb(255, 78, 32); + + /// + /// #f35336 + /// 彤:赤色 + /// + public static Color 彤 = Color.FromArgb(243, 83, 54); + + /// + /// #cb3a56 + /// 茜色:茜草染的色彩,呈深红色 + /// + public static Color 茜色 = Color.FromArgb(203, 58, 86); + + /// + /// #ff2d51 + /// 火红:火焰的红色,赤色 + /// + public static Color 火红 = Color.FromArgb(255, 45, 81); + + /// + /// #c91f37 + /// 赫赤:深红,火红。泛指赤色、火红色 + /// + public static Color 赫赤 = Color.FromArgb(201, 31, 55); + + /// + /// #ef7a82 + /// 嫣红:鲜艳的红色 + /// + public static Color 嫣红 = Color.FromArgb(239, 122, 130); + + /// + /// #ff0097 + /// 洋红:色橘红(quester注:这个色彩方向不太对,通常洋红指的是倾向于M100系列的红色,应该削弱黄色成分。) + /// + public static Color 洋红 = Color.FromArgb(255, 0, 151); + + /// + /// #ff3300 + /// 炎:引申为红色 + /// + public static Color 炎 = Color.FromArgb(255, 51, 0); + + /// + /// #c3272b + /// 赤:本义火的颜色,即红色 + /// + public static Color 赤 = Color.FromArgb(195, 39, 43); + + /// + /// #a98175 + /// 绾:绛色;浅绛色 + /// + public static Color 绾 = Color.FromArgb(169, 129, 117); + + /// + /// #c32136 + /// 枣红:即深红(quester注:色相不变,是深浅变化) + /// + public static Color 枣红 = Color.FromArgb(195, 33, 54); + + /// + /// #b36d61 + /// 檀:浅红色,浅绛色 + /// + public static Color 檀 = Color.FromArgb(179, 109, 97); + + /// + /// #be002f + /// 殷红:发黑的红色 + /// + public static Color 殷红 = Color.FromArgb(190, 0, 47); + + /// + /// #dc3023 + /// 酡红:像饮酒后脸上泛现的红色,泛指脸红 + /// + public static Color 酡红 = Color.FromArgb(220, 48, 35); + + /// + /// #f9906f + /// 酡颜:饮酒脸红的样子。亦泛指脸红色 + /// + public static Color 酡颜 = Color.FromArgb(249, 144, 111); + } + } +} diff --git a/SunnyUI/Controls/UIHeaderButton.cs b/SunnyUI/Controls/UIHeaderButton.cs index b3f4f163..cbfa9cc8 100644 --- a/SunnyUI/Controls/UIHeaderButton.cs +++ b/SunnyUI/Controls/UIHeaderButton.cs @@ -21,6 +21,7 @@ * 2021-06-01: V3.0.4 增加图片与文字的位置 * 2021-06-22: V3.0.4 增加ShowSelected,是否显示选中状态 * 2021-09-21: V3.0.7 增加Disabled颜色 + * 2021-12-07: V3.0.9 更改图片自动刷新 ******************************************************************************/ using System; @@ -249,9 +250,19 @@ namespace Sunny.UI set => SetForeSelectedColor(value); } + private Image image; + [DefaultValue(null)] [Description("图片"), Category("SunnyUI")] - public Image Image { get; set; } + public Image Image + { + get => image; + set + { + image = value; + Invalidate(); + } + } private int _symbol = FontAwesomeIcons.fa_check;