Interface ITaggable

Interface ITaggable

A név: Aspose.Note Összefoglaló: Aspose.Note.dll (25.4.0)

Az interfész a csomópontok számára, amelyeket címkék jelölhetnek.

public interface ITaggable : INode

Implements

INode

Examples

Megmutatja, hogyan kell létrehozni egy PDF-t, amely tartalmazza az összes “Project A” oldalát.

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

Megmutatja, hogyan kell befejezni az összes “Project C” kapcsolódó elemet.

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

Megmutatja, hogyan lehet megnyitni az összes “Project C” kapcsolódó elemet.

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

Megmutatja, hogyan kell létrehozni egy PDF-t, amely tartalmazza az elemekkel ellátott oldalakat, melyeket hiányos ellenőrző dobozok jelöltek meg, és amelyeket a múlt héten hoztak létre.

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

Megmutatja, hogyan kell létrehozni egy PDF-t, amely az Outlook hiányos feladatait tartalmazza ezen a héten.

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

Megkapja az összes tag listáját.

List<itag> Tags { get; }

ingatlan értéke

List < ITag >

 Magyar