Class Title

Class Title

نام ها : Aspose.Note جمع آوری: WL31_.dll (25.4.0)

یک عنوان را نشان می دهد.

public sealed class Title : CompositeNodeBase, ICompositeNode<richtext>, ICompositeNode, IEnumerable<richtext>, IEnumerable, IPageChildNode, INode

Inheritance

object Node CompositeNodeBase Title

Implements

ICompositeNode , ICompositeNode , IEnumerable , IEnumerable , IPageChildNode , INode

اعضای ارثی

CompositeNodeBase.GetChildNodes(NodeType) , CompositeNodeBase.GetChildNodes() , Node.Accept(DocumentVisitor) , Node.Document , Node.IsComposite , Node.NodeType , Node.ParentNode , Node.PreviousSibling , Node.NextSibling , object.GetType() , 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_Pages();

                                            // Load OneNote document and get first child           
                                            Document document = new Document(dataDir + "Aspose.one");
                                            Page page = document.FirstChild;

                                            var pageHistory = document.GetPageHistory(page);

                                            pageHistory.RemoveRange(0, 1);

                                            pageHistory[0] = new Page(document);
                                            if (pageHistory.Count &gt; 1)
                                            {
                                                pageHistory[1].Title.TitleText.Text = "New Title";

                                                pageHistory.Add(new Page(document));

                                                pageHistory.Insert(1, new Page(document));

                                                document.Save(dataDir + "ModifyPageHistory_out.one");
                                            }

نشان می دهد که چگونه یک عنوان برای یک صفحه تنظیم کنید.

string dataDir = RunExamples.GetDataDir_Text();
                                               string outputPath = dataDir + "CreateTitleMsStyle_out.one";

                                               var doc = new Document();
                                               var page = new Page(doc);

                                               page.Title = new Title(doc)
                                               {
                                                   TitleText = new RichText(doc)
                                                   {
                                                       Text = "Title text.",
                                                       ParagraphStyle = ParagraphStyle.Default
                                                   },
                                                   TitleDate = new RichText(doc)
                                                   {
                                                       Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture),
                                                       ParagraphStyle = ParagraphStyle.Default
                                                   },
                                                   TitleTime = new RichText(doc)
                                                   {
                                                       Text = "12:34",
                                                       ParagraphStyle = ParagraphStyle.Default
                                                   }
                                               };

                                               doc.AppendChildLast(page);

                                               doc.Save(outputPath);

نشان می دهد که چگونه یک سند را ایجاد کنید و آن را در فرمت html با استفاده از گزینه های پیش فرض ذخیره کنید.

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

                                                                                           // Initialize OneNote document
                                                                                           Document doc = new Document();
                                                                                           Page page = doc.AppendChildLast(new Page());

                                                                                           // Default style for all text in the document.
                                                                                           ParagraphStyle textStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };
                                                                                           page.Title = new Title()
                                                                                                            {
                                                                                                                TitleText = new RichText() { Text = "Title text.", ParagraphStyle = textStyle },
                                                                                                                TitleDate = new RichText() { Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture), ParagraphStyle = textStyle },
                                                                                                                TitleTime = new RichText() { Text = "12:34", ParagraphStyle = textStyle }
                                                                                                            };

                                                                                           // Save into HTML format
                                                                                           dataDir = dataDir + "CreateOneNoteDocAndSaveToHTML_out.html";
                                                                                           doc.Save(dataDir);

نشان می دهد که چگونه برای ایجاد یک سند و ذخیره در فرمت html طیف مشخصی از صفحات.

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

                                                                                           // Initialize OneNote document
                                                                                           Document doc = new Document();

                                                                                           Page page = doc.AppendChildLast(new Page());

                                                                                           // Default style for all text in the document.
                                                                                           ParagraphStyle textStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };
                                                                                           page.Title = new Title()
                                                                                                        {
                                                                                                            TitleText = new RichText() { Text = "Title text.", ParagraphStyle = textStyle },
                                                                                                            TitleDate = new RichText() { Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture), ParagraphStyle = textStyle },
                                                                                                            TitleTime = new RichText() { Text = "12:34", ParagraphStyle = textStyle }
                                                                                                        };

                                                                                           // Save into HTML format
                                                                                           dataDir = dataDir + "CreateAndSavePageRange_out.html";
                                                                                           doc.Save(dataDir, new HtmlSaveOptions
                                                                                                             {
                                                                                                                 PageCount = 1,
                                                                                                                 PageIndex = 0
                                                                                                             });

