Beispiel #1
0
 private void FileTracker_Deleted(object sender, FileSystemChangeSet e)
 {
     for (int i = 0; i < e.StorageItems.Count; i++)
     {
         for (int j = 0; j < USBFilePresenter.ThisPage.FileCollection.Count; j++)
         {
             RemovableDeviceFile DeviceFile = USBFilePresenter.ThisPage.FileCollection[j];
             if (DeviceFile.RelativeId == ((StorageFile)e.StorageItems[i]).FolderRelativeId)
             {
                 USBFilePresenter.ThisPage.FileCollection.Remove(DeviceFile);
                 j--;
             }
         }
     }
 }
 protected override void OnNavigatedFrom(NavigationEventArgs e)
 {
     FileCollection.Clear();
     FileCollection = null;
     OriginFile     = null;
 }
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     OriginFile              = e.Parameter as RemovableDeviceFile;
     FileCollection          = new ObservableCollection <ZipFileDisplay>();
     GridControl.ItemsSource = FileCollection;
 }