コード例 #1
0
 /// <summary>
 /// Processes a list of photos generating files supplied using the <see cref="FormatFlags"/>
 /// </summary>
 /// <param name="path">The output path for the files to be generated.</param>
 /// <param name="name">The name of the output file, multiple files will be created with different extensions.</param>
 /// <param name="pictures">The list of pictures to be processed.</param>
 /// <param name="flag">The file types that will be generated.</param>
 public void ProcessPictures(string path, string name, List <Picture> pictures, FileFormat flag)
 {
     if (flag.Has(FileFormat.MIF) && flag.Has(FileFormat.TAB))
     {
         string mifpath = this.GenerateMIFFile(path, name, pictures);
         string tabpath = this.GenerateTABFile(mifpath);
     }
     else if (flag == FileFormat.MIF)
     {
         string mifpath = this.GenerateMIFFile(path, name, pictures);
     }
     else if (flag == FileFormat.TAB)
     {
         string mifpath = this.GenerateMIFFile(path, name, pictures);
         string tabpath = this.GenerateTABFile(mifpath);
         this.ReportProgress("Deleting MIF file");
         File.Delete(mifpath);
         string midpath = Path.ChangeExtension(mifpath, "mid");
         File.Delete(midpath);
     }
 }
コード例 #2
0
 /// <summary>
 /// Processes a list of photos generating files supplied using the <see cref="FormatFlags"/>
 /// </summary>
 /// <param name="path">The output path for the files to be generated.</param>
 /// <param name="name">The name of the output file, multiple files will be created with different extensions.</param>
 /// <param name="pictures">The list of pictures to be processed.</param>
 /// <param name="flag">The file types that will be generated.</param>
 public void ProcessPictures(string path, string name, List<Picture> pictures, FileFormat flag)
 {
     if (flag.Has(FileFormat.MIF) && flag.Has(FileFormat.TAB))
     {
         string mifpath = this.GenerateMIFFile(path, name, pictures);
         string tabpath = this.GenerateTABFile(mifpath);
     }
     else if (flag == FileFormat.MIF)
     {
         string mifpath = this.GenerateMIFFile(path, name, pictures);
     }
     else if (flag == FileFormat.TAB)
     {
         string mifpath = this.GenerateMIFFile(path, name, pictures);
         string tabpath = this.GenerateTABFile(mifpath);
         this.ReportProgress("Deleting MIF file");
         File.Delete(mifpath);
         string midpath = Path.ChangeExtension(mifpath, "mid");
         File.Delete(midpath);
     }
 }