本文整理汇总了C#中IProperties.GetInt方法的典型用法代码示例。如果您正苦于以下问题:C# IProperties.GetInt方法的具体用法?C# IProperties.GetInt怎么用?C# IProperties.GetInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IProperties
的用法示例。
在下文中一共展示了IProperties.GetInt方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ImageBorderMargin
public ImageBorderMargin(IProperties properties)
{
_width = properties.GetInt(WIDTH, 0);
_height = properties.GetInt(HEIGHT, 0);
int calcCount = properties.GetInt(COUNT, 0);
_calculations = new List<BorderCalculation>(calcCount);
for (int i = 0; i < calcCount; i++)
{
string prefix = CALC + i.ToString(CultureInfo.InvariantCulture);
_calculations.Add(new BorderCalculation(
properties.GetInt(prefix + WIDTH_ADD, 0),
properties.GetInt(prefix + HEIGHT_ADD, 0),
properties.GetFloat(prefix + WIDTH_FACTOR, 1f),
properties.GetFloat(prefix + HEIGHT_FACTOR, 1f)));
}
}
示例2: GetDefaultImageSize
public static Size GetDefaultImageSize(IProperties settings)
{
ImageSizeName boundsSize = GetDefaultBoundsSizeName(settings);
Size defaultBoundsSize;
if (boundsSize != ImageSizeName.Custom)
defaultBoundsSize = ImageSizeHelper.GetSizeConstraints(boundsSize);
else
{
int defaultWidth = settings.GetInt(DEFAULT_WIDTH, 240);
int defaultHeight = settings.GetInt(DEFAULT_HEIGHT, 240);
defaultBoundsSize = new Size(defaultWidth, defaultHeight);
}
return defaultBoundsSize;
}
示例3: GetImageMargin
public static MarginStyle GetImageMargin(IProperties props)
{
if (props.GetBoolean(CUSTOM_MARGIN, false))
{
int top = props.GetInt(MARGIN_TOP, WriterDefaultMargin.Top);
int right = props.GetInt(MARGIN_RIGHT, WriterDefaultMargin.Right);
int bottom = props.GetInt(MARGIN_BOTTOM, WriterDefaultMargin.Bottom);
int left = props.GetInt(MARGIN_LEFT, WriterDefaultMargin.Left);
return new MarginStyle(top, right, bottom, left, StyleSizeUnit.PX);
}
else
{
return WriterDefaultMargin;
}
}