Interface ITag

Interface ITag

Названий на: Aspose.Note Асамблея: Aspose.Note.dll (25.4.0)

Інтерфейс для тегів всіх видів.

public interface ITag

Examples

Показує, як генерувати PDF, що містить всі сторінки, пов’язані з “Проект А”.

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

                                                                                   // Load the document into Aspose.Note.
                                                                                   var oneFile = new Document(Path.Combine(dataDir, "ProjectNotes.one"));

                                                                                   var report = new Document();
                                                                                   foreach (var page in oneFile)
                                                                                   {
                                                                                       if (page.GetChildNodes<itaggable>().Any(e =&gt; e.Tags.Any(x =&gt; x.Label.Contains("Project A"))))
                                                                                       {
                                                                                           report.AppendChildLast(page.Clone());
                                                                                       }
                                                                                   }

                                                                                   report.Save(Path.Combine(dataDir, "ProjectA_Report.pdf"));</itaggable>

Показати, як завершити всі пункти перевірки, пов’язані з “Проект C”.

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

                                                                                 // Load the document into Aspose.Note.
                                                                                 var oneFile = new Document(Path.Combine(dataDir, "ProjectNotes.one"));

                                                                                 foreach (var node in oneFile.GetChildNodes<itaggable>())
                                                                                 {
                                                                                     foreach (var checkBox in node.Tags.OfType<checkbox>())
                                                                                     {
                                                                                         if (checkBox.Label.Contains("Project C") &amp;&amp; !checkBox.Checked)
                                                                                         {
                                                                                             checkBox.SetCompleted();
                                                                                         }
                                                                                     }
                                                                                 }

                                                                                 oneFile.Save(Path.Combine(dataDir, ClosedProjectCNotesFileName));</checkbox></itaggable>

Показати, як відкрити всі елементи контрольної скриньки, пов’язані з “Проект C”.

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

                                                                            // Load the document into Aspose.Note.
                                                                            var oneFile = new Document(Path.Combine(dataDir, ClosedProjectCNotesFileName));

                                                                            foreach (var node in oneFile.GetChildNodes<itaggable>())
                                                                            {
                                                                                foreach (var checkBox in node.Tags.OfType<checkbox>())
                                                                                {
                                                                                    if (checkBox.Label.Contains("Project C") &amp;&amp; checkBox.Checked)
                                                                                    {
                                                                                        checkBox.SetOpen();
                                                                                    }
                                                                                }
                                                                            }

                                                                            oneFile.Save(Path.Combine(dataDir, "ProjectNoteWithOpenProjectC.one"));</checkbox></itaggable>

Показує, як генерувати PDF-файл, що містить сторінки з елементами, зазначеними неповними коробками і створеними протягом минулого тижня.

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

                                                                                                                                // Load the document into Aspose.Note.
                                                                                                                                var oneFile = new Document(Path.Combine(dataDir, "TagFile.one"));

                                                                                                                                var report = new Document();
                                                                                                                                foreach (var page in oneFile)
                                                                                                                                {
                                                                                                                                    if (page.GetChildNodes<itaggable>().Any(e =&gt; e.Tags.OfType<checkbox>().Any(x =&gt; !x.Checked &amp;&amp; DateTime.UtcNow.Subtract(TimeSpan.FromDays(7)) &lt;= x.CreationTime)))
                                                                                                                                    {
                                                                                                                                        report.AppendChildLast(page.Clone());
                                                                                                                                    }
                                                                                                                                }

                                                                                                                                report.Save(Path.Combine(dataDir, "IncompleteLastWeekReport.pdf"));</checkbox></itaggable>

