Class CheckBox

Class CheckBox

Το όνομα: Aspose.Note Συγκέντρωση: Aspose.Note.dll (25.4.0)

Η βασική κατηγορία για τις ετικέτες που μπορούν να διαιρέσουν την κατάσταση τους μεταξύ πλήρους και ατελής.

public abstract class CheckBox : ITag

Inheritance

object CheckBox

Derived

NoteCheckBox , NoteTask

Implements

ITag

Κληρονομημένα μέλη

object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

Δείχνει πώς να δημιουργήσετε ένα pdf που περιέχει όλες τις σελίδες που σχετίζονται με το “Project 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>

Εμφάνιση του τρόπου ολοκλήρωσης όλων των στοιχείων του κουτιού ελέγχου που σχετίζονται με το “Project 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>

Δείχνει πώς να ανοίξετε όλα τα στοιχεία του κουτιού ελέγχου που σχετίζονται με το “Project 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>

Constructors

CheckBox(TagIcon)

Αρχίζει μια νέα περίπτωση της κατηγορίας Aspose.Note.CheckBox.

protected CheckBox(TagIcon icon)

Parameters

icon TagIcon

Το εικονίδιο του tag.

Properties

Checked

Λαμβάνει μια τιμή που υποδεικνύει εάν το CheckBox βρίσκεται στην κατάσταση ελέγχου.

public bool Checked { get; }

Αξία ιδιοκτησίας

bool

Examples

Δείχνει πώς να δημιουργήσετε ένα pdf που περιέχει όλες τις σελίδες που σχετίζονται με το “Project 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>

Εμφάνιση του τρόπου ολοκλήρωσης όλων των στοιχείων του κουτιού ελέγχου που σχετίζονται με το “Project 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>

Δείχνει πώς να ανοίξετε όλα τα στοιχεία του κουτιού ελέγχου που σχετίζονται με το “Project 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>

CompletedTime

Αποκτήστε ή καθορίστε την ολοκληρωμένη ώρα.

public DateTime? CompletedTime { get; }

Αξία ιδιοκτησίας

DateTime ?

CreationTime

Αποκτά ή καθορίζει τον χρόνο δημιουργίας.

public DateTime CreationTime { get; set; }

Αξία ιδιοκτησίας

DateTime

Icon

Πάρτε ή τοποθετήστε το εικονίδιο.

public abstract TagIcon Icon { get; }

Αξία ιδιοκτησίας

TagIcon

Label

Πάρτε το κείμενο της ετικέτας.

public string Label { get; }

Αξία ιδιοκτησίας

string

Status

Αποκτά ή θέτει το καθεστώς.

public TagStatus Status { get; }

Αξία ιδιοκτησίας

TagStatus

Methods

SetCompleted(DateTime)

Εισάγετε την ετικέτα στο ολοκληρωμένο κράτος.

public void SetCompleted(DateTime completedTime)

Parameters

completedTime DateTime

Ο ολοκληρωμένος χρόνος.

SetCompleted()

Ρυθμίστε την ετικέτα σε ολοκληρωμένη κατάσταση χρησιμοποιώντας τον τρέχοντα χρόνο ως ολοκλήρωτο χρόνο.

public void SetCompleted()

Examples

Εμφάνιση του τρόπου ολοκλήρωσης όλων των στοιχείων του κουτιού ελέγχου που σχετίζονται με το “Project 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>

SetOpen()

Εισάγετε την ετικέτα στο ανοιχτό κράτος.

public virtual void SetOpen()

Examples

Δείχνει πώς να ανοίξετε όλα τα στοιχεία του κουτιού ελέγχου που σχετίζονται με το “Project 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>
 Ελληνικά