CheckBox.SetCompleted

SetCompleted(DateTime)

Sets the tag to completed state.

public void SetCompleted(DateTime completedTime)
ParameterTypeDescription
completedTimeDateTimeThe completed time.

See Also


SetCompleted()

Sets the tag to completed state using current time as completed time.

public void SetCompleted()

Examples

Shows how to make completed all checkbox items related to ‘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") && !checkBox.Checked)
        {
            checkBox.SetCompleted();
        }
    }
}

oneFile.Save(Path.Combine(dataDir, ClosedProjectCNotesFileName));

See Also