mirror of
https://github.com/Stone-Red-Code/DesktopMagic.git
synced 2026-09-04 17:06:12 +02:00
44 lines
1020 B
C#
44 lines
1020 B
C#
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)
|
|
{
|
|
}
|
|
}
|
|
} |