Покажіть, як генерувати PDF, що містить сторінки з Outlook неповні завдання, які повинні бути виконані на цьому тижні.

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

                                                                                                               // Load the document into Aspose.Note.
                                                                                                               var oneFile = new Document(Path.Combine(dataDir, "TagFile.one"));

                                                                                                               var report = new Document();
                                                                                                               var endOfWeek = DateTime.Today.AddDays(5 - (int)DateTime.Today.DayOfWeek);
                                                                                                               foreach (var page in oneFile)
                                                                                                               {
                                                                                                                   if (page.GetChildNodes<itaggable>().Any(e =&gt; e.Tags.OfType<notetask>().Any(x =&gt; !x.Checked &amp;&amp; DateTime.UtcNow.Subtract(TimeSpan.FromDays(7)) &lt;= x.CreationTime &amp;&amp; x.DueDate &lt;= endOfWeek)))
                                                                                                                   {
                                                                                                                       report.AppendChildLast(page.Clone());
                                                                                                                   }
                                                                                                               }

                                                                                                               report.Save(Path.Combine(dataDir, "IncompleteTasksForThisWeekReport.pdf"));</notetask></itaggable>

Показує, як отримати доступ до деталей завдань Outlook.

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

                                                          // Load the document into Aspose.Note.
                                                          Document oneFile = new Document(dataDir + "Aspose.one");

                                                          // Get all RichText nodes
                                                          IList<richtext> nodes = oneFile.GetChildNodes<richtext>();

                                                          // Iterate through each node
                                                          foreach (RichText richText in nodes)
                                                          {
                                                              var tasks = richText.Tags.OfType<notetask>();
                                                              if (tasks.Any())
                                                              {
                                                                  Console.WriteLine($"Task: {richText.Text}");
                                                                  foreach (var noteTask in tasks)
                                                                  {
                                                                      // Retrieve properties
                                                                      Console.WriteLine($"    Completed Time: {noteTask.CompletedTime}");
                                                                      Console.WriteLine($"    Create Time: {noteTask.CreationTime}");
                                                                      Console.WriteLine($"    Due Date: {noteTask.DueDate}");
                                                                      Console.WriteLine($"    Status: {noteTask.Status}");
                                                                      Console.WriteLine($"    Icon: {noteTask.Icon}");
                                                                  }
                                                              }
                                                          }</notetask></richtext></richtext>

Показати, як отримати доступ до деталей тегу.

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

                                                // Load the document into Aspose.Note.
                                                Document oneFile = new Document(dataDir + "TagFile.one");

                                                // Get all RichText nodes
                                                IList<richtext> nodes = oneFile.GetChildNodes<richtext>();

                                                // Iterate through each node
                                                foreach (RichText richText in nodes)
                                                {
                                                    var tags = richText.Tags.OfType<notetag>();
                                                    if (tags.Any())
                                                    {
                                                        Console.WriteLine($"Text: {richText.Text}");
                                                        foreach (var noteTag in tags)
                                                        {
                                                            // Retrieve properties
                                                            Console.WriteLine($"    Completed Time: {noteTag.CompletedTime}");
                                                            Console.WriteLine($"    Create Time: {noteTag.CreationTime}");
                                                            Console.WriteLine($"    Font Color: {noteTag.FontColor}");
                                                            Console.WriteLine($"    Status: {noteTag.Status}");
                                                            Console.WriteLine($"    Label: {noteTag.Label}");
                                                            Console.WriteLine($"    Icon: {noteTag.Icon}");
                                                            Console.WriteLine($"    High Light: {noteTag.Highlight}");
                                                        }
                                                    }
                                                }</notetag></richtext></richtext>

Properties

CompletedTime

Приймати або встановити завершений час.

DateTime? CompletedTime { get; }

вартість нерухомості

DateTime ?

Examples