نشان می دهد که چگونه یک سند با عنوان صفحه ایجاد کنید.

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

                                                           // Create an object of the Document class
                                                           Document doc = new Aspose.Note.Document();

                                                           // Initialize Page class object
                                                           Aspose.Note.Page page = new Aspose.Note.Page(doc);

                                                           // Default style for all text in the document.
                                                           ParagraphStyle textStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };

                                                           // Set page title properties
                                                           page.Title = new Title(doc)
                                                                        {
                                                                            TitleText = new RichText(doc) { Text = "Title text.", ParagraphStyle = textStyle },
                                                                            TitleDate = new RichText(doc) { Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture), ParagraphStyle = textStyle },
                                                                            TitleTime = new RichText(doc) { Text = "12:34", ParagraphStyle = textStyle }
                                                                        };

                                                           // Append Page node in the document
                                                           doc.AppendChildLast(page);

                                                           // Save OneNote document
                                                           dataDir = dataDir + "CreateDocWithPageTitle_out.one";
                                                           doc.Save(dataDir);

نشان می دهد چگونه یک سند را در فرمت های مختلف ذخیره کنید.

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

                                                             // Initialize the new Document
                                                             Document doc = new Document() { AutomaticLayoutChangesDetectionEnabled = false };

                                                             // Initialize the new Page
                                                             Aspose.Note.Page page = new Aspose.Note.Page(doc);

                                                             // Default style for all text in the document.
                                                             ParagraphStyle textStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };
                                                             page.Title = new Title(doc)
                                                                          {
                                                                              TitleText = new RichText(doc) { Text = "Title text.", ParagraphStyle = textStyle },
                                                                              TitleDate = new RichText(doc) { Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture), ParagraphStyle = textStyle },
                                                                              TitleTime = new RichText(doc) { Text = "12:34", ParagraphStyle = textStyle }
                                                                          };

                                                             // Append page node
                                                             doc.AppendChildLast(page);

                                                             // Save OneNote document in different formats, set text font size and detect layout changes manually.
                                                             doc.Save(dataDir + "ConsequentExportOperations_out.html");            
                                                             doc.Save(dataDir + "ConsequentExportOperations_out.pdf");            
                                                             doc.Save(dataDir + "ConsequentExportOperations_out.jpg");            
                                                             textStyle.FontSize = 11;           
                                                             doc.DetectLayoutChanges();            
                                                             doc.Save(dataDir + "ConsequentExportOperations_out.bmp");

Constructors

Title()

public Title()

Properties

HorizontalOffset

به صورت افقی و یا به صورت افقی پرداخت می شود.

public float HorizontalOffset { get; set; }

ارزش املاک

float

IsComposite

یک مقدار را نشان می دهد که آیا این گره ترکیبی است یا خیر، اگر درست باشد، گروه ها می توانند گربه های کودک داشته باشند.

public override bool IsComposite { get; }

ارزش املاک

bool

LastModifiedTime

دریافت یا تنظیم آخرین زمان اصلاح شده.

public DateTime LastModifiedTime { get; set; }

ارزش املاک

DateTime

TitleDate

به دست آوردن یا قرار دادن یک ردیف نمایندگی از تاریخ در عنوان.

public RichText TitleDate { get; set; }

ارزش املاک

RichText

Examples

نشان می دهد که چگونه یک عنوان برای یک صفحه تنظیم کنید.

string dataDir = RunExamples.GetDataDir_Text();
                                               string outputPath = dataDir + "CreateTitleMsStyle_out.one";

                                               var doc = new Document();
                                               var page = new Page(doc);

                                               page.Title = new Title(doc)
                                               {
                                                   TitleText = new RichText(doc)
                                                   {
                                                       Text = "Title text.",
                                                       ParagraphStyle = ParagraphStyle.Default
                                                   },
                                                   TitleDate = new RichText(doc)
                                                   {
                                                       Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture),
                                                       ParagraphStyle = ParagraphStyle.Default
                                                   },
                                                   TitleTime = new RichText(doc)
                                                   {
                                                       Text = "12:34",
                                                       ParagraphStyle = ParagraphStyle.Default
                                                   }
                                               };

                                               doc.AppendChildLast(page);

                                               doc.Save(outputPath);

