Enum FileFormat

Enum FileFormat

Nama dari : Aspose.Note Perhitungan: Aspose.Note.dll (25.4.0)

Menampilkan format file OneNote.

public enum FileFormat

Fields

OneNote2007 = 1

Perbedaan OneNote 2010.

OneNote2010 = 2

Perbedaan OneNote 2010.

OneNoteOnline = 3

Untuk OneNote Online.

Unknown = 0

Format file yang tidak diketahui.

Examples

Menunjukkan cara untuk memeriksa apakah pengisian dokumen gagal karena format OneNote 2007 tidak didukung.

// The path to the documents directory.
                                                                                                        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;
                                                                                                        }
 Indonesia