Показує, як отримати доступ до деталей завдань Outlook.

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

                                                          // Load the document into Aspose.Note.
                                                          Document oneFile = new Document(dataDir + "Aspose.one");

                                                          // Get all RichText nodes
                                                          IList<richtext> nodes = oneFile.GetChildNodes<richtext>();

                                                          // Iterate through each node
                                                          foreach (RichText richText in nodes)
                                                          {
                                                              var tasks = richText.Tags.OfType<notetask>();
                                                              if (tasks.Any())
                                                              {
                                                                  Console.WriteLine($"Task: {richText.Text}");
                                                                  foreach (var noteTask in tasks)
                                                                  {
                                                                      // Retrieve properties
                                                                      Console.WriteLine($"    Completed Time: {noteTask.CompletedTime}");
                                                                      Console.WriteLine($"    Create Time: {noteTask.CreationTime}");
                                                                      Console.WriteLine($"    Due Date: {noteTask.DueDate}");
                                                                      Console.WriteLine($"    Status: {noteTask.Status}");
                                                                      Console.WriteLine($"    Icon: {noteTask.Icon}");
                                                                  }
                                                              }
                                                          }</notetask></richtext></richtext>

Показати, як отримати доступ до деталей тегу.

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

                                                // Load the document into Aspose.Note.
                                                Document oneFile = new Document(dataDir + "TagFile.one");

                                                // Get all RichText nodes
                                                IList<richtext> nodes = oneFile.GetChildNodes<richtext>();

                                                // Iterate through each node
                                                foreach (RichText richText in nodes)
                                                {
                                                    var tags = richText.Tags.OfType<notetag>();
                                                    if (tags.Any())
                                                    {
                                                        Console.WriteLine($"Text: {richText.Text}");
                                                        foreach (var noteTag in tags)
                                                        {
                                                            // Retrieve properties
                                                            Console.WriteLine($"    Completed Time: {noteTag.CompletedTime}");
                                                            Console.WriteLine($"    Create Time: {noteTag.CreationTime}");
                                                            Console.WriteLine($"    Font Color: {noteTag.FontColor}");
                                                            Console.WriteLine($"    Status: {noteTag.Status}");
                                                            Console.WriteLine($"    Label: {noteTag.Label}");
                                                            Console.WriteLine($"    Icon: {noteTag.Icon}");
                                                            Console.WriteLine($"    High Light: {noteTag.Highlight}");
                                                        }
                                                    }
                                                }</notetag></richtext></richtext>

CreationTime

Знайти або встановити час створення.

DateTime CreationTime { get; set; }

вартість нерухомості

DateTime

Examples

Показує, як генерувати PDF, що містить всі сторінки, пов’язані з “Проект А”.

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

                                                                                   // Load the document into Aspose.Note.
                                                                                   var oneFile = new Document(Path.Combine(dataDir, "ProjectNotes.one"));

                                                                                   var report = new Document();
                                                                                   foreach (var page in oneFile)
                                                                                   {
                                                                                       if (page.GetChildNodes<itaggable>().Any(e =&gt; e.Tags.Any(x =&gt; x.Label.Contains("Project A"))))
                                                                                       {
                                                                                           report.AppendChildLast(page.Clone());
                                                                                       }
                                                                                   }

                                                                                   report.Save(Path.Combine(dataDir, "ProjectA_Report.pdf"));</itaggable>

Показує, як генерувати PDF-файл, що містить сторінки з елементами, зазначеними неповними коробками і створеними протягом минулого тижня.

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

                                                                                                                                // Load the document into Aspose.Note.
                                                                                                                                var oneFile = new Document(Path.Combine(dataDir, "TagFile.one"));

                                                                                                                                var report = new Document();
                                                                                                                                foreach (var page in oneFile)
                                                                                                                                {
                                                                                                                                    if (page.GetChildNodes<itaggable>().Any(e =&gt; e.Tags.OfType<checkbox>().Any(x =&gt; !x.Checked &amp;&amp; DateTime.UtcNow.Subtract(TimeSpan.FromDays(7)) &lt;= x.CreationTime)))
                                                                                                                                    {
                                                                                                                                        report.AppendChildLast(page.Clone());
                                                                                                                                    }
                                                                                                                                }

                                                                                                                                report.Save(Path.Combine(dataDir, "IncompleteLastWeekReport.pdf"));</checkbox></itaggable>

