本文整理匯總了C#中MinorShift.Emuera.GameData.Expression.ExpressionMediator.ConvertStringType方法的典型用法代碼示例。如果您正苦於以下問題:C# ExpressionMediator.ConvertStringType方法的具體用法?C# ExpressionMediator.ConvertStringType怎麽用?C# ExpressionMediator.ConvertStringType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MinorShift.Emuera.GameData.Expression.ExpressionMediator
的用法示例。
在下文中一共展示了ExpressionMediator.ConvertStringType方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: DoInstruction
public override void DoInstruction(ExpressionMediator exm, InstructionLine func, ProcessState state)
{
exm.Console.UseUserStyle = !func.Function.IsPrintDFunction();
string str = null;
if (func.Argument.IsConst)
str = func.Argument.ConstStr;
else if (isPrintV)
{
StringBuilder builder = new StringBuilder();
IOperandTerm[] terms = ((SpPrintVArgument)func.Argument).Terms;
foreach (IOperandTerm termV in terms)
{
if (termV.GetOperandType() == typeof(Int64))
builder.Append(termV.GetIntValue(exm).ToString());
else
builder.Append(termV.GetStrValue(exm));
}
str = builder.ToString();
}
else
{
str = ((ExpressionArgument)func.Argument).Term.GetStrValue(exm);
if (isForms)
{
str = exm.CheckEscape(str);
StrFormWord wt = LexicalAnalyzer.AnalyseFormattedString(new StringStream(str), FormStrEndWith.EoL, false);
StrForm strForm = StrForm.FromWordToken(wt);
str = strForm.GetString(exm);
}
}
if (func.Function.IsPrintKFunction())
str = exm.ConvertStringType(str);
if (isC)
exm.Console.PrintC(str, true);
else if (isLC)
exm.Console.PrintC(str, false);
else
exm.OutputToConsole(str, func.Function);
exm.Console.UseUserStyle = true;
}