Ejemplo n.º 1
0
 async Task <object> Search()
 {
     if (QueryWord.Length > 0)
     {
         TracksCollection.Clear();
         TracksCollection.AddRange(await service.Query("Title", QueryWord).ConfigureAwait(false), true);
     }
     return(null);
 }
Ejemplo n.º 2
0
 public void Reset()
 {
     PlaylistSongCollection?.Clear();
     TracksCollection?.Clear();
     DontUpdatePosition = true;
     CurrentPosition    = 0;
     UpcomingSong       = null;
     timer.Stop();
     ShuffledList?.Clear();
     PlayPauseIcon = new SymbolIcon(Symbol.Play);
 }
Ejemplo n.º 3
0
 public void Dispose()
 {
     Database.Dispose();
     TracksCollection.Clear();
     RecentlyPlayedCollection.Clear();
     ShellVM.PlaylistsItems.Clear();
     OldItems = null;
     PlaylistCollection.Clear();
     OptionItems.Clear();
     GenreCollection.Clear();
 }
Ejemplo n.º 4
0
 async Task <object> Search()
 {
     if (QueryWord.Length > 2)
     {
         TracksCollection.Clear();
         TracksCollection.AddRange((await service.Query("Title", QueryWord).ConfigureAwait(false)), false, false);
         if (TracksCollection.Elements.Count <= 0)
         {
             Messenger.Instance.NotifyColleagues(MessageTypes.MSG_SEARCH_STARTED, "Nothing found for keyword \"" + QueryWord + "\"");
         }
     }
     return(null);
 }
Ejemplo n.º 5
0
 public void Reset()
 {
     LibraryService.Dispose();
     LibraryService = null;
     TracksCollection.Clear();
     RecentlyPlayedCollection.Clear();
     GenreFlyout?.Items.Clear();
     PlaylistsItems?.Clear();
     OldItems = null;
     PlaylistCollection.Clear();
     OptionItems.Clear();
     GenreCollection.Clear();
     SongCount = -1;
 }
Ejemplo n.º 6
0
 async Task Reload()
 {
     if (cache == null || TracksCollection.Elements.Count < service.SongCount)
     {
         TracksCollection.Clear();
         TracksCollection.AddRange(await service.GetAllMediafiles().ConfigureAwait(false), true);
         cache = new ThreadSafeObservableCollection <Mediafile>(TracksCollection.Elements);
     }
     else
     {
         TracksCollection.Clear();
         TracksCollection.AddRange(cache, false, true);
     }
 }