Покажіть, як генерувати PDF, що містить сторінки з Outlook неповні завдання, які повинні бути виконані на цьому тижні.

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

                                                                                                               // Load the document into Aspose.Note.
                                                                                                               var oneFile = new Document(Path.Combine(dataDir, "TagFile.one"));

                                                                                                               var report = new Document();
                                                                                                               var endOfWeek = DateTime.Today.AddDays(5 - (int)DateTime.Today.DayOfWeek);
                                                                                                               foreach (var page in oneFile)
                                                                                                               {
                                                                                                                   if (page.GetChildNodes<itaggable>().Any(e =&gt; e.Tags.OfType<notetask>().Any(x =&gt; !x.Checked &amp;&amp; DateTime.UtcNow.Subtract(TimeSpan.FromDays(7)) &lt;= x.CreationTime &amp;&amp; x.DueDate &lt;= endOfWeek)))
                                                                                                                   {
                                                                                                                       report.AppendChildLast(page.Clone());
                                                                                                                   }
                                                                                                               }

                                                                                                               report.Save(Path.Combine(dataDir, "IncompleteTasksForThisWeekReport.pdf"));</notetask></itaggable>

Показує, як отримати доступ до деталей завдань Outlook.

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

                                                          // Load the document into Aspose.Note.
                                                          Document oneFile = new Document(dataDir + "Aspose.one");

                                                          // Get all RichText nodes
                                                          IList<richtext> nodes = oneFile.GetChildNodes<richtext>();

                                                          // Iterate through each node
                                                          foreach (RichText richText in nodes)
                                                          {
                                                              var tasks = richText.Tags.OfType<notetask>();
                                                              if (tasks.Any())
                                                              {
                                                                  Console.WriteLine($"Task: {richText.Text}");
                                                                  foreach (var noteTask in tasks)
                                                                  {
                                                                      // Retrieve properties
                                                                      Console.WriteLine($"    Completed Time: {noteTask.CompletedTime}");
                                                                      Console.WriteLine($"    Create Time: {noteTask.CreationTime}");
                                                                      Console.WriteLine($"    Due Date: {noteTask.DueDate}");
                                                                      Console.WriteLine($"    Status: {noteTask.Status}");
                                                                      Console.WriteLine($"    Icon: {noteTask.Icon}");
                                                                  }
                                                              }
                                                          }</notetask></richtext></richtext>

Показати, як отримати доступ до деталей тегу.

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

                                                // Load the document into Aspose.Note.
                                                Document oneFile = new Document(dataDir + "TagFile.one");

                                                // Get all RichText nodes
                                                IList<richtext> nodes = oneFile.GetChildNodes<richtext>();

                                                // Iterate through each node
                                                foreach (RichText richText in nodes)
                                                {
                                                    var tags = richText.Tags.OfType<notetag>();
                                                    if (tags.Any())
                                                    {
                                                        Console.WriteLine($"Text: {richText.Text}");
                                                        foreach (var noteTag in tags)
                                                        {
                                                            // Retrieve properties
                                                            Console.WriteLine($"    Completed Time: {noteTag.CompletedTime}");
                                                            Console.WriteLine($"    Create Time: {noteTag.CreationTime}");
                                                            Console.WriteLine($"    Font Color: {noteTag.FontColor}");
                                                            Console.WriteLine($"    Status: {noteTag.Status}");
                                                            Console.WriteLine($"    Label: {noteTag.Label}");
                                                            Console.WriteLine($"    Icon: {noteTag.Icon}");
                                                            Console.WriteLine($"    High Light: {noteTag.Highlight}");
                                                        }
                                                    }
                                                }</notetag></richtext></richtext>

Icon

Приймати або встановити ікону.

TagIcon Icon { get; }

вартість нерухомості

TagIcon

Examples

