Interface ITag
Името на пространството: Aspose.Note Асамблея: Aspose.Note.dll (25.4.0)
Интерфейс за етикети от всички видове.
public interface ITag
Examples
Показва как да се генерира 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, "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>
Показва как да се завършат всички елементи в контролната кутия, свързани с “Проект С”.
// 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>
Показва как да отворите всички елементи в контролната кутия, свързани с “Проект С”.
// 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>
Показва как да получите достъп до подробности за задачите на Outlook.
// 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}");
}
}
}</notetask></richtext></richtext>
Показва как да получите достъп до детайли на таг.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Tags();
// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "TagFile.one");
// Get all RichText nodes
IList<richtext> nodes = oneFile.GetChildNodes<richtext>();
// Iterate through each node
foreach (RichText richText in nodes)
{
var tags = richText.Tags.OfType<notetag>();
if (tags.Any())
{
Console.WriteLine($"Text: {richText.Text}");
foreach (var noteTag in tags)
{
// Retrieve properties
Console.WriteLine($" Completed Time: {noteTag.CompletedTime}");
Console.WriteLine($" Create Time: {noteTag.CreationTime}");
Console.WriteLine($" Font Color: {noteTag.FontColor}");
Console.WriteLine($" Status: {noteTag.Status}");
Console.WriteLine($" Label: {noteTag.Label}");
Console.WriteLine($" Icon: {noteTag.Icon}");
Console.WriteLine($" High Light: {noteTag.Highlight}");
}
}
}</notetag></richtext></richtext>
Properties
CompletedTime
Получаване или определяне на завършеното време.
DateTime? CompletedTime { get; }
стойност на имота
DateTime ?
Examples
Показва как да получите достъп до подробности за задачите на Outlook.
// 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}");
}
}
}</notetask></richtext></richtext>
Показва как да получите достъп до детайли на таг.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Tags();
// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "TagFile.one");
// Get all RichText nodes
IList<richtext> nodes = oneFile.GetChildNodes<richtext>();
// Iterate through each node
foreach (RichText richText in nodes)
{
var tags = richText.Tags.OfType<notetag>();
if (tags.Any())
{
Console.WriteLine($"Text: {richText.Text}");
foreach (var noteTag in tags)
{
// Retrieve properties
Console.WriteLine($" Completed Time: {noteTag.CompletedTime}");
Console.WriteLine($" Create Time: {noteTag.CreationTime}");
Console.WriteLine($" Font Color: {noteTag.FontColor}");
Console.WriteLine($" Status: {noteTag.Status}");
Console.WriteLine($" Label: {noteTag.Label}");
Console.WriteLine($" Icon: {noteTag.Icon}");
Console.WriteLine($" High Light: {noteTag.Highlight}");
}
}
}</notetag></richtext></richtext>
CreationTime
Получават или определят времето за създаване.
DateTime CreationTime { get; set; }
стойност на имота
Examples
Показва как да се генерира 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, "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>
Показва как да се генерира 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>
Показва как да получите достъп до подробности за задачите на Outlook.
// 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}");
}
}
}</notetask></richtext></richtext>
Показва как да получите достъп до детайли на таг.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Tags();
// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "TagFile.one");
// Get all RichText nodes
IList<richtext> nodes = oneFile.GetChildNodes<richtext>();
// Iterate through each node
foreach (RichText richText in nodes)
{
var tags = richText.Tags.OfType<notetag>();
if (tags.Any())
{
Console.WriteLine($"Text: {richText.Text}");
foreach (var noteTag in tags)
{
// Retrieve properties
Console.WriteLine($" Completed Time: {noteTag.CompletedTime}");
Console.WriteLine($" Create Time: {noteTag.CreationTime}");
Console.WriteLine($" Font Color: {noteTag.FontColor}");
Console.WriteLine($" Status: {noteTag.Status}");
Console.WriteLine($" Label: {noteTag.Label}");
Console.WriteLine($" Icon: {noteTag.Icon}");
Console.WriteLine($" High Light: {noteTag.Highlight}");
}
}
}</notetag></richtext></richtext>
Icon
Вземете или поставете иконата.
TagIcon Icon { get; }
стойност на имота
Examples
Показва как да получите достъп до подробности за задачите на Outlook.
// 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}");
}
}
}</notetask></richtext></richtext>
Показва как да получите достъп до детайли на таг.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Tags();
// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "TagFile.one");
// Get all RichText nodes
IList<richtext> nodes = oneFile.GetChildNodes<richtext>();
// Iterate through each node
foreach (RichText richText in nodes)
{
var tags = richText.Tags.OfType<notetag>();
if (tags.Any())
{
Console.WriteLine($"Text: {richText.Text}");
foreach (var noteTag in tags)
{
// Retrieve properties
Console.WriteLine($" Completed Time: {noteTag.CompletedTime}");
Console.WriteLine($" Create Time: {noteTag.CreationTime}");
Console.WriteLine($" Font Color: {noteTag.FontColor}");
Console.WriteLine($" Status: {noteTag.Status}");
Console.WriteLine($" Label: {noteTag.Label}");
Console.WriteLine($" Icon: {noteTag.Icon}");
Console.WriteLine($" High Light: {noteTag.Highlight}");
}
}
}</notetag></richtext></richtext>
Label
Получаване на етикета текст.
string Label { get; }
стойност на имота
Examples
Показва как да се завършат всички елементи в контролната кутия, свързани с “Проект С”.
// 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>
Показва как да отворите всички елементи в контролната кутия, свързани с “Проект С”.
// 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>
Показва как да получите достъп до детайли на таг.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Tags();
// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "TagFile.one");
// Get all RichText nodes
IList<richtext> nodes = oneFile.GetChildNodes<richtext>();
// Iterate through each node
foreach (RichText richText in nodes)
{
var tags = richText.Tags.OfType<notetag>();
if (tags.Any())
{
Console.WriteLine($"Text: {richText.Text}");
foreach (var noteTag in tags)
{
// Retrieve properties
Console.WriteLine($" Completed Time: {noteTag.CompletedTime}");
Console.WriteLine($" Create Time: {noteTag.CreationTime}");
Console.WriteLine($" Font Color: {noteTag.FontColor}");
Console.WriteLine($" Status: {noteTag.Status}");
Console.WriteLine($" Label: {noteTag.Label}");
Console.WriteLine($" Icon: {noteTag.Icon}");
Console.WriteLine($" High Light: {noteTag.Highlight}");
}
}
}</notetag></richtext></richtext>
Status
Получава или определя статута.
TagStatus Status { get; }
стойност на имота
Examples
Показва как да получите достъп до подробности за задачите на Outlook.
// 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}");
}
}
}</notetask></richtext></richtext>
Показва как да получите достъп до детайли на таг.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Tags();
// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "TagFile.one");
// Get all RichText nodes
IList<richtext> nodes = oneFile.GetChildNodes<richtext>();
// Iterate through each node
foreach (RichText richText in nodes)
{
var tags = richText.Tags.OfType<notetag>();
if (tags.Any())
{
Console.WriteLine($"Text: {richText.Text}");
foreach (var noteTag in tags)
{
// Retrieve properties
Console.WriteLine($" Completed Time: {noteTag.CompletedTime}");
Console.WriteLine($" Create Time: {noteTag.CreationTime}");
Console.WriteLine($" Font Color: {noteTag.FontColor}");
Console.WriteLine($" Status: {noteTag.Status}");
Console.WriteLine($" Label: {noteTag.Label}");
Console.WriteLine($" Icon: {noteTag.Icon}");
Console.WriteLine($" High Light: {noteTag.Highlight}");
}
}
}</notetag></richtext></richtext>