mirror of
https://github.com/Stone-Red-Code/DesktopMagic.git
synced 2026-09-04 08:56:15 +02:00
Setup
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
|
||||
namespace DesktopMagicPluginAPI
|
||||
{
|
||||
public abstract class Plugin
|
||||
{
|
||||
private IPluginData application = null;
|
||||
|
||||
public IPluginData Application
|
||||
{
|
||||
get => application;
|
||||
set
|
||||
{
|
||||
if (application is null)
|
||||
{
|
||||
application = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new InvalidOperationException($"You cannot set the value of the {nameof(Application)} property");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual int UpdateInterval { get; set; } = 1000;
|
||||
|
||||
public virtual string[,] Inputs { get; set; } = new string[0, 0];
|
||||
|
||||
public abstract Bitmap Main();
|
||||
|
||||
public virtual void OnOptionChanged(int optionIndex)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnMouseClick(Point position)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnMouseMove(Point position)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user