private async void btnToFile_Click(object sender, RoutedEventArgs e) { EnableButtons(false); dgVisible.DataContext = _sourceSonglist = await RatingConnector.SetFilesRating(_sourceSonglist, cancelSource.Token, progress); EnableButtons(true); }
private async void btnReadItunesRating_Click(object sender, RoutedEventArgs e) { EnableButtons(false); dgVisible.DataContext = _sourceSonglist = await RatingConnector.ItunesRatingSet(_sourceSonglist, _myiTunes, cancelSource.Token, progress); EnableButtons(true); }
private async void WriteRating(bool ToiTunes) { EnableButtons(false); if (ToiTunes) { _sourceSonglistFull = await RatingConnector.ItunesRatingSet(dgVisible.DataContext as Dictionary <int, SongStructS>, _myiTunes, cancelSource.Token, progress); } else { _sourceSonglistFull = await RatingConnector.SetFilesRating(dgVisible.DataContext as Dictionary <int, SongStructS>, cancelSource.Token, progress); } _sourceSonglistLight = await Helper.FilterDifferenzes(_sourceSonglistFull, cancelSource.Token, progress); CbFilter.IsChecked = true; EnableButtons(true); }
private async void ReadRating(object sender, RoutedEventArgs e) { EnableButtons(false); _sourceSonglistFull = XmlHandler.LoadItunesXML(_xmlPath); if ((bool)CbFastMode.IsChecked) { if ((bool)RbFile.IsChecked) { _sourceSonglistFull = await RatingConnector.GetFilesRating(_sourceSonglistFull, cancelSource.Token, progress); _sourceSonglistLight = await Helper.FilterDifferenzes(_sourceSonglistFull, cancelSource.Token, progress); _sourceSonglistLight = await RatingConnector.ItunesRatingGet(_sourceSonglistLight, _myiTunes, cancelSource.Token, progress); } if ((bool)RbItunes.IsChecked) { _sourceSonglistFull = await RatingConnector.ItunesRatingGet(_sourceSonglistFull, _myiTunes, cancelSource.Token, progress); _sourceSonglistLight = await Helper.FilterDifferenzes(_sourceSonglistFull, cancelSource.Token, progress); _sourceSonglistLight = await RatingConnector.GetFilesRating(_sourceSonglistLight, cancelSource.Token, progress); } _sourceSonglistLight = await Helper.FilterDifferenzes(_sourceSonglistLight, cancelSource.Token, progress); CbFilter.IsChecked = true; } else { _sourceSonglistFull = await RatingConnector.ItunesRatingGet(_sourceSonglistFull, _myiTunes, cancelSource.Token, progress); _sourceSonglistFull = await RatingConnector.GetFilesRating(_sourceSonglistFull, cancelSource.Token, progress); _sourceSonglistLight = await Helper.FilterDifferenzes(_sourceSonglistFull, cancelSource.Token, progress); } EnableButtons(true); }