Пример #1
0
        private void OnTasksAdded(object sender, TasksListItemsChangedEventArgs e) {
            SuspendRefresh();
            foreach (var task in e.Tasks) {
                var vsTask = new VsTaskItem(task, _source);
                _itemMap[task] = vsTask;

                this.Tasks.Add(vsTask);
            }

            _dirty = true;
            ResumeRefresh();
        }
Пример #2
0
        private void OnTasksRemoved(object sender, TasksListItemsChangedEventArgs e) {
            SuspendRefresh();
            foreach (var task in e.Tasks) {
                VsTaskItem vsTask;
                if (_itemMap.TryGetValue(task, out vsTask)) {
                    this.Tasks.Remove(vsTask);
                    _itemMap.Remove(task);
                }
            }

            _dirty = true;
            ResumeRefresh();
        }