示例#1
0
        private List<TaskModel> GetTaskModels()
        {
            var models = new List<TaskModel>();
            var issues = _issuesTracking.GetIssues().Issues;
            var versions = _issuesTracking.GetVersions().OrderByDescending(version => version.Name);
            foreach (var issue in issues)
            {
                var model = new TaskModel(_sourceControl, _issuesTracking,_repositoryFactory, issue);
                model.AvailableVersions = versions;
                models.Add(model);
            }

            return models;
        }
示例#2
0
        private void UpdateUI(TaskModel model)
        {
            if (!View.ViewModel.IsCurrent(model.Key))
            {
                var taskView = new TaskView(new TaskViewModel(model));

                if (model.IsToDo)
                {
                    View.ViewModel.ToDo.AddInOrder(taskView);
                }
                else if (model.IsInProgress)
                {
                    View.ViewModel.InProgress.AddInOrder(taskView);
                }
                else if (model.IsDone)
                {
                    View.ViewModel.Done.AddInOrder(taskView);
                }
            }
        }
示例#3
0
        public void UpdateModel(TaskModel model)
        {
            Model = model;

            FixedVersions.Clear();

            foreach (var fixedVersion in Model.FixedVersions)
            {
                FixedVersions.Add(fixedVersion.Name);
            }

            RaisePropertyChangedForAll();
        }
示例#4
0
        public TaskViewModel(TaskModel model)
        {
            Model = model;

            FixedVersions = new ObservableCollection<string>(model.FixedVersions.Select(version => version.Name));
        }