DisplayMagician/HeliosDisplayManagement.ShellExtension/Shield.cs
temacdonald a9bb295d1f Renamed app to HeliosPlus namespace and more
Renamed app to HeliosPlus namespace so that the updated
changes don't interfere with HeliosDisplayManagement if
that is also installed. The fact that I've changed so much of
the app means that my changes would be unlikely to be
accepted by Soroush, so I'm best to release this work in a
similar way to other projects like Notepad++, by keeping
the same root name, and adding a plus.
    I've also changed the Shortcut form to put all the games
in a single list to reduce the number of clicks a user has to
do in order for them to create a shortcut. I have begun to
prepare the form so that it will support multiple game
libraries, but now I am at a point that I need to fix the Steam
and Uplay game detection mechanisms so that they report
the correct information for the lv_games list view.
2020-04-23 20:16:16 +12:00

31 lines
762 B
C#

using System.Drawing;
using System.Windows.Forms;
namespace HeliosPlus.ShellExtension
{
public static class Shield
{
private static Bitmap _smallIcon;
public static Bitmap SmallIcon
{
get
{
if (_smallIcon != null)
{
return _smallIcon;
}
var iconSize = SystemInformation.SmallIconSize;
_smallIcon = new Bitmap(iconSize.Width, iconSize.Height);
using (var g = Graphics.FromImage(_smallIcon))
{
g.DrawIcon(SystemIcons.Shield, new Rectangle(Point.Empty, iconSize));
}
return _smallIcon;
}
}
}
}