Interface ITaggable
Interface ITaggable
ชื่อพื้นที่: Aspose.Note การประกอบ: Aspose.Note.dll (25.4.0)
อินเตอร์เฟซสําหรับคิวส์ที่สามารถทําเครื่องหมายด้วยแท็ก
public interface ITaggable : INode
Implements
Examples
แสดงวิธีสร้างไฟล์ PDF ที่มีหน้าทั้งหมดที่เกี่ยวข้องกับ ‘โครงการ 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"));</itaggable>
แสดงวิธีการเสร็จสมบูรณ์รายการกล่องตรวจสอบทั้งหมดที่เกี่ยวข้องกับ ‘โครงการ 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));</checkbox></itaggable>
แสดงวิธีเปิดรายการทั้งหมดที่เกี่ยวข้องกับ ‘โครงการ 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") && 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 => e.Tags.OfType<checkbox>().Any(x => !x.Checked && DateTime.UtcNow.Subtract(TimeSpan.FromDays(7)) <= 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 => e.Tags.OfType<notetask>().Any(x => !x.Checked && DateTime.UtcNow.Subtract(TimeSpan.FromDays(7)) <= x.CreationTime && x.DueDate <= endOfWeek)))
{
report.AppendChildLast(page.Clone());
}
}
report.Save(Path.Combine(dataDir, "IncompleteTasksForThisWeekReport.pdf"));</notetask></itaggable>
Properties
Tags
รับรายการแท็กทั้งหมด
List<itag> Tags { get; }