2017-08-10 14:09:41 +00:00
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
2020-04-23 08:16:16 +00:00
|
|
|
|
namespace HeliosPlus.ShellExtension
|
2017-08-10 14:09:41 +00:00
|
|
|
|
{
|
|
|
|
|
public static class Shield
|
|
|
|
|
{
|
|
|
|
|
private static Bitmap _smallIcon;
|
|
|
|
|
|
|
|
|
|
public static Bitmap SmallIcon
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (_smallIcon != null)
|
2018-10-20 00:27:25 +00:00
|
|
|
|
{
|
2017-08-10 14:09:41 +00:00
|
|
|
|
return _smallIcon;
|
2018-10-20 00:27:25 +00:00
|
|
|
|
}
|
|
|
|
|
|
2017-08-10 14:09:41 +00:00
|
|
|
|
var iconSize = SystemInformation.SmallIconSize;
|
|
|
|
|
_smallIcon = new Bitmap(iconSize.Width, iconSize.Height);
|
2018-10-20 00:27:25 +00:00
|
|
|
|
|
2017-08-10 14:09:41 +00:00
|
|
|
|
using (var g = Graphics.FromImage(_smallIcon))
|
|
|
|
|
{
|
|
|
|
|
g.DrawIcon(SystemIcons.Shield, new Rectangle(Point.Empty, iconSize));
|
|
|
|
|
}
|
2018-10-20 00:27:25 +00:00
|
|
|
|
|
2017-08-10 14:09:41 +00:00
|
|
|
|
return _smallIcon;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|