Class LoadOptions
Class LoadOptions
اسم الفضاء : Aspose.Note تجميع: Aspose.Note.dll (25.4.0)
الخيارات المستخدمة لتحميل وثيقة.
public class LoadOptions
Inheritance
الأعضاء الموروثين
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; }
قيمة الممتلكات
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; }
قيمة الممتلكات
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();
}