Exemple #1
0
        public void StartCheck()
        {
            while (SongQueue.Count > 0)
            {
                if (!SongQueue.TryDequeue(out currentSong))
                {
                    currentSong = null;
                    continue;
                }

                Process();
            }
        }
Exemple #2
0
        public void StartDownload()
        {
            while (SongQueue.Count > 0)
            {
                if (!SongQueue.TryDequeue(out currentSong))
                {
                    currentSong = null;
                    continue;
                }

                Process();
            }

            //EventBus.Publish(new EventDownloadComplete());
            Application.Current.Dispatcher.Invoke(() => EventBus.Publish(new EventDownloadComplete()));
        }
Exemple #3
0
        public void StartMerge()
        {
            using (var outputStream = File.Create(Path.Combine(Directory.GetCurrentDirectory(), "final.mp3")))
            {
                while (SongQueue.Count > 0)
                {
                    if (!SongQueue.TryDequeue(out currentSong))
                    {
                        currentSong = null;
                        continue;
                    }

                    Process(outputStream);
                }
            }
        }