Показує, як отримати доступ до деталей завдань Outlook.

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

                                                          // Load the document into Aspose.Note.
                                                          Document oneFile = new Document(dataDir + "Aspose.one");

                                                          // Get all RichText nodes
                                                          IList<richtext> nodes = oneFile.GetChildNodes<richtext>();

                                                          // Iterate through each node
                                                          foreach (RichText richText in nodes)
                                                          {
                                                              var tasks = richText.Tags.OfType<notetask>();
                                                              if (tasks.Any())
                                                              {
                                                                  Console.WriteLine($"Task: {richText.Text}");
                                                                  foreach (var noteTask in tasks)
                                                                  {
                                                                      // Retrieve properties
                                                                      Console.WriteLine($"    Completed Time: {noteTask.CompletedTime}");
                                                                      Console.WriteLine($"    Create Time: {noteTask.CreationTime}");
                                                                      Console.WriteLine($"    Due Date: {noteTask.DueDate}");
                                                                      Console.WriteLine($"    Status: {noteTask.Status}");
                                                                      Console.WriteLine($"    Icon: {noteTask.Icon}");
                                                                  }
                                                              }
                                                          }</notetask></richtext></richtext>

Показати, як отримати доступ до деталей тегу.

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

                                                // Load the document into Aspose.Note.
                                                Document oneFile = new Document(dataDir + "TagFile.one");

                                                // Get all RichText nodes
                                                IList<richtext> nodes = oneFile.GetChildNodes<richtext>();

                                                // Iterate through each node
                                                foreach (RichText richText in nodes)
                                                {
                                                    var tags = richText.Tags.OfType<notetag>();
                                                    if (tags.Any())
                                                    {
                                                        Console.WriteLine($"Text: {richText.Text}");
                                                        foreach (var noteTag in tags)
                                                        {
                                                            // Retrieve properties
                                                            Console.WriteLine($"    Completed Time: {noteTag.CompletedTime}");
                                                            Console.WriteLine($"    Create Time: {noteTag.CreationTime}");
                                                            Console.WriteLine($"    Font Color: {noteTag.FontColor}");
                                                            Console.WriteLine($"    Status: {noteTag.Status}");
                                                            Console.WriteLine($"    Label: {noteTag.Label}");
                                                            Console.WriteLine($"    Icon: {noteTag.Icon}");
                                                            Console.WriteLine($"    High Light: {noteTag.Highlight}");
                                                        }
                                                    }
                                                }</notetag></richtext></richtext>

Label

Знайдіть текст етикетки.

string Label { get; }

вартість нерухомості

string

Examples

Показати, як завершити всі пункти перевірки, пов’язані з “Проект C”.

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

                                                                                 // Load the document into Aspose.Note.
                                                                                 var oneFile = new Document(Path.Combine(dataDir, "ProjectNotes.one"));

                                                                                 foreach (var node in oneFile.GetChildNodes<itaggable>())
                                                                                 {
                                                                                     foreach (var checkBox in node.Tags.OfType<checkbox>())
                                                                                     {
                                                                                         if (checkBox.Label.Contains("Project C") &amp;&amp; !checkBox.Checked)
                                                                                         {
                                                                                             checkBox.SetCompleted();
                                                                                         }
                                                                                     }
                                                                                 }

                                                                                 oneFile.Save(Path.Combine(dataDir, ClosedProjectCNotesFileName));</checkbox></itaggable>

Показати, як відкрити всі елементи контрольної скриньки, пов’язані з “Проект C”.

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

                                                                            // Load the document into Aspose.Note.
                                                                            var oneFile = new Document(Path.Combine(dataDir, ClosedProjectCNotesFileName));

                                                                            foreach (var node in oneFile.GetChildNodes<itaggable>())
                                                                            {
                                                                                foreach (var checkBox in node.Tags.OfType<checkbox>())
                                                                                {
                                                                                    if (checkBox.Label.Contains("Project C") &amp;&amp; checkBox.Checked)
                                                                                    {
                                                                                        checkBox.SetOpen();
                                                                                    }
                                                                                }
                                                                            }

                                                                            oneFile.Save(Path.Combine(dataDir, "ProjectNoteWithOpenProjectC.one"));</checkbox></itaggable>

