本文整理汇总了C#中IResourceResolver.LocalizeString方法的典型用法代码示例。如果您正苦于以下问题:C# IResourceResolver.LocalizeString方法的具体用法?C# IResourceResolver.LocalizeString怎么用?C# IResourceResolver.LocalizeString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IResourceResolver
的用法示例。
在下文中一共展示了IResourceResolver.LocalizeString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Item
internal Item(ImageComparer imageComparer, bool reverse)
{
_resourceResolver = new ResourceResolver(imageComparer.GetType(), false);
_description = imageComparer.Description;
Name = imageComparer.Name;
IsReverse = reverse;
_realDescription = !IsReverse
? _resourceResolver.LocalizeString(_description)
: string.Format(SR.FormatSortByReverse, _resourceResolver.LocalizeString(_description));
Comparer = imageComparer.GetComparer(reverse);
}
示例2: GetLocalizedCustomMessage
/// <summary>
/// Gets the custom message localized according to the specified resource resolver.
/// </summary>
protected string GetLocalizedCustomMessage(IResourceResolver resourceResolver)
{
return string.IsNullOrEmpty(_message) ? null : resourceResolver.LocalizeString(_message);
}
示例3: Folder
/// <summary>
/// Constructor
/// </summary>
protected Folder()
{
_resourceResolver = new ResourceResolver(this.GetType(), true);
// Initialize folder Path
var pathAttrib = AttributeUtils.GetAttribute<FolderPathAttribute>(this.GetType());
if (pathAttrib != null)
{
_folderPath = new Path(pathAttrib.Path, _resourceResolver);
_startExpanded = pathAttrib.StartExpanded;
}
// Initialize tooltip
var attrib = AttributeUtils.GetAttribute<FolderDescriptionAttribute>(this.GetType());
if (attrib != null)
{
this.Tooltip = _resourceResolver.LocalizeString(attrib.Description);
}
}