-
Notifications
You must be signed in to change notification settings - Fork 0
/
ApplicationFacade.cs
59 lines (57 loc) · 2.77 KB
/
ApplicationFacade.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
using System;
using System.Collections.Generic;
using System.Text;
using PureMVC.Patterns;
using SlimTimer.control;
namespace SlimTimer
{
class ApplicationFacade : Facade
{
public static String APPLICATION_STARTUP = "APPLICATION_STARTUP";
public static String APPLICATION_SHUTDOWN = "APPLICATION_SHUTDOWN";
public static String SET_CURRENT_TASK = "SET_CURRENT_TASK";
public static String GET_TASKS = "GET_TASKS";
public static String LOGIN = "LOGIN";
public static String MODEL_PREP = "MODEL_PREP";
public static String PAUSE = "PAUSE";
public static String RESUME = "RESUME";
public static String SAVE_TIME_ENTRY = "SAVE_TIME_ENTRY";
public static String SELECT_TRACKING = "SELECT_TRACKING";
public static String RESET_TIMEOUT = "RESET_TIMEOUT";
public static String CLEANUP_DUPLICATES = "CLEANUP_DUPLICATES";
public static String CLEANUP_OVERLAPS = "CLEANUP_OVERLAPS";
public static String NEW_TIME_ENTRY = "NEW_TIME_ENTRY";
public static String CHANGE_FILE = "CHANGE_FILE";
public static String CHANGE_PROJECT = "CHANGE_PROJECT";
protected static ApplicationFacade instance;
protected ApplicationFacade() { }
static ApplicationFacade()
{
instance = new ApplicationFacade();
}
public static ApplicationFacade getInstance()
{
return instance as ApplicationFacade;
}
protected override void InitializeController()
{
base.InitializeController();
RegisterCommand(APPLICATION_STARTUP, typeof(ApplicationStartupCommand));
RegisterCommand(APPLICATION_SHUTDOWN, typeof(ApplicationShutdownCommand));
RegisterCommand(SET_CURRENT_TASK, typeof(SetCurrentTaskCommand));
RegisterCommand(GET_TASKS, typeof(GetTasksCommand));
RegisterCommand(LOGIN, typeof(LoginCommand));
RegisterCommand(MODEL_PREP, typeof(ModelPrepCommand));
RegisterCommand(PAUSE, typeof(PauseCommand));
RegisterCommand(RESUME, typeof(ResumeCommand));
RegisterCommand(SAVE_TIME_ENTRY, typeof(SaveTimeEntryCommand));
RegisterCommand(SELECT_TRACKING, typeof(SelectTracking));
RegisterCommand(RESET_TIMEOUT, typeof(ResetTimeoutCommand));
RegisterCommand(CLEANUP_DUPLICATES, typeof(CleanDuplicatesCommand));
RegisterCommand(CLEANUP_OVERLAPS, typeof(CleanOverlapsCommand));
RegisterCommand(NEW_TIME_ENTRY, typeof(NewTimeEntryCommand));
RegisterCommand(CHANGE_FILE, typeof(ChangeFileCommand));
RegisterCommand(CHANGE_PROJECT, typeof(ChangeProjectCommand));
}
}
}