-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTask.cs
More file actions
76 lines (67 loc) · 1.3 KB
/
Task.cs
File metadata and controls
76 lines (67 loc) · 1.3 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
72
73
74
75
76
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MyLibrary
{
/// <summary>
/// ReDo, UnDoの実装用
/// </summary>
public class Task
{
public enum Type
{
DELETE,
INSERT,
REPLACE,
REPLACEALL,// 一つだけ戻すだけでなく、全部戻すこともできるようにする。
}
public Type type;
public int fromLine;
public int fromPos;
public int length;
public string str;
public string toString()
{
return type.ToString();
}
}
/// <summary>
///
/// </summary>
public class ReplaceAll : Task
{
public ReplaceAll()
{
type = Type.REPLACEALL;
}
}
/// <summary>
///
/// </summary>
public class Replace : Task
{
public Replace()
{
type = Type.REPLACE;
}
}
public class Insert : Task
{
public Insert()
{
type = Type.INSERT;
}
}
public class Delete : Task
{
public Delete()
{
type = Type.DELETE;
}
}
public class TaskEventArgs : EventArgs
{
public Task task;
}
}