using System.Runtime.InteropServices; using Decal.Interop.Controls; using Decal.Interop.Inject; namespace Decal.DecalControls { [ComVisible(true)] [Guid("4887101C-A9F9-495B-921B-EF22822CFB97")] [ClassInterface(ClassInterfaceType.None)] [ComSourceInterfaces("Decal.Interop.Inject.IControlEvents\0\0")] [ProgId("DecalControls.StaticText")] public class StaticTextImpl : ControlBase, IStatic { public event IControlEvents_DestroyEventHandler Destroy; private IFontCache _font; private string _text = ""; private int _textColor; public IFontCache Font { get => _font; set { _font = value; Invalidate(); } } public string Text { get => _text; set { _text = value; Invalidate(); } } public int TextColor { get => _textColor; set { _textColor = value; Invalidate(); } } protected override void OnDestroy() => Destroy?.Invoke(ID); } }