Ejemplo n.º 1
0
 public void DeleteVideo()
 {
     IsolatedStorage.Delete(GetBaseFilename() + DoneSuffix);
     IsolatedStorage.Delete(GetBaseFilename() + CourseTopicNameSuffix);
     IsolatedStorage.Delete(GetBaseFilename() + LectureTitleSuffix);
     IsolatedStorage.Delete(GetBaseFilename() + IndexSuffix);
     IsolatedStorage.Delete(GetBaseFilename() + StateSuffix);
     RefreshStatus();
 }
Ejemplo n.º 2
0
 public static void DeleteAllFiles()
 {
     lock (typeof(Cache))
     {
         foreach (var filename in IsolatedStorage.GetFiles(CacheFolder))
         {
             IsolatedStorage.Delete(filename);
         }
     }
 }
Ejemplo n.º 3
0
 // this might be called more than once
 private void OnFailure(BackgroundTransferRequest request)
 {
     lock (typeof(DownloadInfo))
     {
         Monitor = null;
         IsolatedStorage.Delete(GetBaseFilename());
         IsolatedStorage.Delete(GetBaseFilename() + CourseTopicNameSuffix);
         IsolatedStorage.Delete(GetBaseFilename() + LectureTitleSuffix);
         IsolatedStorage.Delete(GetBaseFilename() + IndexSuffix);
         SafeRemoveRequest(request);
     }
 }
Ejemplo n.º 4
0
 protected override void OnNavigatedFrom(NavigationEventArgs e)
 {
     position = mediaPlayer.Position;
     if (stateFile != null)
     {
         if (mediaPlayer.NaturalDuration.HasTimeSpan && (mediaPlayer.NaturalDuration.TimeSpan - position.Value).TotalSeconds < 5)
         {
             IsolatedStorage.Delete(stateFile);
         }
         else
         {
             IsolatedStorage.WriteAllText(stateFile, position.Value.Ticks.ToString(CultureInfo.InvariantCulture));
         }
     }
 }