Exemple #1
0
        private async void btnFileRating_Click(object sender, RoutedEventArgs e)
        {
            EnableButtons(false);
            dgVisible.DataContext = _sourceSonglist = await RatingConnector.GetFilesRating(_sourceSonglist, cancelSource.Token, progress);

            EnableButtons(true);
        }
Exemple #2
0
        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);
        }