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

                Process();
            }
        }
示例#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()));
        }
示例#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);
                }
            }
        }