示例#1
0
        private void LoadTrackImages(object sender, DoWorkEventArgs args)
        {
            var worker       = sender as BackgroundWorker;
            var tracksToLoad = new List <IOldTrack>();

            lock (boundTracks)
            {
                tracksToLoad.AddRange(boundTracks);
            }

            foreach (var track in tracksToLoad)
            {
                if (worker.CancellationPending)
                {
                    args.Cancel = true;
                    break;
                }
                var uri = new Uri(track.Path);
                if (uri.IsFile)
                {
                    tagController.LoadPicture(track);
                }
            }
        }
示例#2
0
        private void LoadAutocompleteImages(object sender, DoWorkEventArgs args)
        {
            var worker       = sender as BackgroundWorker;
            var tracksToLoad = new List <IOldTrack>();

            lock (autocompleteTracks)
            {
                tracksToLoad.AddRange(autocompleteTracks);
            }

            foreach (var track in tracksToLoad)
            {
                if (worker.CancellationPending)
                {
                    args.Cancel = true;
                    break;
                }
                tagController.LoadPicture(track);
            }
        }