نشان می دهد که چگونه یک سند را ایجاد کنید و آن را در فرمت html با استفاده از گزینه های پیش فرض ذخیره کنید.

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

                                                                                           // Initialize OneNote document
                                                                                           Document doc = new Document();
                                                                                           Page page = doc.AppendChildLast(new Page());

                                                                                           // Default style for all text in the document.
                                                                                           ParagraphStyle textStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };
                                                                                           page.Title = new Title()
                                                                                                            {
                                                                                                                TitleText = new RichText() { Text = "Title text.", ParagraphStyle = textStyle },
                                                                                                                TitleDate = new RichText() { Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture), ParagraphStyle = textStyle },
                                                                                                                TitleTime = new RichText() { Text = "12:34", ParagraphStyle = textStyle }
                                                                                                            };

                                                                                           // Save into HTML format
                                                                                           dataDir = dataDir + "CreateOneNoteDocAndSaveToHTML_out.html";
                                                                                           doc.Save(dataDir);

نشان می دهد که چگونه برای ایجاد یک سند و ذخیره در فرمت html طیف مشخصی از صفحات.

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

                                                                                           // Initialize OneNote document
                                                                                           Document doc = new Document();

                                                                                           Page page = doc.AppendChildLast(new Page());

                                                                                           // Default style for all text in the document.
                                                                                           ParagraphStyle textStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };
                                                                                           page.Title = new Title()
                                                                                                        {
                                                                                                            TitleText = new RichText() { Text = "Title text.", ParagraphStyle = textStyle },
                                                                                                            TitleDate = new RichText() { Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture), ParagraphStyle = textStyle },
                                                                                                            TitleTime = new RichText() { Text = "12:34", ParagraphStyle = textStyle }
                                                                                                        };

                                                                                           // Save into HTML format
                                                                                           dataDir = dataDir + "CreateAndSavePageRange_out.html";
                                                                                           doc.Save(dataDir, new HtmlSaveOptions
                                                                                                             {
                                                                                                                 PageCount = 1,
                                                                                                                 PageIndex = 0
                                                                                                             });

نشان می دهد که چگونه یک سند با عنوان صفحه ایجاد کنید.

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

                                                           // Create an object of the Document class
                                                           Document doc = new Aspose.Note.Document();

                                                           // Initialize Page class object
                                                           Aspose.Note.Page page = new Aspose.Note.Page(doc);

                                                           // Default style for all text in the document.
                                                           ParagraphStyle textStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };

                                                           // Set page title properties
                                                           page.Title = new Title(doc)
                                                                        {
                                                                            TitleText = new RichText(doc) { Text = "Title text.", ParagraphStyle = textStyle },
                                                                            TitleDate = new RichText(doc) { Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture), ParagraphStyle = textStyle },
                                                                            TitleTime = new RichText(doc) { Text = "12:34", ParagraphStyle = textStyle }
                                                                        };

                                                           // Append Page node in the document
                                                           doc.AppendChildLast(page);

                                                           // Save OneNote document
                                                           dataDir = dataDir + "CreateDocWithPageTitle_out.one";
                                                           doc.Save(dataDir);

نشان می دهد چگونه یک سند را در فرمت های مختلف ذخیره کنید.

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

                                                             // Initialize the new Document
                                                             Document doc = new Document() { AutomaticLayoutChangesDetectionEnabled = false };

                                                             // Initialize the new Page
                                                             Aspose.Note.Page page = new Aspose.Note.Page(doc);

                                                             // Default style for all text in the document.
                                                             ParagraphStyle textStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };
                                                             page.Title = new Title(doc)
                                                                          {
                                                                              TitleText = new RichText(doc) { Text = "Title text.", ParagraphStyle = textStyle },
                                                                              TitleDate = new RichText(doc) { Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture), ParagraphStyle = textStyle },
                                                                              TitleTime = new RichText(doc) { Text = "12:34", ParagraphStyle = textStyle }
                                                                          };

                                                             // Append page node
                                                             doc.AppendChildLast(page);

                                                             // Save OneNote document in different formats, set text font size and detect layout changes manually.
                                                             doc.Save(dataDir + "ConsequentExportOperations_out.html");            
                                                             doc.Save(dataDir + "ConsequentExportOperations_out.pdf");            
                                                             doc.Save(dataDir + "ConsequentExportOperations_out.jpg");            
                                                             textStyle.FontSize = 11;           
                                                             doc.DetectLayoutChanges();            
                                                             doc.Save(dataDir + "ConsequentExportOperations_out.bmp");

TitleText

دریافت یا قرار دادن متن عنوان.

