本文整理汇总了C#中IElementListener.Add方法的典型用法代码示例。如果您正苦于以下问题:C# IElementListener.Add方法的具体用法?C# IElementListener.Add怎么用?C# IElementListener.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IElementListener
的用法示例。
在下文中一共展示了IElementListener.Add方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Create
public static void Create(IElementListener document, int invoiceNumber, InvoiceEntity invoiceEntity, CompanyInformationEntity companyInformationEntity, DateTime now)
{
var table = new PdfPTable(2) { WidthPercentage = 100 };
table.AddCell(GetCompanyNameAndSlogan(invoiceEntity, companyInformationEntity));
table.AddCell(GetInvoiceTitle());
table.AddCell(GetCompanyAddress(invoiceEntity, companyInformationEntity));
table.AddCell(GetInvoiceDetails(invoiceNumber,now));
document.Add(table);
}
示例2: Process
/**
* Processes the element by adding it (or the different parts) to an
* <CODE>ElementListener</CODE>.
*
* @param listener an <CODE>ElementListener</CODE>
* @return <CODE>true</CODE> if the element was processed successfully
*/
public override bool Process(IElementListener listener)
{
try {
foreach (IElement element in ((Section)this.element)) {
listener.Add(element);
}
return true;
}
catch (DocumentException) {
return false;
}
}
示例3: Process
// implementation of the Element-methods
/// <summary>
/// Processes the element by adding it (or the different parts) to an
/// IElementListener.
/// </summary>
/// <param name="listener">an IElementListener</param>
/// <returns>true if the element was processed successfully</returns>
public bool Process(IElementListener listener)
{
try {
foreach (IElement ele in list) {
listener.Add(ele);
}
return true;
}
catch (DocumentException) {
return false;
}
}
示例4: CreateSliceHeader
/// <summary>
/// Create the slice header
/// </summary>
/// <param name="doc">
/// The <see cref="Document"/>
/// </param>
/// <param name="state">
/// The current <see cref="HtmlRenderer.RendererState"/>
/// </param>
private void CreateSliceHeader(IElementListener doc, RendererState state)
{
Table headerTable = this.CreateSliceHeaderTable(state);
PdfPTable table = CreatePdf(headerTable);
if (table != null)
{
doc.Add(table);
table.DeleteBodyRows();
}
}
示例5: Process
// implementation of the Element-methods
/// <summary>
/// Processes the element by adding it (or the different parts) to an
/// IElementListener.
/// </summary>
/// <param name="listener">the IElementListener</param>
/// <returns>true if the element was processed successfully</returns>
public bool Process(IElementListener listener)
{
try {
foreach (IElement ele in this) {
listener.Add(ele);
}
return true;
}
catch (DocumentException de) {
de.GetType();
return false;
}
}
示例6: Process
// implementation of the Element-methods
/// <summary>
/// Processes the element by adding it (or the different parts) to a
/// IElementListener.
/// </summary>
/// <param name="listener">an IElementListener</param>
/// <returns>true if the element was processed successfully</returns>
public bool Process(IElementListener listener)
{
try {
return listener.Add(this);
}
catch (DocumentException de) {
de.GetType();
return false;
}
}