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; }
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); } } }
public void UpdateModel(TaskModel model) { Model = model; FixedVersions.Clear(); foreach (var fixedVersion in Model.FixedVersions) { FixedVersions.Add(fixedVersion.Name); } RaisePropertyChangedForAll(); }
public TaskViewModel(TaskModel model) { Model = model; FixedVersions = new ObservableCollection<string>(model.FixedVersions.Select(version => version.Name)); }