public RichText TitleText { get; set; }

ارزش املاک

RichText

Examples

نشان دهید چگونه تاریخچه صفحه را ویرایش کنید.

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

                                            // Load OneNote document and get first child           
                                            Document document = new Document(dataDir + "Aspose.one");
                                            Page page = document.FirstChild;

                                            var pageHistory = document.GetPageHistory(page);

                                            pageHistory.RemoveRange(0, 1);

                                            pageHistory[0] = new Page(document);
                                            if (pageHistory.Count &gt; 1)
                                            {
                                                pageHistory[1].Title.TitleText.Text = "New Title";

                                                pageHistory.Add(new Page(document));

                                                pageHistory.Insert(1, new Page(document));

                                                document.Save(dataDir + "ModifyPageHistory_out.one");
                                            }

نشان می دهد که چگونه یک عنوان برای یک صفحه تنظیم کنید.

string dataDir = RunExamples.GetDataDir_Text();
                                               string outputPath = dataDir + "CreateTitleMsStyle_out.one";

                                               var doc = new Document();
                                               var page = new Page(doc);

                                               page.Title = new Title(doc)
                                               {
                                                   TitleText = new RichText(doc)
                                                   {
                                                       Text = "Title text.",
                                                       ParagraphStyle = ParagraphStyle.Default
                                                   },
                                                   TitleDate = new RichText(doc)
                                                   {
                                                       Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture),
                                                       ParagraphStyle = ParagraphStyle.Default
                                                   },
                                                   TitleTime = new RichText(doc)
                                                   {
                                                       Text = "12:34",
                                                       ParagraphStyle = ParagraphStyle.Default
                                                   }
                                               };

                                               doc.AppendChildLast(page);

                                               doc.Save(outputPath);

نشان می دهد که چگونه یک سند را ایجاد کنید و آن را در فرمت html با استفاده از گزینه های پیش فرض ذخیره کنید.

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

                                                                                           // Initialize OneNote document
                                                                                           Document doc = new Document();
                                                                                           Page page = doc.AppendChildLast(new Page());

                                                                                           // Default style for all text in the document.
                                                                                           ParagraphStyle textStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };
                                                                                           page.Title = new Title()
                                                                                                            {
                                                                                                                TitleText = new RichText() { Text = "Title text.", ParagraphStyle = textStyle },
                                                                                                                TitleDate = new RichText() { Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture), ParagraphStyle = textStyle },
                                                                                                                TitleTime = new RichText() { Text = "12:34", ParagraphStyle = textStyle }
                                                                                                            };

                                                                                           // Save into HTML format
                                                                                           dataDir = dataDir + "CreateOneNoteDocAndSaveToHTML_out.html";
                                                                                           doc.Save(dataDir);

نشان می دهد که چگونه برای ایجاد یک سند و ذخیره در فرمت html طیف مشخصی از صفحات.

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

                                                                                           // Initialize OneNote document
                                                                                           Document doc = new Document();

                                                                                           Page page = doc.AppendChildLast(new Page());

                                                                                           // Default style for all text in the document.
                                                                                           ParagraphStyle textStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };
                                                                                           page.Title = new Title()
                                                                                                        {
                                                                                                            TitleText = new RichText() { Text = "Title text.", ParagraphStyle = textStyle },
                                                                                                            TitleDate = new RichText() { Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture), ParagraphStyle = textStyle },
                                                                                                            TitleTime = new RichText() { Text = "12:34", ParagraphStyle = textStyle }
                                                                                                        };

                                                                                           // Save into HTML format
                                                                                           dataDir = dataDir + "CreateAndSavePageRange_out.html";
                                                                                           doc.Save(dataDir, new HtmlSaveOptions
                                                                                                             {
                                                                                                                 PageCount = 1,
                                                                                                                 PageIndex = 0
                                                                                                             });

نشان می دهد که چگونه یک سند با عنوان صفحه ایجاد کنید.

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

                                                           // Create an object of the Document class
                                                           Document doc = new Aspose.Note.Document();

                                                           // Initialize Page class object
                                                           Aspose.Note.Page page = new Aspose.Note.Page(doc);

                                                           // Default style for all text in the document.
                                                           ParagraphStyle textStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };

                                                           // Set page title properties
                                                           page.Title = new Title(doc)
                                                                        {
                                                                            TitleText = new RichText(doc) { Text = "Title text.", ParagraphStyle = textStyle },
                                                                            TitleDate = new RichText(doc) { Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture), ParagraphStyle = textStyle },
                                                                            TitleTime = new RichText(doc) { Text = "12:34", ParagraphStyle = textStyle }
                                                                        };

                                                           // Append Page node in the document
                                                           doc.AppendChildLast(page);

                                                           // Save OneNote document
                                                           dataDir = dataDir + "CreateDocWithPageTitle_out.one";
                                                           doc.Save(dataDir);

