From 3268a66d6405c90d056c300c4401eaa6e6523f1e Mon Sep 17 00:00:00 2001
From: Stone-Red-Code <56473591+Stone-Red-Code@users.noreply.github.com>
Date: Sat, 21 Aug 2021 23:05:32 +0200
Subject: [PATCH] Add Start method.
---
src/DesktopMagicPluginAPI/DesktopMagicPluginAPI.md | 12 ++++++++++++
src/DesktopMagicPluginAPI/DesktopMagicPluginAPI.xml | 7 ++++++-
src/DesktopMagicPluginAPI/Inputs/Button.cs | 2 +-
src/DesktopMagicPluginAPI/Plugin.cs | 7 +++++++
4 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/src/DesktopMagicPluginAPI/DesktopMagicPluginAPI.md b/src/DesktopMagicPluginAPI/DesktopMagicPluginAPI.md
index c0d0e9b..876a43e 100644
--- a/src/DesktopMagicPluginAPI/DesktopMagicPluginAPI.md
+++ b/src/DesktopMagicPluginAPI/DesktopMagicPluginAPI.md
@@ -44,6 +44,7 @@
- [Main()](#M-DesktopMagicPluginAPI-Plugin-Main 'DesktopMagicPluginAPI.Plugin.Main')
- [OnMouseClick(position)](#M-DesktopMagicPluginAPI-Plugin-OnMouseClick-System-Drawing-Point- 'DesktopMagicPluginAPI.Plugin.OnMouseClick(System.Drawing.Point)')
- [OnMouseMove(position)](#M-DesktopMagicPluginAPI-Plugin-OnMouseMove-System-Drawing-Point- 'DesktopMagicPluginAPI.Plugin.OnMouseMove(System.Drawing.Point)')
+ - [Start()](#M-DesktopMagicPluginAPI-Plugin-Start 'DesktopMagicPluginAPI.Plugin.Start')
- [Slider](#T-DesktopMagicPluginAPI-Inputs-Slider 'DesktopMagicPluginAPI.Inputs.Slider')
- [#ctor(min,max,value)](#M-DesktopMagicPluginAPI-Inputs-Slider-#ctor-System-Double,System-Double,System-Double- 'DesktopMagicPluginAPI.Inputs.Slider.#ctor(System.Double,System.Double,System.Double)')
- [Maximum](#P-DesktopMagicPluginAPI-Inputs-Slider-Maximum 'DesktopMagicPluginAPI.Inputs.Slider.Maximum')
@@ -502,6 +503,17 @@ Occurs when the mouse pointer is moved over the control.
| ---- | ---- | ----------- |
| position | [System.Drawing.Point](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Drawing.Point 'System.Drawing.Point') | |
+
+### Start() `method`
+
+##### Summary
+
+Occurs once when the pugin gets activated.
+
+##### Parameters
+
+This method has no parameters.
+
## Slider `type`
diff --git a/src/DesktopMagicPluginAPI/DesktopMagicPluginAPI.xml b/src/DesktopMagicPluginAPI/DesktopMagicPluginAPI.xml
index ad99239..147c378 100644
--- a/src/DesktopMagicPluginAPI/DesktopMagicPluginAPI.xml
+++ b/src/DesktopMagicPluginAPI/DesktopMagicPluginAPI.xml
@@ -60,7 +60,7 @@
- Occurs when the button is clicked.
+ Occurs when the button gets clicked.
@@ -281,6 +281,11 @@
Gets or sets the interval, expressed in milliseconds, at which to call the method.
+
+
+ Occurs once when the pugin gets activated.
+
+
Occurs when the elapses.
diff --git a/src/DesktopMagicPluginAPI/Inputs/Button.cs b/src/DesktopMagicPluginAPI/Inputs/Button.cs
index 9e2be09..5ea1fc4 100644
--- a/src/DesktopMagicPluginAPI/Inputs/Button.cs
+++ b/src/DesktopMagicPluginAPI/Inputs/Button.cs
@@ -12,7 +12,7 @@ namespace DesktopMagicPluginAPI.Inputs
public class Button : Element
{
///
- /// Occurs when the button is clicked.
+ /// Occurs when the button gets clicked.
///
public event Action OnClick;
diff --git a/src/DesktopMagicPluginAPI/Plugin.cs b/src/DesktopMagicPluginAPI/Plugin.cs
index cba7bc8..0a2c345 100644
--- a/src/DesktopMagicPluginAPI/Plugin.cs
+++ b/src/DesktopMagicPluginAPI/Plugin.cs
@@ -34,6 +34,13 @@ namespace DesktopMagicPluginAPI
///
public virtual int UpdateInterval { get; set; } = 1000;
+ ///
+ /// Occurs once when the pugin gets activated.
+ ///
+ public virtual void Start()
+ {
+ }
+
///
/// Occurs when the elapses.
///