MosswartMassacre/Unused/Decal.Adapter/ControlEventAttribute.cs
2025-06-09 02:03:11 +02:00

35 lines
751 B
C#

using System;
namespace Decal.Adapter;
/// <summary>
/// ControlEvent AutoWireup
/// </summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public sealed class ControlEventAttribute : ViewBaseAttribute
{
private string myControl;
private string myEventName;
/// <summary>
/// Control Name
/// </summary>
public string Control => myControl;
/// <summary>
/// Event to Wire
/// </summary>
public string EventName => myEventName;
/// <summary>
/// Constructs the ControlEvent
/// </summary>
/// <param name="control">Control Name</param>
/// <param name="controlEvent">Event to Wire</param>
public ControlEventAttribute(string control, string eventName)
{
myControl = control;
myEventName = eventName;
}
}