نشان می دهد چگونه یک سند را در فرمت های مختلف ذخیره کنید.

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

                                                             // Initialize the new Document
                                                             Document doc = new Document() { AutomaticLayoutChangesDetectionEnabled = false };

                                                             // Initialize the new Page
                                                             Aspose.Note.Page page = new Aspose.Note.Page(doc);

                                                             // Default style for all text in the document.
                                                             ParagraphStyle textStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };
                                                             page.Title = new Title(doc)
                                                                          {
                                                                              TitleText = new RichText(doc) { Text = "Title text.", ParagraphStyle = textStyle },
                                                                              TitleDate = new RichText(doc) { Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture), ParagraphStyle = textStyle },
                                                                              TitleTime = new RichText(doc) { Text = "12:34", ParagraphStyle = textStyle }
                                                                          };

                                                             // Append page node
                                                             doc.AppendChildLast(page);

                                                             // Save OneNote document in different formats, set text font size and detect layout changes manually.
                                                             doc.Save(dataDir + "ConsequentExportOperations_out.html");            
                                                             doc.Save(dataDir + "ConsequentExportOperations_out.pdf");            
                                                             doc.Save(dataDir + "ConsequentExportOperations_out.jpg");            
                                                             textStyle.FontSize = 11;           
                                                             doc.DetectLayoutChanges();            
                                                             doc.Save(dataDir + "ConsequentExportOperations_out.bmp");

TitleTime

به دست آوردن یا قرار دادن یک ردیف نمایندگی از زمان در عنوان.

public RichText TitleTime { get; set; }

ارزش املاک

RichText

Examples

نشان می دهد که چگونه یک عنوان برای یک صفحه تنظیم کنید.

string dataDir = RunExamples.GetDataDir_Text();
                                               string outputPath = dataDir + "CreateTitleMsStyle_out.one";

                                               var doc = new Document();
                                               var page = new Page(doc);

                                               page.Title = new Title(doc)
                                               {
                                                   TitleText = new RichText(doc)
                                                   {
                                                       Text = "Title text.",
                                                       ParagraphStyle = ParagraphStyle.Default
                                                   },
                                                   TitleDate = new RichText(doc)
                                                   {
                                                       Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture),
                                                       ParagraphStyle = ParagraphStyle.Default
                                                   },
                                                   TitleTime = new RichText(doc)
                                                   {
                                                       Text = "12:34",
                                                       ParagraphStyle = ParagraphStyle.Default
                                                   }
                                               };

                                               doc.AppendChildLast(page);

                                               doc.Save(outputPath);

نشان می دهد که چگونه یک سند را ایجاد کنید و آن را در فرمت html با استفاده از گزینه های پیش فرض ذخیره کنید.

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

                                                                                           // Initialize OneNote document
                                                                                           Document doc = new Document();
                                                                                           Page page = doc.AppendChildLast(new Page());

                                                                                           // Default style for all text in the document.
                                                                                           ParagraphStyle textStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };
                                                                                           page.Title = new Title()
                                                                                                            {
                                                                                                                TitleText = new RichText() { Text = "Title text.", ParagraphStyle = textStyle },
                                                                                                                TitleDate = new RichText() { Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture), ParagraphStyle = textStyle },
                                                                                                                TitleTime = new RichText() { Text = "12:34", ParagraphStyle = textStyle }
                                                                                                            };

                                                                                           // Save into HTML format
                                                                                           dataDir = dataDir + "CreateOneNoteDocAndSaveToHTML_out.html";
                                                                                           doc.Save(dataDir);

