Added documentation to the DesktopMagicPluginAPI

This commit is contained in:
Stone-Red-Code
2021-08-14 21:19:03 +02:00
parent 883cc3a2fb
commit f05b5783ba
108 changed files with 1107 additions and 103 deletions
@@ -6,12 +6,21 @@ using System.Threading.Tasks;
namespace DesktopMagicPluginAPI.Inputs
{
/// <summary>
/// Represents a button control.
/// </summary>
public class Button : Element
{
/// <summary>
/// Occurs when the button is clicked.
/// </summary>
public event Action OnClick;
private string _value;
/// <summary>
/// Gets or sets the text caption displayed in the <see cref="Button"/> element.
/// </summary>
public string Value
{
get => _value;
@@ -25,11 +34,18 @@ namespace DesktopMagicPluginAPI.Inputs
}
}
/// <summary>
/// Initializes a new instance of the <see cref="Button"/> class with the provided <paramref name="value"/>.
/// </summary>
/// <param name="value">The text caption displayed in the <see cref="Button"/> control.</param>
public Button(string value)
{
Value = value;
}
/// <summary>
/// Triggers the <see cref="OnClick"/> event.
/// </summary>
public void Click()
{
OnClick?.Invoke();