Enum FileFormat

Enum FileFormat

Названий на: Aspose.Note Асамблея: Aspose.Note.dll (25.4.0)

Формат файлу OneNote.

public enum FileFormat

Fields

OneNote2007 = 1

Створення OneNote 2010.

OneNote2010 = 2

Створення OneNote 2010.

OneNoteOnline = 3

OneNote в Інтернеті

Unknown = 0

Невідомий формат файлу.

Examples

Показує, як перевірити, чи не вдається завантажити документ, оскільки формат OneNote 2007 не підтримується.

// 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;
                                                                                                        }
 Українська