예제 #1
0
 void delvideo_worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     ToggleProgressBar("Done");
     ISOHelper.DeleteFile("cache\\" + plentry.Id + ".json");
     if (!back_worker.IsBusy)
     {
         back_worker.RunWorkerAsync(index);
     }
 }
예제 #2
0
        void delvideo_worker_DoWork(object sender, DoWorkEventArgs e)
        {
            ToggleProgressBar("Deleting Video...");
            string[] args = (String[])e.Argument;
            ISOHelper.DeleteFile(plentry.Id + "\\" + args[0] + ".mp3");
            Delete.Video(plentry.Id, args[1]);

            while (!Delete.Completed)
            {
                System.Threading.Thread.Sleep(3000);
            }
        }
예제 #3
0
 void addvideo_worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     ToggleProgressBar("Done");
     ISOHelper.DeleteFile("cache\\" + plentry.Id + ".json");
     if (!back_worker.IsBusy)
     {
         back_worker.RunWorkerAsync(index);
     }
     if (Add.ErrorOccured)
     {
         System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() => {
             MessageBox.Show("Error occured while adding video to playlist");
         });
     }
 }
예제 #4
0
 void delplay_worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     ToggleProgressBar("Done");
     ISOHelper.DeleteFile("cache\\" + plentry.Id + ".json");
     if (BackgroundAudioPlayer.Instance.PlayerState == PlayState.Playing || BackgroundAudioPlayer.Instance.PlayerState == PlayState.Paused)
     {
         BackgroundAudioPlayer.Instance.Stop();
     }
     if (!ISOHelper.DeleteDirectory(plentry.Id))
     {
         MessageBox.Show("Some files were locked by audio player, or do not exist");
     }
     ISOHelper.DeleteDirectory("cache");
     System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() =>
     {
         NavigationService.GoBack();
     });
 }