forked from fdorg/flashdevelop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEventTypes.cs
More file actions
71 lines (56 loc) · 1.62 KB
/
Copy pathEventTypes.cs
File metadata and controls
71 lines (56 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using System.Windows.Forms;
namespace PluginCore
{
/// <summary>
/// Events without arguments
/// </summary>
public class NotifyEvent
{
public EventType Type { get; }
public bool Handled { get; set; } = false;
public NotifyEvent(EventType type) => Type = type;
}
/// <summary>
/// Events with text data
/// </summary>
public class TextEvent : NotifyEvent
{
public string Value { get; set; }
public TextEvent(EventType type, string value) : base(type) => Value = value;
}
/// <summary>
/// Events with number data
/// </summary>
public class NumberEvent : NotifyEvent
{
public int Value { get; set; }
public NumberEvent(EventType type, int value) : base(type) => Value = value;
}
/// <summary>
/// Events with Key data
/// </summary>
public class KeyEvent : NotifyEvent
{
public Keys Value { get; set; }
public bool ProcessKey { get; set; }
public KeyEvent(EventType type, Keys value) : base(type) => Value = value;
}
/// <summary>
/// Events with custom data
/// </summary>
public class DataEvent : NotifyEvent
{
public string Action { get; }
public object Data { get; set; }
public DataEvent(EventType type, string action, object data) : base(type)
{
Action = action;
Data = data;
}
}
public class TextDataEvent : TextEvent
{
public object Data { get; }
public TextDataEvent(EventType type, string text, object data) : base(type, text) => Data = data;
}
}