Class LoadOptions

Class LoadOptions

A név: Aspose.Note Összefoglaló: Aspose.Note.dll (25.4.0)

A dokumentum feltöltésére használt opciók.

public class LoadOptions

Inheritance

object LoadOptions

Örökletes tagok

object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

Megmutatja, hogyan kell egy titkosított dokumentumot.

// The path to the documents directory.
                                              string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

                                              LoadOptions loadOptions = new LoadOptions { DocumentPassword = "password" };
                                              Document doc = new Document(dataDir + "Sample1.one", loadOptions);

Megmutatja, hogyan kell egy titkosított notebook.

// The path to the documents directory.
                                              string dataDir = RunExamples.GetDataDir_NoteBook();
                                              var notebook = new Notebook(dataDir + "test.onetoc2", new NotebookLoadOptions() { DeferredLoading = true });

                                              notebook.LoadChildDocument(dataDir + "Aspose.one");  
                                              notebook.LoadChildDocument(dataDir + "Locked Pass1.one", new LoadOptions() { DocumentPassword = "pass" });
                                              notebook.LoadChildDocument(dataDir + "Locked Pass2.one", new LoadOptions() { DocumentPassword = "pass2" });

Megmutatja, hogyan lehet megszerezni az oldal történelmét.

// The path to the documents directory.
                                           string dataDir = RunExamples.GetDataDir_Pages();

                                           // Load OneNote document
                                           Document document = new Document(dataDir + "Aspose.one", new LoadOptions { LoadHistory = true });

                                           // Get first page
                                           Page firstPage = document.FirstChild;
                                           foreach (Page pageRevision in document.GetPageHistory(firstPage))
                                           {
                                               /*Use pageRevision like a regular page.*/
                                               Console.WriteLine("LastModifiedTime: {0}", pageRevision.LastModifiedTime);
                                               Console.WriteLine("CreationTime: {0}", pageRevision.CreationTime);
                                               Console.WriteLine("Title: {0}", pageRevision.Title);
                                               Console.WriteLine("Level: {0}", pageRevision.Level);
                                               Console.WriteLine("Author: {0}", pageRevision.Author);
                                               Console.WriteLine();
                                           }

Constructors

LoadOptions()

public LoadOptions()

Properties

DocumentPassword

A titkosított dokumentum tartalmának jelszavát kapja vagy állítja be. Az értéket figyelmen kívül hagyják abban az esetben, ha a dokumentuma nem védett jellel.

public string DocumentPassword { get; set; }

ingatlan értéke

string

Examples

Megmutatja, hogyan kell egy titkosított dokumentumot.

// The path to the documents directory.
                                              string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

                                              LoadOptions loadOptions = new LoadOptions { DocumentPassword = "password" };
                                              Document doc = new Document(dataDir + "Sample1.one", loadOptions);

Megmutatja, hogyan kell egy titkosított notebook.

// The path to the documents directory.
                                              string dataDir = RunExamples.GetDataDir_NoteBook();
                                              var notebook = new Notebook(dataDir + "test.onetoc2", new NotebookLoadOptions() { DeferredLoading = true });

                                              notebook.LoadChildDocument(dataDir + "Aspose.one");  
                                              notebook.LoadChildDocument(dataDir + "Locked Pass1.one", new LoadOptions() { DocumentPassword = "pass" });
                                              notebook.LoadChildDocument(dataDir + "Locked Pass2.one", new LoadOptions() { DocumentPassword = "pass2" });

LoadHistory

Kap vagy beállít egy értéket, amely azt jelzi, hogy egy dokumentum töltő figyelmen kívül hagyja a történetet.Ezt az opciót a memória és a CPU használatának csökkentésére használja.Az alapértelmezett értéke ‘igaz’.

public bool LoadHistory { get; set; }

ingatlan értéke

bool

Examples

Megmutatja, hogyan lehet megszerezni az oldal történelmét.

// The path to the documents directory.
                                           string dataDir = RunExamples.GetDataDir_Pages();

                                           // Load OneNote document
                                           Document document = new Document(dataDir + "Aspose.one", new LoadOptions { LoadHistory = true });

                                           // Get first page
                                           Page firstPage = document.FirstChild;
                                           foreach (Page pageRevision in document.GetPageHistory(firstPage))
                                           {
                                               /*Use pageRevision like a regular page.*/
                                               Console.WriteLine("LastModifiedTime: {0}", pageRevision.LastModifiedTime);
                                               Console.WriteLine("CreationTime: {0}", pageRevision.CreationTime);
                                               Console.WriteLine("Title: {0}", pageRevision.Title);
                                               Console.WriteLine("Level: {0}", pageRevision.Level);
                                               Console.WriteLine("Author: {0}", pageRevision.Author);
                                               Console.WriteLine();
                                           }
 Magyar