diff --git a/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project.exe b/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project.exe index 43eec28..4d85a58 100644 Binary files a/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project.exe and b/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project.exe differ diff --git a/Bin/Debug/CommonControls/.NET4 示例/MyDb.dll b/Bin/Debug/CommonControls/.NET4 示例/MyDb.dll index baba6e7..4025573 100644 Binary files a/Bin/Debug/CommonControls/.NET4 示例/MyDb.dll and b/Bin/Debug/CommonControls/.NET4 示例/MyDb.dll differ diff --git a/Bin/Debug/CommonControls/.NET4 示例/MyDb_SQLite.dll b/Bin/Debug/CommonControls/.NET4 示例/MyDb_SQLite.dll index f6bdffd..88a7624 100644 Binary files a/Bin/Debug/CommonControls/.NET4 示例/MyDb_SQLite.dll and b/Bin/Debug/CommonControls/.NET4 示例/MyDb_SQLite.dll differ diff --git a/Bin/Debug/CommonControls/.NET4 示例/RyPrint.dll b/Bin/Debug/CommonControls/.NET4 示例/RyPrint.dll index 4a8f307..6a5a3c7 100644 Binary files a/Bin/Debug/CommonControls/.NET4 示例/RyPrint.dll and b/Bin/Debug/CommonControls/.NET4 示例/RyPrint.dll differ diff --git a/Bin/Debug/CommonControls/.NET4 示例/RyWeb.dll b/Bin/Debug/CommonControls/.NET4 示例/RyWeb.dll index 4a36ea4..52294c8 100644 Binary files a/Bin/Debug/CommonControls/.NET4 示例/RyWeb.dll and b/Bin/Debug/CommonControls/.NET4 示例/RyWeb.dll differ diff --git a/Bin/Debug/CommonControls/.NET4 示例/ryControls.dll b/Bin/Debug/CommonControls/.NET4 示例/ryControls.dll index feb48b0..0879478 100644 Binary files a/Bin/Debug/CommonControls/.NET4 示例/ryControls.dll and b/Bin/Debug/CommonControls/.NET4 示例/ryControls.dll differ diff --git a/Bin/Debug/CommonControls/.NET4 示例/ryControls.xml b/Bin/Debug/CommonControls/.NET4 示例/ryControls.xml index 7a00433..284f1aa 100644 --- a/Bin/Debug/CommonControls/.NET4 示例/ryControls.xml +++ b/Bin/Debug/CommonControls/.NET4 示例/ryControls.xml @@ -393,7 +393,7 @@ - + 增强版Label(禁用了双击Label会自动复制文本到剪切板的功能) @@ -978,6 +978,11 @@ 是否显示网格线 + + + 角标图标合集 + + 画项 @@ -1009,7 +1014,7 @@ 重绘选中时背景 - + 重绘图标 @@ -1055,6 +1060,11 @@ 图标 + + + 角标图片序号,为-1表示无角标 + + diff --git a/Bin/Debug/CommonControls/.NET4 示例/ryUpdate.dll b/Bin/Debug/CommonControls/.NET4 示例/ryUpdate.dll index 6821c87..be55eb4 100644 Binary files a/Bin/Debug/CommonControls/.NET4 示例/ryUpdate.dll and b/Bin/Debug/CommonControls/.NET4 示例/ryUpdate.dll differ diff --git a/Bin/Debug/CommonControls/.NET4/MyDb.dll b/Bin/Debug/CommonControls/.NET4/MyDb.dll index baba6e7..4025573 100644 Binary files a/Bin/Debug/CommonControls/.NET4/MyDb.dll and b/Bin/Debug/CommonControls/.NET4/MyDb.dll differ diff --git a/Bin/Debug/CommonControls/.NET4/MyDb_MSSQL.dll b/Bin/Debug/CommonControls/.NET4/MyDb_MSSQL.dll index bdf3e39..958aa12 100644 Binary files a/Bin/Debug/CommonControls/.NET4/MyDb_MSSQL.dll and b/Bin/Debug/CommonControls/.NET4/MyDb_MSSQL.dll differ diff --git a/Bin/Debug/CommonControls/.NET4/MyDb_MySQL.dll b/Bin/Debug/CommonControls/.NET4/MyDb_MySQL.dll index 771fc3f..6591da4 100644 Binary files a/Bin/Debug/CommonControls/.NET4/MyDb_MySQL.dll and b/Bin/Debug/CommonControls/.NET4/MyDb_MySQL.dll differ diff --git a/Bin/Debug/CommonControls/.NET4/MyDb_SQLite.dll b/Bin/Debug/CommonControls/.NET4/MyDb_SQLite.dll index f6bdffd..88a7624 100644 Binary files a/Bin/Debug/CommonControls/.NET4/MyDb_SQLite.dll and b/Bin/Debug/CommonControls/.NET4/MyDb_SQLite.dll differ diff --git a/Bin/Debug/CommonControls/.NET4/RyPrint.dll b/Bin/Debug/CommonControls/.NET4/RyPrint.dll index 4a8f307..6a5a3c7 100644 Binary files a/Bin/Debug/CommonControls/.NET4/RyPrint.dll and b/Bin/Debug/CommonControls/.NET4/RyPrint.dll differ diff --git a/Bin/Debug/CommonControls/.NET4/RyWeb.dll b/Bin/Debug/CommonControls/.NET4/RyWeb.dll index 768a8ad..196dc84 100644 Binary files a/Bin/Debug/CommonControls/.NET4/RyWeb.dll and b/Bin/Debug/CommonControls/.NET4/RyWeb.dll differ diff --git a/Bin/Debug/CommonControls/.NET4/ryControls.dll b/Bin/Debug/CommonControls/.NET4/ryControls.dll index feb48b0..0879478 100644 Binary files a/Bin/Debug/CommonControls/.NET4/ryControls.dll and b/Bin/Debug/CommonControls/.NET4/ryControls.dll differ diff --git a/Bin/Debug/CommonControls/.NET4/ryControls.xml b/Bin/Debug/CommonControls/.NET4/ryControls.xml index 7a00433..284f1aa 100644 --- a/Bin/Debug/CommonControls/.NET4/ryControls.xml +++ b/Bin/Debug/CommonControls/.NET4/ryControls.xml @@ -393,7 +393,7 @@ - + 增强版Label(禁用了双击Label会自动复制文本到剪切板的功能) @@ -978,6 +978,11 @@ 是否显示网格线 + + + 角标图标合集 + + 画项 @@ -1009,7 +1014,7 @@ 重绘选中时背景 - + 重绘图标 @@ -1055,6 +1060,11 @@ 图标 + + + 角标图片序号,为-1表示无角标 + + diff --git a/Bin/Debug/CommonControls/.NET4/ryUpdate.dll b/Bin/Debug/CommonControls/.NET4/ryUpdate.dll index 6821c87..be55eb4 100644 Binary files a/Bin/Debug/CommonControls/.NET4/ryUpdate.dll and b/Bin/Debug/CommonControls/.NET4/ryUpdate.dll differ diff --git a/Bin/Release/CommonControls/.NET4 示例/Itrycn_Project.exe b/Bin/Release/CommonControls/.NET4 示例/Itrycn_Project.exe index 4c4abff..91fcc80 100644 Binary files a/Bin/Release/CommonControls/.NET4 示例/Itrycn_Project.exe and b/Bin/Release/CommonControls/.NET4 示例/Itrycn_Project.exe differ diff --git a/Bin/Release/CommonControls/.NET4 示例/MyDb.dll b/Bin/Release/CommonControls/.NET4 示例/MyDb.dll index 0a25788..dda6523 100644 Binary files a/Bin/Release/CommonControls/.NET4 示例/MyDb.dll and b/Bin/Release/CommonControls/.NET4 示例/MyDb.dll differ diff --git a/Bin/Release/CommonControls/.NET4 示例/MyDb_SQLite.dll b/Bin/Release/CommonControls/.NET4 示例/MyDb_SQLite.dll index 17eda2e..e9047f7 100644 Binary files a/Bin/Release/CommonControls/.NET4 示例/MyDb_SQLite.dll and b/Bin/Release/CommonControls/.NET4 示例/MyDb_SQLite.dll differ diff --git a/Bin/Release/CommonControls/.NET4 示例/RyPrint.dll b/Bin/Release/CommonControls/.NET4 示例/RyPrint.dll index 75a2e84..f87ea7f 100644 Binary files a/Bin/Release/CommonControls/.NET4 示例/RyPrint.dll and b/Bin/Release/CommonControls/.NET4 示例/RyPrint.dll differ diff --git a/Bin/Release/CommonControls/.NET4 示例/RyWeb.dll b/Bin/Release/CommonControls/.NET4 示例/RyWeb.dll index 4a36ea4..52294c8 100644 Binary files a/Bin/Release/CommonControls/.NET4 示例/RyWeb.dll and b/Bin/Release/CommonControls/.NET4 示例/RyWeb.dll differ diff --git a/Bin/Release/CommonControls/.NET4 示例/ryControls.dll b/Bin/Release/CommonControls/.NET4 示例/ryControls.dll index 28d460d..9758a1b 100644 Binary files a/Bin/Release/CommonControls/.NET4 示例/ryControls.dll and b/Bin/Release/CommonControls/.NET4 示例/ryControls.dll differ diff --git a/Bin/Release/CommonControls/.NET4 示例/ryUpdate.dll b/Bin/Release/CommonControls/.NET4 示例/ryUpdate.dll index 4d786d4..ad24fc5 100644 Binary files a/Bin/Release/CommonControls/.NET4 示例/ryUpdate.dll and b/Bin/Release/CommonControls/.NET4 示例/ryUpdate.dll differ diff --git a/Bin/Release/CommonControls/.NET4/MyDb.dll b/Bin/Release/CommonControls/.NET4/MyDb.dll index 0a25788..dda6523 100644 Binary files a/Bin/Release/CommonControls/.NET4/MyDb.dll and b/Bin/Release/CommonControls/.NET4/MyDb.dll differ diff --git a/Bin/Release/CommonControls/.NET4/MyDb_MSSQL.dll b/Bin/Release/CommonControls/.NET4/MyDb_MSSQL.dll index 04b0600..f04228c 100644 Binary files a/Bin/Release/CommonControls/.NET4/MyDb_MSSQL.dll and b/Bin/Release/CommonControls/.NET4/MyDb_MSSQL.dll differ diff --git a/Bin/Release/CommonControls/.NET4/MyDb_MySQL.dll b/Bin/Release/CommonControls/.NET4/MyDb_MySQL.dll index 64d2f15..17be191 100644 Binary files a/Bin/Release/CommonControls/.NET4/MyDb_MySQL.dll and b/Bin/Release/CommonControls/.NET4/MyDb_MySQL.dll differ diff --git a/Bin/Release/CommonControls/.NET4/MyDb_SQLite.dll b/Bin/Release/CommonControls/.NET4/MyDb_SQLite.dll index 17eda2e..e9047f7 100644 Binary files a/Bin/Release/CommonControls/.NET4/MyDb_SQLite.dll and b/Bin/Release/CommonControls/.NET4/MyDb_SQLite.dll differ diff --git a/Bin/Release/CommonControls/.NET4/RyPrint.dll b/Bin/Release/CommonControls/.NET4/RyPrint.dll index 75a2e84..f87ea7f 100644 Binary files a/Bin/Release/CommonControls/.NET4/RyPrint.dll and b/Bin/Release/CommonControls/.NET4/RyPrint.dll differ diff --git a/Bin/Release/CommonControls/.NET4/RyWeb.dll b/Bin/Release/CommonControls/.NET4/RyWeb.dll index 1121dd7..90ffd11 100644 Binary files a/Bin/Release/CommonControls/.NET4/RyWeb.dll and b/Bin/Release/CommonControls/.NET4/RyWeb.dll differ diff --git a/Bin/Release/CommonControls/.NET4/ryControls.dll b/Bin/Release/CommonControls/.NET4/ryControls.dll index 28d460d..9758a1b 100644 Binary files a/Bin/Release/CommonControls/.NET4/ryControls.dll and b/Bin/Release/CommonControls/.NET4/ryControls.dll differ diff --git a/Bin/Release/CommonControls/.NET4/ryUpdate.dll b/Bin/Release/CommonControls/.NET4/ryUpdate.dll index 4d786d4..ad24fc5 100644 Binary files a/Bin/Release/CommonControls/.NET4/ryUpdate.dll and b/Bin/Release/CommonControls/.NET4/ryUpdate.dll differ diff --git a/CHANGELOG.md b/CHANGELOG.md index 011ae25..7b938e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ -### 2020-12-27 dev更新 +### 2020-12-29 dev更新 +------ +#### ryControls V2.1.2012.2901 +- *.[新增]IconViewEx控件支持角标设置。 + +### 2020-12-27 dev更新 ------ #### ryControls V2.1.2012.2701 - *.[改进]IconViewEx控件选中背景颜色支持渐变。 diff --git a/Source/.vs/公用控件组V4/v16/.suo b/Source/.vs/公用控件组V4/v16/.suo index 624d5c5..a7b2648 100644 Binary files a/Source/.vs/公用控件组V4/v16/.suo and b/Source/.vs/公用控件组V4/v16/.suo differ diff --git a/Source/MyDb/bin/x86/Debug/MyDb.dll b/Source/MyDb/bin/x86/Debug/MyDb.dll index e591ef5..349fd1f 100644 Binary files a/Source/MyDb/bin/x86/Debug/MyDb.dll and b/Source/MyDb/bin/x86/Debug/MyDb.dll differ diff --git a/Source/MyDb/bin/x86/Release/MyDb.dll b/Source/MyDb/bin/x86/Release/MyDb.dll index 7df436e..839976d 100644 Binary files a/Source/MyDb/bin/x86/Release/MyDb.dll and b/Source/MyDb/bin/x86/Release/MyDb.dll differ diff --git a/Source/ryControls/Controls/LableX.cs b/Source/ryControls/Controls/LableX.cs index 891bc6b..d8fdcda 100644 --- a/Source/ryControls/Controls/LableX.cs +++ b/Source/ryControls/Controls/LableX.cs @@ -10,8 +10,9 @@ using System.Windows.Forms; namespace ryControls.Controls { /// - /// + /// 增强版Label(禁用了双击Label会自动复制文本到剪切板的功能) /// + [Description("增强版Label(禁用了双击Label会自动复制文本到剪切板的功能)")] public partial class LableX : Label { private const int WM_LBUTTONDBLCLK = 0x203; diff --git a/Source/ryControls/Controls/List/IItemInfo.cs b/Source/ryControls/Controls/List/IItemInfo.cs index ac62116..921bdaa 100644 --- a/Source/ryControls/Controls/List/IItemInfo.cs +++ b/Source/ryControls/Controls/List/IItemInfo.cs @@ -15,5 +15,9 @@ namespace ryControls.Interface /// 图标 /// Image Image { get; set; } + /// + /// 角标图片序号,为-1表示无角标 + /// + int BadgeImageIndex { get; set; } } } diff --git a/Source/ryControls/Controls/List/IconViewEx.cs b/Source/ryControls/Controls/List/IconViewEx.cs index fe46dfc..f3959cc 100644 --- a/Source/ryControls/Controls/List/IconViewEx.cs +++ b/Source/ryControls/Controls/List/IconViewEx.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Drawing.Drawing2D; @@ -76,6 +77,10 @@ namespace ryControls [Description("是否显示网格线")] public bool IsDrawGridLines { get; set; } /// + /// 角标图标合集 + /// + public List BadgeListImage { get; set; } = new List(); + /// /// 画项 /// /// @@ -91,10 +96,10 @@ namespace ryControls { var soft = (Interface.IItemInfo)e.Item.Tag; if (soft == null || soft.Image == null) - { paddingHeight = this.DrawIcon(g, r, this.Icon, e.Item.BackColor).Height; } + { paddingHeight = this.DrawIcon(g, r, this.Icon, e.Item.BackColor,-1).Height; } else { - paddingHeight = this.DrawIcon(g, r, soft.Image, e.Item.BackColor).Height; + paddingHeight = this.DrawIcon(g, r, soft.Image, e.Item.BackColor, soft.BadgeImageIndex).Height; } } @@ -215,7 +220,7 @@ namespace ryControls /// /// /// - private Size DrawIcon(Graphics g, Rectangle r, Image image, Color backColor) + private Size DrawIcon(Graphics g, Rectangle r, Image image, Color backColor,int BadgeImageIndex) { var x = r.X + ((r.Width - iconsize) / 2); var y = r.Y + ((r.Height - textheight - iconsize) / 2); @@ -236,8 +241,18 @@ namespace ryControls //使图标不会紧贴着每一列的左上角 //imageBounds.X += 1; //imageBounds.Y += 1; - + //如果有角标,则显示角标 g.DrawImage(image, imageBounds); + if (BadgeImageIndex >= 0 && BadgeImageIndex < BadgeListImage.Count) + { + var badge = BadgeListImage[BadgeImageIndex]; + if (badge != null) + { + var size = imageBounds.Width / 5; + var badge_rect = new Rectangle(imageBounds.Left + size * 4, imageBounds.Top, size, size); + g.DrawImage(badge, badge_rect); + } + } return imageBounds.Size; } diff --git a/Source/ryControls/Properties/AssemblyInfo.cs b/Source/ryControls/Properties/AssemblyInfo.cs index c931f63..09e2515 100644 --- a/Source/ryControls/Properties/AssemblyInfo.cs +++ b/Source/ryControls/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, // 方法是按如下所示使用“*”: : // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.1.2012.2701")] -[assembly: AssemblyFileVersion("2.1.2012.2701")] \ No newline at end of file +[assembly: AssemblyVersion("2.1.2012.2901")] +[assembly: AssemblyFileVersion("2.1.2012.2901")] \ No newline at end of file diff --git a/Source/ryControls/bin/x86/Debug/MyDb.dll b/Source/ryControls/bin/x86/Debug/MyDb.dll index e591ef5..349fd1f 100644 Binary files a/Source/ryControls/bin/x86/Debug/MyDb.dll and b/Source/ryControls/bin/x86/Debug/MyDb.dll differ diff --git a/Source/ryControls/bin/x86/Debug/ryControls.dll b/Source/ryControls/bin/x86/Debug/ryControls.dll index 2f586ac..029aab9 100644 Binary files a/Source/ryControls/bin/x86/Debug/ryControls.dll and b/Source/ryControls/bin/x86/Debug/ryControls.dll differ diff --git a/Source/ryControls/bin/x86/Release/MyDb.dll b/Source/ryControls/bin/x86/Release/MyDb.dll index 7df436e..839976d 100644 Binary files a/Source/ryControls/bin/x86/Release/MyDb.dll and b/Source/ryControls/bin/x86/Release/MyDb.dll differ diff --git a/Source/ryControls/bin/x86/Release/ryControls.dll b/Source/ryControls/bin/x86/Release/ryControls.dll index a255089..7033fe1 100644 Binary files a/Source/ryControls/bin/x86/Release/ryControls.dll and b/Source/ryControls/bin/x86/Release/ryControls.dll differ