예제 #1
0
        private void SetPatternList()
        {
            IsDownloading = true;
            var patterns        = _brainstormingService.DownloadPatternIdeas();
            var groupedPatterns = patterns.GroupBy(p => p.Category);

            foreach (var group in groupedPatterns)
            {
                var patternList       = new GroupedPatternList();
                var patternIdeaModels = group.Select(p => new PatternIdeaModel(p)).ToList();
                patternIdeaModels.ForEach((p) =>
                {
                    _brainstormingService.SetPictureImageSource(p);
                });
                patternList.AddRange(patternIdeaModels);
                patternList.Category = group.Key;
                GroupedPatterns.Add(patternList);
            }
            IsDownloading = false;
        }
예제 #2
0
 private async Task DownloadImage(Idea idea)
 {
     await _brainstormingService.SetPictureImageSource(idea);
 }