Ejemplo n.º 1
0
        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;
                }
            };
        }
Ejemplo n.º 2
0
        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"
                )
            );
        }
Ejemplo n.º 3
0
 public TaskList(PendingTaskList plist, CompletedTaskList clist)
 {
     pendingTasks   = plist;
     completedTasks = clist;
 }