コード例 #1
0
ファイル: Application.cs プロジェクト: teotikalki/tasque
        private void RebuildTooltipTaskGroupModels()
        {
            if (backend == null || backend.Tasks == null)
            {
                OverdueTasks  = null;
                TodayTasks    = null;
                TomorrowTasks = null;

                return;
            }

            OverdueTasks  = TaskGroupModelFactory.CreateOverdueModel(backend.Tasks);
            TodayTasks    = TaskGroupModelFactory.CreateTodayModel(backend.Tasks);
            TomorrowTasks = TaskGroupModelFactory.CreateTomorrowModel(backend.Tasks);

            foreach (TaskGroupModel model in new TaskGroupModel[] { OverdueTasks, TodayTasks, TomorrowTasks })
            {
                if (model == null)
                {
                    continue;
                }

                model.CollectionChanged += OnTooltipModelChanged;
            }
        }
コード例 #2
0
ファイル: Application.cs プロジェクト: nolith/tasque
        private void RebuildTooltipTaskGroupModels()
        {
            if (backend == null || backend.Tasks == null)
            {
                overdue_tasks  = null;
                today_tasks    = null;
                tomorrow_tasks = null;

                return;
            }

            overdue_tasks  = TaskGroupModelFactory.CreateOverdueModel(backend.Tasks);
            today_tasks    = TaskGroupModelFactory.CreateTodayModel(backend.Tasks);
            tomorrow_tasks = TaskGroupModelFactory.CreateTomorrowModel(backend.Tasks);

            foreach (TaskGroupModel model in new TaskGroupModel[] { overdue_tasks, today_tasks, tomorrow_tasks })
            {
                if (model == null)
                {
                    continue;
                }

                model.RowInserted += OnTooltipModelChanged;
                model.RowChanged  += OnTooltipModelChanged;
                model.RowDeleted  += OnTooltipModelChanged;
            }
        }