示例#1
0
 public Storage(string fileName)
     : base(fileName)
 {
     if(File.Exists(fileName) == false)
        {
     throw new FileNotFoundException(string.Format("The file \"{0}\" was not found.", fileName));
        }
        FileName = fileName;
        OpenStructuredStorageFile();
        if(IsInitialized == false)
        {
     if(StorageRoot != null)
     {
      CloseStorageRoot(StorageRoot);
     }
     return;
        }
        BasicInfo = new BasicFileInfo(FileName, StorageRoot);
        ThumbnailImage = new PreviewImage(FileName, StorageRoot);
        if(StorageRoot != null)
        {
     CloseStorageRoot(StorageRoot);
        }
 }
示例#2
0
 public Storage(string fileName)
     : base(fileName)
 {
     if (File.Exists(fileName) == false)
     {
         throw new FileNotFoundException(string.Format("The file \"{0}\" was not found.", fileName));
     }
     FileName = fileName;
     OpenStructuredStorageFile();
     if (IsInitialized == false)
     {
         if (StorageRoot != null)
         {
             CloseStorageRoot(StorageRoot);
         }
         return;
     }
     BasicInfo      = new BasicFileInfo(FileName, StorageRoot);
     ThumbnailImage = new PreviewImage(FileName, StorageRoot);
     if (StorageRoot != null)
     {
         CloseStorageRoot(StorageRoot);
     }
 }