نشان می دهد که چگونه برای ایجاد یک سند و ذخیره در فرمت html طیف مشخصی از صفحات.

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

                                                                                           // Initialize OneNote document
                                                                                           Document doc = new Document();

                                                                                           Page page = doc.AppendChildLast(new Page());

                                                                                           // Default style for all text in the document.
                                                                                           ParagraphStyle textStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };
                                                                                           page.Title = new Title()
                                                                                                        {
                                                                                                            TitleText = new RichText() { Text = "Title text.", ParagraphStyle = textStyle },
                                                                                                            TitleDate = new RichText() { Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture), ParagraphStyle = textStyle },
                                                                                                            TitleTime = new RichText() { Text = "12:34", ParagraphStyle = textStyle }
                                                                                                        };

                                                                                           // Save into HTML format
                                                                                           dataDir = dataDir + "CreateAndSavePageRange_out.html";
                                                                                           doc.Save(dataDir, new HtmlSaveOptions
                                                                                                             {
                                                                                                                 PageCount = 1,
                                                                                                                 PageIndex = 0
                                                                                                             });

نشان می دهد که چگونه یک سند با عنوان صفحه ایجاد کنید.

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

                                                           // Create an object of the Document class
                                                           Document doc = new Aspose.Note.Document();

                                                           // Initialize Page class object
                                                           Aspose.Note.Page page = new Aspose.Note.Page(doc);

                                                           // Default style for all text in the document.
                                                           ParagraphStyle textStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };

                                                           // Set page title properties
                                                           page.Title = new Title(doc)
                                                                        {
                                                                            TitleText = new RichText(doc) { Text = "Title text.", ParagraphStyle = textStyle },
                                                                            TitleDate = new RichText(doc) { Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture), ParagraphStyle = textStyle },
                                                                            TitleTime = new RichText(doc) { Text = "12:34", ParagraphStyle = textStyle }
                                                                        };

                                                           // Append Page node in the document
                                                           doc.AppendChildLast(page);

                                                           // Save OneNote document
                                                           dataDir = dataDir + "CreateDocWithPageTitle_out.one";
                                                           doc.Save(dataDir);

نشان می دهد چگونه یک سند را در فرمت های مختلف ذخیره کنید.

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

                                                             // Initialize the new Document
                                                             Document doc = new Document() { AutomaticLayoutChangesDetectionEnabled = false };

                                                             // Initialize the new Page
                                                             Aspose.Note.Page page = new Aspose.Note.Page(doc);

                                                             // Default style for all text in the document.
                                                             ParagraphStyle textStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };
                                                             page.Title = new Title(doc)
                                                                          {
                                                                              TitleText = new RichText(doc) { Text = "Title text.", ParagraphStyle = textStyle },
                                                                              TitleDate = new RichText(doc) { Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture), ParagraphStyle = textStyle },
                                                                              TitleTime = new RichText(doc) { Text = "12:34", ParagraphStyle = textStyle }
                                                                          };

                                                             // Append page node
                                                             doc.AppendChildLast(page);

                                                             // Save OneNote document in different formats, set text font size and detect layout changes manually.
                                                             doc.Save(dataDir + "ConsequentExportOperations_out.html");            
                                                             doc.Save(dataDir + "ConsequentExportOperations_out.pdf");            
                                                             doc.Save(dataDir + "ConsequentExportOperations_out.jpg");            
                                                             textStyle.FontSize = 11;           
                                                             doc.DetectLayoutChanges();            
                                                             doc.Save(dataDir + "ConsequentExportOperations_out.bmp");

VerticalOffset

دریافت و یا قرار دادن تخفیف عمودی.

public float VerticalOffset { get; set; }

ارزش املاک

float

Methods

Accept(DocumentVisitor)

بازدیدکننده ی گره را پذیرفته است.

public override void Accept(DocumentVisitor visitor)

Parameters

visitor DocumentVisitor

موضوع یک کلاس از Aspose.Note.DocumentVisitor گرفته شده است.

GetChildNodes(NodeType)

تمام گره های کودک را با توجه به نوع نود دریافت کنید.

[Obsolete("Use GetChildNodes<t>() method instead.")]
public override List<inode> GetChildNodes(NodeType type)

Parameters

type NodeType

نوع نود

Returns

List &lt؛ INode >

یک لیست از گره های کودک

بایگانی برچسب ها: t1>()

تمام گره های کودک را با توجه به نوع نود دریافت کنید.

public override List<t1> GetChildNodes<t1>() where T1 : class, INode

Returns

List

یک لیست از گره های کودک

نوع پارامترها

T1

نوع عناصر در لیست بازگردانده

GetEnumerator()

بازگرداندن یک فهرست که از طریق گره های کودک از Aspose.Note.Title iterates.

public IEnumerator<richtext> GetEnumerator()

Returns

IEnumerator &lt؛ RichText >

سیستم جمع آوری.IEnumerator

 فارسی