private void SetSprint(Sprint sprint) { progressBar.Visibility = Visibility.Collapsed; var columns = new List<List<IEnumerable<Task>>>(); columns.AddRange(Enumerable.Repeat(new List<IEnumerable<Task>>(), 4)); foreach (var story in sprint.Stories) { AddRow(); AddControl(new TextBlock { Text = story.Title, TextWrapping = TextWrapping.Wrap}); AddControl(new TaskStack { Tasks = story.TasksToDo }); AddControl(new TaskStack { Tasks = story.TasksInProgress }); AddControl(new TaskStack { Tasks = story.TasksToVerify }); AddControl(new TaskStack { Tasks = story.TasksDone }); } }
void DownloadCompleted(object sender, DownloadStringCompletedEventArgs e) { var root = XElement.Parse(e.Result); var stories = root.Element("stories"); var sprint = new Sprint { Stories = from story in stories.Elements("story") select new Story { Title = story.Element("title").Value, Tasks = from task in story.Element("tasks").Elements("task") select new Task { Title = task.Element("title").Value, State = task.Element("state").Value } } }; if (FetchCompleted != null) FetchCompleted(this, new FetchSprintEventArgs {Sprint = sprint}); }