public TaskCompleteIcon(CompletedTaskList taskList) { taskList.TaskChanged += (n, e) => { if (StatusChange == null) return; switch(e.TaskChange) { case CompletedTaskChange.TaskCompleted: StatusChange(n, this, SystemIconStatusChange.Show); break; case CompletedTaskChange.TaskRemoved: StatusChange(n, this, SystemIconStatusChange.Hide); break; } }; }
public void Initialize(IPluginManager pluginMgr) { this.PluginManager = pluginMgr; pendingTasks = new PendingTaskList(); completedTasks = new CompletedTaskList(); AllTasks = new TaskList(pendingTasks, completedTasks); pendingTasks.TaskChanged += PendingTasks_TaskChanged; pendingTasks.TaskTextChanged += PendingTasks_TaskTextChanged; pendingTasks.TaskSelectionChanged += PendingTasks_TaskSelectionChanged; dateTimePicker = new DateTimePicker(); taskListView = new TaskListView(); taskListView.TaskViewEvent += OnTaskViewEvent; pluginMgr.ScheduleTask(new TaskSchedular.RecurringTask( () => { taskListView.Invoke((Action)RefreshTaskListView); }, DateTime.Today.AddDays(1), TimeSpan.FromDays(1), "TaskListRefreshNewDay" ) ); }
public TaskList(PendingTaskList plist, CompletedTaskList clist) { pendingTasks = plist; completedTasks = clist; }