Ejemplo n.º 1
0
 private void LogoutButton_Click(object sender, EventArgs e)
 {
     System.IO.IsolatedStorage.IsolatedStorageSettings.ApplicationSettings.Remove("cache_filename");
     System.IO.IsolatedStorage.IsolatedStorageSettings.ApplicationSettings.Remove("refresh_token");
     System.IO.IsolatedStorage.IsolatedStorageSettings.ApplicationSettings.Save();
     ISOHelper.DeleteDirectory("cache");
     NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
 }
Ejemplo n.º 2
0
 private void RefreshButton_Click(object sender, EventArgs e)
 {
     ISOHelper.DeleteDirectory("cache");
     if (!loader_worker.IsBusy)
     {
         loader_worker.RunWorkerAsync();
     }
 }
Ejemplo n.º 3
0
 private void clearsync_click(object sender, EventArgs e)
 {
     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");
     }
     if (!back_worker.IsBusy)
     {
         back_worker.RunWorkerAsync(index);
     }
 }
Ejemplo n.º 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();
     });
 }
Ejemplo n.º 5
0
 void addplay_worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     //progressbar.IsEnabled = false;
     //progressbar.IsIndeterminate = false;
     progindicator.IsIndeterminate = false;
     progindicator.IsVisible       = false;
     progindicator.Text            = "Done";
     if (Add.ErrorOccured)
     {
         System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() =>
         {
             System.Windows.MessageBox.Show("Could not add playlist");
         });
     }
     else
     {
         System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() =>
         {
             //System.Windows.MessageBox.Show("playlist added, please refresh playlist page to see new playlist.");
             ISOHelper.DeleteDirectory("cache");
             NavigationService.GoBack();
         });
     }
 }