Class LoadOptions

Class LoadOptions

Το όνομα: Aspose.Note Συγκέντρωση: Aspose.Note.dll (25.4.0)

Επιλογές που χρησιμοποιούνται για τη φόρτωση ενός εγγράφου.

public class LoadOptions

Inheritance

object LoadOptions

Κληρονομημένα μέλη

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

Examples

Δείχνει πώς να κάνετε ένα κρυπτογραφημένο έγγραφο.

// 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);

Δείχνει πώς να αποκρυπτογραφήσει ένα σημειωματάριο.

// 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" });

Δείχνει πώς να πάρετε την ιστορία της σελίδας.

// 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

Παίρνει ή θέτει έναν κωδικό πρόσβασης για το κρυπτογραφημένο περιεχόμενο του εγγράφου.Η τιμή αγνοείται σε περίπτωση που το έγγραφο δεν προστατεύεται από κωδική πρόσβαση.

public string DocumentPassword { get; set; }

Αξία ιδιοκτησίας

string

Examples

Δείχνει πώς να κάνετε ένα κρυπτογραφημένο έγγραφο.

// 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);

Δείχνει πώς να αποκρυπτογραφήσει ένα σημειωματάριο.

// 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

Αποκτά ή καθορίζει μια τιμή που υποδεικνύει εάν ένα φορτιστή εγγράφων θα πρέπει να αγνοήσει την ιστορία.Χρησιμοποιήστε αυτή την επιλογή για να μειώσετε τη μνήμη και τη χρήση CPU.Η προεπιλεγμένη τιμή είναι “πραγματική”.

public bool LoadHistory { get; set; }

Αξία ιδιοκτησίας

bool

Examples

Δείχνει πώς να πάρετε την ιστορία της σελίδας.

// 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();
                                           }
 Ελληνικά