public ShellViewModel() { Genres = new ReactiveCollection<Genre>(Data.Genres); Albums = new ReactiveCollection<Album>(Data.Albums); Artists = new ReactiveCollection<Artist>(Data.Artists); albums = new PanoramaGroup("trending tracks"); artists = new PanoramaGroup("trending artists"); Groups = new ReactiveCollection<PanoramaGroup> { albums, artists }; artists.SetSource(Data.Artists.Take(25)); albums.SetSource(Data.Albums.Take(25)); }
public MainWindowViewModel(Dispatcher dispatcher) { SampleData.Seed(); Albums = SampleData.Albums; Artists = SampleData.Artists; Busy = true; _albums = new PanoramaGroup("trending tracks"); _artists = new PanoramaGroup("trending artists"); Groups = new ObservableCollection<PanoramaGroup> {_albums, _artists}; _artists.SetSource(SampleData.Artists.Take(25)); _albums.SetSource(SampleData.Albums.Take(25)); Busy = false; }
public MainWindowViewModel(Dispatcher dispatcher) { _dispatcher = dispatcher; tracks = new PanoramaGroup("trending tracks"); artists = new PanoramaGroup("trending artists"); Groups = new ObservableCollection<PanoramaGroup> { tracks, artists }; var wc = new WebClient(); wc.DownloadStringCompleted += WcDownloadStringCompleted; wc.DownloadStringAsync(new Uri("http://ws.audioscrobbler.com/2.0/?method=chart.gethypedartists&api_key=b25b959554ed76058ac220b7b2e0a026&format=json")); var wc2 = new WebClient(); wc2.DownloadStringCompleted += WcDownloadStringCompleted2; wc2.DownloadStringAsync(new Uri("http://ws.audioscrobbler.com/2.0/?method=chart.gethypedtracks&api_key=b25b959554ed76058ac220b7b2e0a026&format=json")); }
public MainWindowViewModel(Dispatcher dispatcher) { Busy = true; _dispatcher = dispatcher; tracks = new PanoramaGroup("trending tracks"); artists = new PanoramaGroup("trending artists"); Groups = new ObservableCollection<PanoramaGroup> { tracks, artists }; var wc = new WebClient(); wc.DownloadStringCompleted += WcDownloadStringCompleted; wc.DownloadStringAsync(new Uri("http://ws.audioscrobbler.com/2.0/?method=group.gethype&group=radiohead&api_key=c0cb068ceae0af293317a11404f9d027&format=json")); var wc2 = new WebClient(); wc2.DownloadStringCompleted += WcDownloadStringCompleted2; wc2.DownloadStringAsync(new Uri("http://ws.audioscrobbler.com/2.0/?method=group.gethype&group=radiohead&api_key=c0cb068ceae0af293317a11404f9d027&format=json")); }
public MainWindowViewModel() { SampleData.Seed(); // create accent color menu items for the demo this.AccentColors = ThemeManager.DefaultAccents .Select(a => new AccentColorMenuData() { Name = a.Name, ColorBrush = a.Resources["AccentColorBrush"] as Brush }) .ToList(); Albums = SampleData.Albums; Artists = SampleData.Artists; Busy = true; _albums = new PanoramaGroup("trending tracks"); _artists = new PanoramaGroup("trending artists"); Groups = new ObservableCollection<PanoramaGroup> { _albums, _artists }; _artists.SetSource(SampleData.Artists.Take(25)); _albums.SetSource(SampleData.Albums.Take(25)); Busy = false; }
private void LoadLists() { this.ListOffers = this.dbRepo.GetJobOffers(AppSettings.OffersPerPage); this.ListCategories = this.dbRepo.GetCategoriesFor(false); NotifyOfPropertyChange(() => ListOffers); NotifyOfPropertyChange(() => ListCategories); this.PGOffers = new PanoramaGroup(Properties.Resources.menu_Offers, this.ListOffers); this.PGCategories = new PanoramaGroup(Properties.Resources.menu_Categories, this.ListCategories); this.PGOffersCategories = new ObservableCollection<PanoramaGroup> { this.PGOffers, this.PGCategories }; }
private void OnProjectLoaded(IEnumerable<Project> obj) { Projects = new ObservableCollection<Project>(obj); PanoramaGroups = new ObservableCollection<PanoramaGroup>(); PanoramaGroup group = new PanoramaGroup("Projects"); PanoramaGroups.Add(group); group.SetSource(Projects.Select(p=> { return new ProjectWrapper {Project = p}; })); }