-
Notifications
You must be signed in to change notification settings - Fork 0
/
ClipboardTask.cs
43 lines (39 loc) · 1.03 KB
/
ClipboardTask.cs
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Appboxstudios.ClipboardBroadcaster
{
public enum ClipboardTaskTypeEnum
{
Text, Files, Image
}
public enum ClipboardOperationTypeEnum
{
Copy, Paste
}
public class ClipboardTask
{
public ClipboardTask(ClipboardTaskTypeEnum type, ClipboardOperationTypeEnum operation, Action action)
{
Type = type;
Operation = operation;
Action = action;
}
public ClipboardTaskTypeEnum Type { get; set; }
public ClipboardOperationTypeEnum Operation { get; set; }
public Action Action { get; set; }
internal void Handle()
{
switch (Operation)
{
case ClipboardOperationTypeEnum.Copy:
Action();
break;
case ClipboardOperationTypeEnum.Paste:
Action();
break;
}
}
}
}