Показати, як отримати доступ до деталей тегу.

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

                                                // Load the document into Aspose.Note.
                                                Document oneFile = new Document(dataDir + "TagFile.one");

                                                // Get all RichText nodes
                                                IList<richtext> nodes = oneFile.GetChildNodes<richtext>();

                                                // Iterate through each node
                                                foreach (RichText richText in nodes)
                                                {
                                                    var tags = richText.Tags.OfType<notetag>();
                                                    if (tags.Any())
                                                    {
                                                        Console.WriteLine($"Text: {richText.Text}");
                                                        foreach (var noteTag in tags)
                                                        {
                                                            // Retrieve properties
                                                            Console.WriteLine($"    Completed Time: {noteTag.CompletedTime}");
                                                            Console.WriteLine($"    Create Time: {noteTag.CreationTime}");
                                                            Console.WriteLine($"    Font Color: {noteTag.FontColor}");
                                                            Console.WriteLine($"    Status: {noteTag.Status}");
                                                            Console.WriteLine($"    Label: {noteTag.Label}");
                                                            Console.WriteLine($"    Icon: {noteTag.Icon}");
                                                            Console.WriteLine($"    High Light: {noteTag.Highlight}");
                                                        }
                                                    }
                                                }</notetag></richtext></richtext>

Status

Знайти або встановити статус.

TagStatus Status { get; }

вартість нерухомості

TagStatus

Examples

Показує, як отримати доступ до деталей завдань Outlook.

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

                                                          // Load the document into Aspose.Note.
                                                          Document oneFile = new Document(dataDir + "Aspose.one");

                                                          // Get all RichText nodes
                                                          IList<richtext> nodes = oneFile.GetChildNodes<richtext>();

                                                          // Iterate through each node
                                                          foreach (RichText richText in nodes)
                                                          {
                                                              var tasks = richText.Tags.OfType<notetask>();
                                                              if (tasks.Any())
                                                              {
                                                                  Console.WriteLine($"Task: {richText.Text}");
                                                                  foreach (var noteTask in tasks)
                                                                  {
                                                                      // Retrieve properties
                                                                      Console.WriteLine($"    Completed Time: {noteTask.CompletedTime}");
                                                                      Console.WriteLine($"    Create Time: {noteTask.CreationTime}");
                                                                      Console.WriteLine($"    Due Date: {noteTask.DueDate}");
                                                                      Console.WriteLine($"    Status: {noteTask.Status}");
                                                                      Console.WriteLine($"    Icon: {noteTask.Icon}");
                                                                  }
                                                              }
                                                          }</notetask></richtext></richtext>

Показати, як отримати доступ до деталей тегу.

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

                                                // Load the document into Aspose.Note.
                                                Document oneFile = new Document(dataDir + "TagFile.one");

                                                // Get all RichText nodes
                                                IList<richtext> nodes = oneFile.GetChildNodes<richtext>();

                                                // Iterate through each node
                                                foreach (RichText richText in nodes)
                                                {
                                                    var tags = richText.Tags.OfType<notetag>();
                                                    if (tags.Any())
                                                    {
                                                        Console.WriteLine($"Text: {richText.Text}");
                                                        foreach (var noteTag in tags)
                                                        {
                                                            // Retrieve properties
                                                            Console.WriteLine($"    Completed Time: {noteTag.CompletedTime}");
                                                            Console.WriteLine($"    Create Time: {noteTag.CreationTime}");
                                                            Console.WriteLine($"    Font Color: {noteTag.FontColor}");
                                                            Console.WriteLine($"    Status: {noteTag.Status}");
                                                            Console.WriteLine($"    Label: {noteTag.Label}");
                                                            Console.WriteLine($"    Icon: {noteTag.Icon}");
                                                            Console.WriteLine($"    High Light: {noteTag.Highlight}");
                                                        }
                                                    }
                                                }</notetag></richtext></richtext>
 Українська