using System;
using System.Windows.Forms;
namespace PluginCore
{
///
/// Events without arguments
///
public class NotifyEvent
{
private EventType type;
private Boolean handled;
public EventType Type
{
get { return this.type; }
}
public Boolean Handled
{
get { return this.handled; }
set { this.handled = value; }
}
public NotifyEvent(EventType type)
{
this.handled = false;
this.type = type;
}
}
///
/// Events with text data
///
public class TextEvent : NotifyEvent
{
private String value;
public String Value
{
get { return this.value; }
set { this.value = value; }
}
public TextEvent(EventType type, String value) : base(type)
{
this.value = value;
}
}
///
/// Events with number data
///
public class NumberEvent : NotifyEvent
{
private Int32 value;
public Int32 Value
{
get { return this.value; }
set { this.value = value; }
}
public NumberEvent(EventType type, Int32 value) : base(type)
{
this.value = value;
}
}
///
/// Events with Key data
///
public class KeyEvent : NotifyEvent
{
private Keys value;
private Boolean processKey;
public Keys Value
{
get { return this.value; }
set { this.value = value; }
}
public Boolean ProcessKey
{
get { return this.processKey; }
set { this.processKey = value; }
}
public KeyEvent(EventType type, Keys value) : base(type)
{
this.value = value;
}
}
///
/// Events with custom data
///
public class DataEvent : NotifyEvent
{
private Object data;
private String action;
public String Action
{
get { return this.action; }
}
public Object Data
{
get { return this.data; }
set { this.data = value; }
}
public DataEvent(EventType type, String action, Object data) : base(type)
{
this.action = action;
this.data = data;
}
}
}