40 lines
No EOL
1 KiB
C#
40 lines
No EOL
1 KiB
C#
using System.Drawing;
|
|
using JD.TeaBoxAddinSystem.Addins.Description;
|
|
using JD.TeaBoxAddinSystem.Addins.Internal;
|
|
|
|
namespace JD.TeaBoxAddinSystem.Addins
|
|
{
|
|
/// <summary>
|
|
/// A lazy-obtained icon.
|
|
/// </summary>
|
|
public class LazyIconReference : LazyResourceReference<Icon>
|
|
{
|
|
#region Constructor
|
|
|
|
/// <summary>
|
|
/// Constructor.
|
|
/// </summary>
|
|
/// <param name="node"></param>
|
|
/// <param name="resourcename"></param>
|
|
public LazyIconReference(Node node, string resourcename)
|
|
: base(node, resourcename)
|
|
{ }
|
|
|
|
#endregion
|
|
|
|
#region Methods
|
|
|
|
/// <summary>
|
|
/// Creates the resource
|
|
/// </summary>
|
|
/// <param name="resources"></param>
|
|
/// <param name="resourceName"></param>
|
|
/// <returns></returns>
|
|
protected override Icon CreateValue(IResources resources, string resourceName)
|
|
{
|
|
return resources.GetIcon(resourceName);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
} |