using System; using Overlay.NET.Common; using Process.NET.Windows; namespace Overlay.NET { /// /// Abstract class that defines basic overlay operations and values. /// /// /// public abstract class OverlayPlugin : PluginBase, IDisposable { /// /// Gets or sets the target window that the overlay is to 'attach' to. /// /// /// The target window. /// public IWindow TargetWindow { get; protected set; } /// /// Gets or sets a value indicating whether this instance is enabled. /// /// /// true if this instance is enabled; otherwise, false. /// public bool IsEnabled { get; protected set; } /// /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// public virtual void Dispose() {} /// /// Enables this instance. /// public virtual void Enable() => IsEnabled = true; /// /// Disables this instance. /// public virtual void Disable() => IsEnabled = false; /// /// Initializes the specified target window. /// /// The target window. public virtual void Initialize(IWindow targetWindow) => TargetWindow = targetWindow; /// /// Updates this instance. /// public virtual void Update() {} } }