本文整理汇总了C#中StringDictionary.TryGetValue方法的典型用法代码示例。如果您正苦于以下问题:C# StringDictionary.TryGetValue方法的具体用法?C# StringDictionary.TryGetValue怎么用?C# StringDictionary.TryGetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringDictionary
的用法示例。
在下文中一共展示了StringDictionary.TryGetValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ResolveStrings
public void ResolveStrings(StringDictionary StringResources, bool RaiseChangedEvent)
{
string skill_name;
string skill_description;
StringResources.TryGetValue(skillNameID, out skill_name);
StringResources.TryGetValue(skillDescriptionID, out skill_description);
if (RaiseChangedEvent)
{
if (skill_name != null) SkillName = skill_name;
else SkillName = String.Empty;
if (skill_description != null) SkillDescription = skill_description;
else SkillDescription = String.Empty;
}
else
{
if (skill_name != null) skillName = skill_name;
else skillName = String.Empty;
if (skill_description != null) skillDescription = skill_description;
else skillDescription = String.Empty;
}
}
示例2: ResolveStrings
public void ResolveStrings(StringDictionary StringResources, bool RaiseChangedEvent)
{
string res_name;
string res_mainoverlayname;
StringResources.TryGetValue(nameRID, out res_name);
StringResources.TryGetValue(overlayFileRID, out res_mainoverlayname);
if (RaiseChangedEvent)
{
if (res_name != null) Name = res_name;
else Name = String.Empty;
if (res_mainoverlayname != null) OverlayFile = res_mainoverlayname;
else OverlayFile = String.Empty;
}
else
{
if (res_name != null) name = res_name;
else name = String.Empty;
if (res_mainoverlayname != null) overlayFile = res_mainoverlayname;
else overlayFile = String.Empty;
}
foreach (SubOverlay obj in subOverlays)
obj.ResolveStrings(StringResources, RaiseChangedEvent);
foreach (SubOverlay obj in motionSubOverlays)
obj.ResolveStrings(StringResources, RaiseChangedEvent);
}
示例3: ResolveStrings
public void ResolveStrings(StringDictionary StringResources, bool RaiseChangedEvent)
{
string res_name;
StringResources.TryGetValue(resourceID, out res_name);
if (RaiseChangedEvent)
{
if (res_name != null) ResourceName = res_name;
else ResourceName = String.Empty;
}
else
{
if (res_name != null) resourceName = res_name;
else resourceName = String.Empty;
}
}
示例4: AddErrorForInput
private void AddErrorForInput(StringDictionary errors, string input, string template, params object[] args)
{
string msg = string.Format(template, args);
string tmpInputs;
errors.TryGetValue(msg, out tmpInputs);
errors[msg] = tmpInputs + input + " ";
}
示例5: ResolveStrings
public void ResolveStrings(StringDictionary StringResources, bool RaiseChangedEvent)
{
string res_mainoverlayname;
StringResources.TryGetValue(overlayFileRID, out res_mainoverlayname);
if (RaiseChangedEvent)
{
if (res_mainoverlayname != null) OverlayFile = res_mainoverlayname;
else OverlayFile = String.Empty;
}
else
{
if (res_mainoverlayname != null) overlayFile = res_mainoverlayname;
else overlayFile = String.Empty;
}
}