Interface ITaggable

Interface ITaggable

Le nom : Aspose.Note Assemblée: Aspose.Note.dll (25.4.0)

L’interface pour les nœuds qui peuvent être marqués par des tags.

public interface ITaggable : INode

Implements

INode

Examples

Découvrez comment générer un pdf contenant toutes les pages liées à ‘Projet A’.

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

Affichez comment remplir tous les éléments de la boîte de contrôle liés à ‘Projet 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>

Affichez comment ouvrir tous les éléments de la boîte de contrôle liés à ‘Projet 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>

Il montre comment générer un pdf contenant des pages avec des articles marqués par des boîtes d’inspection incomplètes et créés au cours de la semaine dernière.

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

Découvrez comment générer un pdf contenant des pages avec Outlook tâches incomplètes à remplir cette semaine.

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

Properties

Tags

Retrouvez la liste de tous les tags.

List<itag> Tags { get; }

Valore di proprietà

List di < ITag >

 Français