本文整理匯總了C#中System.Drawing.Html.CssBox.GetAttribute方法的典型用法代碼示例。如果您正苦於以下問題:C# CssBox.GetAttribute方法的具體用法?C# CssBox.GetAttribute怎麽用?C# CssBox.GetAttribute使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Drawing.Html.CssBox
的用法示例。
在下文中一共展示了CssBox.GetAttribute方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: SpacingBox
public SpacingBox(CssBox tableBox, ref CssBox extendedBox, int startRow)
: base(tableBox, new HtmlTag("<none colspan=" + extendedBox.GetAttribute("colspan", "1") + ">"))
{
ExtendedBox = extendedBox;
Display = CssConstants.None;
_startRow = startRow;
_endRow = startRow + int.Parse(extendedBox.GetAttribute("rowspan", "1")) - 1;
}
示例2: GetRowSpan
/// <summary>
/// Gets the rowspan of the specified box
/// </summary>
/// <param name="b"></param>
private int GetRowSpan(CssBox b)
{
string att = b.GetAttribute("rowspan", "1");
int rowspan;
if (!int.TryParse(att, out rowspan))
{
return 1;
}
return rowspan;
}
示例3: GetSpan
/// <summary>
/// Gets the span attribute of the tag of the specified box
/// </summary>
/// <param name="b"></param>
private int GetSpan(CssBox b)
{
float f = CssValue.ParseNumber(b.GetAttribute("span"), 1);
return Math.Max(1, Convert.ToInt32(f));
}
示例4: GetColSpan
/// <summary>
/// Gets the colspan of the specified box
/// </summary>
/// <param name="b"></param>
private int GetColSpan(CssBox b)
{
string att = b.GetAttribute("colspan", "1");
int colspan;
if (!int.TryParse(att, out colspan))
{
return 1;
}
return colspan;
}