Class NoteTask
Contents
[
Hide
]NoteTask class
Represents a note task.
public sealed class NoteTask : CheckBox, IEquatable<NoteTask>
Properties
Name | Description |
---|---|
Checked { get; } | Gets a value indicating whether the CheckBox is in the checked state. |
CompletedTime { get; } | Gets or sets the completed time. |
CreationTime { get; set; } | Gets or sets the creation time. |
DueDate { get; set; } | Gets or sets the due date. |
override Icon { get; } | Gets or sets the icon. |
Label { get; } | Gets the label text. |
Status { get; } | Gets or sets the status. |
Methods
Name | Description |
---|---|
static CreateCustomFollowUpDate(DateTime) | Creates a new note task with NoFollowUpDateFlag icon and specified due date. |
static CreateFollowUpNextWeek() | Creates a new note task with FollowUpNextWeekFlag icon. |
static CreateFollowUpThisWeek() | Creates a new note task with FollowUpThisWeekFlag icon. |
static CreateFollowUpToday() | Creates a new note task with FollowUpTodayFlag icon. |
static CreateFollowUpTomorrow() | Creates a new note task with FollowUpTomorrowFlag icon. |
static CreateNoFollowUpDate() | Creates a new note task with NoFollowUpDateFlag icon. |
Equals(NoteTask) | Determines whether the specified object is equal to the current object. |
override Equals(object) | Determines whether the specified object is equal to the current object. |
override GetHashCode() | Serves as a hash function for the type. |
SetCompleted() | Sets the tag to completed state using current time as completed time. |
SetCompleted(DateTime) | Sets the tag to completed state. |
override SetOpen() | Sets the tag to open state. |
Examples
Shows how to generate a pdf containing all pages related to ‘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 => e.Tags.Any(x => x.Label.Contains("Project A"))))
{
report.AppendChildLast(page.Clone());
}
}
report.Save(Path.Combine(dataDir, "ProjectA_Report.pdf"));
Shows how to access details of outlook’s tasks.
// 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}");
}
}
}
See Also
- class CheckBox
- namespace Aspose.Note
- assembly Aspose.Note