Class CheckBox
ชื่อพื้นที่: Aspose.Note การประกอบ: Aspose.Note.dll (25.4.0)
คลาสพื้นฐานสําหรับแท็กที่สามารถแยกสถานะของพวกเขาระหว่างที่สมบูรณ์และไม่เต็มรูปแบบ
public abstract class CheckBox : ITag
Inheritance
Derived
Implements
อนุญาโตตุลาการ
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
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>
Constructors
CheckBox(TagIcon)
เปิดตัวตัวอย่างใหม่ของคลาส Aspose.Note.CheckBox
protected CheckBox(TagIcon icon)
Parameters
icon
TagIcon
หมายเลข Icon ของ Tag
Properties
Checked
ได้รับค่าที่แสดงให้เห็นว่า CheckBox เป็นในสถานะการตรวจสอบ
public bool Checked { get; }
คุณสมบัติมูลค่า
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>
CompletedTime
รับหรือตั้งค่าเวลาที่เสร็จสิ้น
public DateTime? CompletedTime { get; }
คุณสมบัติมูลค่า
DateTime ?
CreationTime
รับหรือกําหนดเวลาการสร้าง
public DateTime CreationTime { get; set; }
คุณสมบัติมูลค่า
Icon
รับหรือตั้งค่าไอคอน
public abstract TagIcon Icon { get; }
คุณสมบัติมูลค่า
Label
รับข้อความฉลาก
public string Label { get; }
คุณสมบัติมูลค่า
Status
ได้รับหรือตั้งค่าสถานะ
public TagStatus Status { get; }
คุณสมบัติมูลค่า
Methods
SetCompleted(DateTime)
ติดตั้งแท็กไปยังสถานะที่เสร็จสิ้น
public void SetCompleted(DateTime completedTime)
Parameters
completedTime
DateTime
เวลาที่เสร็จสิ้น
SetCompleted()
การตั้งค่าแท็กเพื่อสถานะที่เสร็จสิ้นโดยใช้เวลาปัจจุบันเป็นเวลาเสร็จสมบูรณ์
public void SetCompleted()
Examples
แสดงวิธีการเสร็จสมบูรณ์รายการกล่องตรวจสอบทั้งหมดที่เกี่ยวข้องกับ ‘โครงการ 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>
SetOpen()
ติดตั้งแท็กเพื่อเปิดสถานะ
public virtual void SetOpen()
Examples
แสดงวิธีเปิดรายการทั้งหมดที่เกี่ยวข้องกับ ‘โครงการ 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>