Enum FileFormat

Enum FileFormat

Nazwa przestrzeń: Aspose.Note Zgromadzenie: Aspose.Note.dll (25.4.0)

Jest to format pliku OneNote.

public enum FileFormat
    {
        Pdf,
        WordDocument,
        ExcelWorkbook,
        PowerPointPresentation,
        Image,
        Other
    }
It has been reformatted according to standard C# conventions. Here's the result:
public enum FileFormat
{
    Pdf,
    WordDocument,
    ExcelWorkbook,
    PowerPointPresentation,
    Image,
    Other
}

Fields

OneNote2007 = 1

OneNote w 2010 roku.

OneNote2010 = 2

OneNote w 2010 roku.

OneNoteOnline = 3

OneNote w internecie.

Unknown = 0

Nieznany format pliku.

Examples

Pokaż, jak sprawdzić, czy ładowanie dokumentu jest nieudane, ponieważ format OneNote 2007 nie jest obsługiwany.

string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
   string fileName = Path.Combine(dataDir, "OneNote2007.one");
   try
   {
      new Document(fileName);
   }
   catch (UnsupportedFileFormatException e)
   {
      if (e.FileFormat == FileFormat.OneNote2007)
      {
         Console.WriteLine("It looks like the provided file is in OneNote 2007 format that is not supported.");
      }
      else
      {
         throw;
      }
   }
 Polski