本文整理汇总了C#中Text.ParseBool方法的典型用法代码示例。如果您正苦于以下问题:C# Text.ParseBool方法的具体用法?C# Text.ParseBool怎么用?C# Text.ParseBool使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Text
的用法示例。
在下文中一共展示了Text.ParseBool方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ParseInternalVariable
protected override bool ParseInternalVariable(string name, Text.idScriptParser parser)
{
string nameLower = name.ToLower();
if(nameLower == "maxchars")
{
_maxChars = parser.ParseInteger();
}
else if(nameLower == "numeric")
{
_numeric = parser.ParseBool();
}
else if(nameLower == "wrap")
{
_wrap = parser.ParseBool();
}
else if(nameLower == "readonly")
{
_readOnly = parser.ParseBool();
}
else if(nameLower == "forcescroll")
{
_forceScroll = parser.ParseBool();
}
else if(nameLower == "source")
{
_sourceFile = ParseString(parser);
}
else if(nameLower == "password")
{
_password.Set(parser.ParseBool());
}
else if(nameLower == "cvarmax")
{
_cvarMax = parser.ParseInteger();
}
else
{
return base.ParseInternalVariable(name, parser);
}
return true;
}
示例2: ParseInternalVariable
protected override bool ParseInternalVariable(string name, Text.idScriptParser parser)
{
string nameLower = name.ToLower();
if(nameLower == "horizontal")
{
_horizontal = parser.ParseBool();
}
else if(nameLower == "listname")
{
_listName = ParseString(parser);
}
else if(nameLower == "tabstops")
{
_tabStopString = ParseString(parser);
}
else if(nameLower == "tabaligns")
{
_tabAlignString = ParseString(parser);
}
else if(nameLower == "multiplesel")
{
_multipleSelection = parser.ParseBool();
}
else if(nameLower == "tabvaligns")
{
_tabVerticalAlignString = ParseString(parser);
}
else if(nameLower == "tabtypes")
{
_tabTypeString = ParseString(parser);
}
else if(nameLower == "tabiconsizes")
{
_tabIconSizeString = ParseString(parser);
}
else if(nameLower == "tabiconvoffset")
{
_tabIconVerticalOffsetString = ParseString(parser);
}
else if(nameLower.StartsWith("mtr_") == true)
{
string materialName = ParseString(parser);
idMaterial material = idE.DeclManager.FindMaterial(materialName);
material.ImageClassification = 1; // just for resource tracking
if((material != null) && (material.TestMaterialFlag(MaterialFlags.Defaulted) == false))
{
material.Sort = (float) MaterialSort.Gui;
}
_iconMaterials.Add(name, material);
}
else
{
return base.ParseInternalVariable(name, parser);
}
return true;
}
示例3: ParseInternalVariable
protected override bool ParseInternalVariable(string name, Text.idScriptParser parser)
{
string nameLower = name.ToLower();
if((nameLower == "stepsize") || (nameLower == "step"))
{
_stepSize = parser.ParseFloat();
}
else if(nameLower == "low")
{
_low = parser.ParseFloat();
}
else if(nameLower == "high")
{
_high = parser.ParseFloat();
}
else if(nameLower == "vertical")
{
_vertical = parser.ParseBool();
}
else if(nameLower == "verticalflip")
{
_verticalFlip = parser.ParseBool();
}
else if(nameLower == "scrollbar")
{
_scrollBar = parser.ParseBool();
}
else if(nameLower == "thumbshader")
{
_thumbMaterialName = ParseString(parser);
idE.DeclManager.FindMaterial(_thumbMaterialName);
}
else
{
return base.ParseInternalVariable(name, parser);
}
return true;
}