本文整理汇总了C#中Region.GetRegionClass方法的典型用法代码示例。如果您正苦于以下问题:C# Region.GetRegionClass方法的具体用法?C# Region.GetRegionClass怎么用?C# Region.GetRegionClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Region
的用法示例。
在下文中一共展示了Region.GetRegionClass方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Layout
public override Status Layout(Area area, Region region)
{
int numChildren = this.children.Count;
string regionClass = "none";
if (region != null)
{
regionClass = region.GetRegionClass();
}
else
{
if (GetFlowName().Equals("xsl-region-before"))
{
regionClass = RegionBefore.REGION_CLASS;
}
else if (GetFlowName().Equals("xsl-region-after"))
{
regionClass = RegionAfter.REGION_CLASS;
}
else if (GetFlowName().Equals("xsl-region-start"))
{
regionClass = RegionStart.REGION_CLASS;
}
else if (GetFlowName().Equals("xsl-region-end"))
{
regionClass = RegionEnd.REGION_CLASS;
}
}
if (area is AreaContainer)
{
((AreaContainer)area).setAreaName(regionClass);
}
area.setAbsoluteHeight(0);
SetContentWidth(area.getContentWidth());
for (int i = 0; i < numChildren; i++)
{
FObj fo = (FObj)children[i];
Status status;
if ((status = fo.Layout(area)).isIncomplete())
{
FonetDriver.ActiveDriver.FireFonetWarning(
"Some static content could not fit in the area.");
this.marker = i;
if ((i != 0) && (status.getCode() == Status.AREA_FULL_NONE))
{
status = new Status(Status.AREA_FULL_SOME);
}
return (status);
}
}
ResetMarker();
return new Status(Status.OK);
}
示例2: addRegion
protected internal void addRegion(Region region)
{
if (_regions.ContainsKey(region.GetRegionClass()))
{
throw new FonetException("Only one region of class "
+ region.GetRegionClass()
+ " allowed within a simple-page-master.");
}
else
{
_regions.Add(region.GetRegionClass(), region);
}
}