-
Notifications
You must be signed in to change notification settings - Fork 0
/
ToolStateManager.cs
63 lines (56 loc) · 1.3 KB
/
ToolStateManager.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace nagexym
{
/// <summary>
/// ツールの状態を管理する
/// </summary>
internal class ToolStateManager
{
/// <summary>
/// ツールの状態
/// </summary>
internal enum ToolState
{
Init,
StartReadExcel,
EndReadExcel,
StartCheck,
Checking,
EndCheck,
StartSend,
EndSend,
Complete
}
/// <summary>
/// ツールの状態
/// </summary>
private ToolState _toolState;
/// <summary>
/// コンストラクタ
/// </summary>
internal ToolStateManager()
{
_toolState = ToolState.Init;
}
/// <summary>
/// ツールの状態を返す
/// </summary>
/// <returns></returns>
internal ToolState GetState()
{
return _toolState;
}
/// <summary>
/// 次の状態へ以降する
/// </summary>
/// <param name="state"></param>
internal void SetState(ToolState state)
{
_toolState= state;
}
}
}