Class RevisionSummary

Class RevisionSummary

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

ارائه یک خلاصه برای بازنگری نود.

public class RevisionSummary

Inheritance

object RevisionSummary

اعضای ارثی

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_Pages();

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

                                                     // Reading Content Revision Summary for this page
                                                     var pageRevisionInfo = page.PageContentRevisionSummary;

                                                     Console.WriteLine(string.Format(
                                                         "Author:\t{0}\nModified:\t{1}",
                                                         pageRevisionInfo.AuthorMostRecent,
                                                         pageRevisionInfo.LastModifiedTime.ToString("dd.MM.yyyy HH:mm:ss")));

                                                     // Update Page Revision Summary for this page
                                                     pageRevisionInfo.AuthorMostRecent = "New Author";
                                                     pageRevisionInfo.LastModifiedTime = DateTime.Now;

                                                     document.Save(dataDir + "WorkingWithPageRevisions_out.one");

نشان می دهد که چگونه می توان بررسی کرد که آیا صفحه یک صفحه درگیری است (یعنی تغییراتی دارد که OneNote نمی تواند به طور خودکار ادغام شود).

string dataDir = RunExamples.GetDataDir_Pages();

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

                                                                                                                          var history = doc.GetPageHistory(doc.FirstChild);
                                                                                                                          for (int i = 0; i < history.Count; i++)
                                                                                                                          {
                                                                                                                              var historyPage = history[i];
                                                                                                                              Console.Write("    {0}. Author: {1}, {2:dd.MM.yyyy hh.mm.ss}",
                                                                                                                                              i,
                                                                                                                                              historyPage.PageContentRevisionSummary.AuthorMostRecent,
                                                                                                                                              historyPage.PageContentRevisionSummary.LastModifiedTime);
                                                                                                                              Console.WriteLine(historyPage.IsConflictPage ? ", IsConflict: true" : string.Empty);

                                                                                                                              // By default conflict pages are just skipped on saving.
                                                                                                                              // If mark it as non-conflict then it will be saved as usual one in the history.
                                                                                                                              if (historyPage.IsConflictPage)
                                                                                                                                  historyPage.IsConflictPage = false;
                                                                                                                          }

                                                                                                                          doc.Save(dataDir + "ConflictPageManipulation_out.one", SaveFormat.One);

Constructors

RevisionSummary()

public RevisionSummary()

Properties

AuthorMostRecent

جدیدترین نویسنده را به دست آورده یا قرار داده است.

public string AuthorMostRecent { get; set; }

ارزش املاک

string

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;

                                                     // Reading Content Revision Summary for this page
                                                     var pageRevisionInfo = page.PageContentRevisionSummary;

                                                     Console.WriteLine(string.Format(
                                                         "Author:\t{0}\nModified:\t{1}",
                                                         pageRevisionInfo.AuthorMostRecent,
                                                         pageRevisionInfo.LastModifiedTime.ToString("dd.MM.yyyy HH:mm:ss")));

                                                     // Update Page Revision Summary for this page
                                                     pageRevisionInfo.AuthorMostRecent = "New Author";
                                                     pageRevisionInfo.LastModifiedTime = DateTime.Now;

                                                     document.Save(dataDir + "WorkingWithPageRevisions_out.one");

نشان می دهد که چگونه می توان بررسی کرد که آیا صفحه یک صفحه درگیری است (یعنی تغییراتی دارد که OneNote نمی تواند به طور خودکار ادغام شود).

string dataDir = RunExamples.GetDataDir_Pages();

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

                                                                                                                          var history = doc.GetPageHistory(doc.FirstChild);
                                                                                                                          for (int i = 0; i < history.Count; i++)
                                                                                                                          {
                                                                                                                              var historyPage = history[i];
                                                                                                                              Console.Write("    {0}. Author: {1}, {2:dd.MM.yyyy hh.mm.ss}",
                                                                                                                                              i,
                                                                                                                                              historyPage.PageContentRevisionSummary.AuthorMostRecent,
                                                                                                                                              historyPage.PageContentRevisionSummary.LastModifiedTime);
                                                                                                                              Console.WriteLine(historyPage.IsConflictPage ? ", IsConflict: true" : string.Empty);

                                                                                                                              // By default conflict pages are just skipped on saving.
                                                                                                                              // If mark it as non-conflict then it will be saved as usual one in the history.
                                                                                                                              if (historyPage.IsConflictPage)
                                                                                                                                  historyPage.IsConflictPage = false;
                                                                                                                          }

                                                                                                                          doc.Save(dataDir + "ConflictPageManipulation_out.one", SaveFormat.One);

LastModifiedTime

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

public DateTime LastModifiedTime { get; set; }

ارزش املاک

DateTime

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;

                                                     // Reading Content Revision Summary for this page
                                                     var pageRevisionInfo = page.PageContentRevisionSummary;

                                                     Console.WriteLine(string.Format(
                                                         "Author:\t{0}\nModified:\t{1}",
                                                         pageRevisionInfo.AuthorMostRecent,
                                                         pageRevisionInfo.LastModifiedTime.ToString("dd.MM.yyyy HH:mm:ss")));

                                                     // Update Page Revision Summary for this page
                                                     pageRevisionInfo.AuthorMostRecent = "New Author";
                                                     pageRevisionInfo.LastModifiedTime = DateTime.Now;

                                                     document.Save(dataDir + "WorkingWithPageRevisions_out.one");

نشان می دهد که چگونه می توان بررسی کرد که آیا صفحه یک صفحه درگیری است (یعنی تغییراتی دارد که OneNote نمی تواند به طور خودکار ادغام شود).

string dataDir = RunExamples.GetDataDir_Pages();

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

                                                                                                                          var history = doc.GetPageHistory(doc.FirstChild);
                                                                                                                          for (int i = 0; i < history.Count; i++)
                                                                                                                          {
                                                                                                                              var historyPage = history[i];
                                                                                                                              Console.Write("    {0}. Author: {1}, {2:dd.MM.yyyy hh.mm.ss}",
                                                                                                                                              i,
                                                                                                                                              historyPage.PageContentRevisionSummary.AuthorMostRecent,
                                                                                                                                              historyPage.PageContentRevisionSummary.LastModifiedTime);
                                                                                                                              Console.WriteLine(historyPage.IsConflictPage ? ", IsConflict: true" : string.Empty);

                                                                                                                              // By default conflict pages are just skipped on saving.
                                                                                                                              // If mark it as non-conflict then it will be saved as usual one in the history.
                                                                                                                              if (historyPage.IsConflictPage)
                                                                                                                                  historyPage.IsConflictPage = false;
                                                                                                                          }

                                                                                                                          doc.Save(dataDir + "ConflictPageManipulation_out.one", SaveFormat.One);
 فارسی