本文整理汇总了C#中PascalABCCompiler.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# PascalABCCompiler.ToString方法的具体用法?C# PascalABCCompiler.ToString怎么用?C# PascalABCCompiler.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PascalABCCompiler
的用法示例。
在下文中一共展示了PascalABCCompiler.ToString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Compiler_OnChangeCompilerState
void Compiler_OnChangeCompilerState(PascalABCCompiler.ICompiler sender, PascalABCCompiler.CompilerState State, string FileName)
{
States += State.ToString();
if (FileName != null)
States += " "+System.IO.Path.GetFileName(FileName);
States += Environment.NewLine;
switch (State)
{
case PascalABCCompiler.CompilerState.CompilationStarting:
FileNames.Clear();
States = "";
break;
case PascalABCCompiler.CompilerState.BeginCompileFile:
FileNames.Add(FileName);
break;
case PascalABCCompiler.CompilerState.ReadPCUFile:
FileNames.Add(FileName);
FileNames.Add(System.IO.Path.ChangeExtension(FileName,".pas"));
break;
case PascalABCCompiler.CompilerState.Ready:
foreach (PascalABCCompiler.Errors.Error error in VisualEnvironmentCompiler.Compiler.ErrorsList)
if (error is PascalABCCompiler.Errors.CompilerInternalError)
{
ReportText = DateTime.Now.ToString() + Environment.NewLine;
ReportText += GetInfo()+Environment.NewLine;
ReportText += "StatesList: " + Environment.NewLine + States + Environment.NewLine;
for (int i = 0; i < VisualEnvironmentCompiler.Compiler.ErrorsList.Count; i++)
ReportText += string.Format("Error[{0}]: {1}{2}", i, VisualEnvironmentCompiler.Compiler.ErrorsList[i].ToString(),Environment.NewLine);
CompilerInternalErrorReport.ErrorMessage.Text = error.ToString();
CompilerInternalErrorReport.ReportText = ReportText;
CompilerInternalErrorReport.FileNames = FileNames;
CompilerInternalErrorReport.VEC = VisualEnvironmentCompiler;
CompilerInternalErrorReport.ShowDialog();
return;
}
break;
}
}
示例2: Compiler_OnChangeCompilerState
void Compiler_OnChangeCompilerState(PascalABCCompiler.ICompiler sender, PascalABCCompiler.CompilerState State, string FileName)
{
string text;
if (State == PascalABCCompiler.CompilerState.CompilationStarting || State == PascalABCCompiler.CompilerState.Reloading)
{
//CompilerConsole.Clear();
dt = DateTime.Now;
if (OnRebuld.Checked)
VisualEnvironmentCompiler.Compiler.CompilerOptions.Rebuild = true;
}
text = State.ToString();
if (FileName != null)
text += " " + System.IO.Path.GetFileName(FileName) + "...";
if (State == PascalABCCompiler.CompilerState.Ready)
{
if (VisualEnvironmentCompiler.Compiler.ErrorsList.Count > 0)
text += string.Format(" [{0} errors]", VisualEnvironmentCompiler.Compiler.ErrorsList.Count);
text += string.Format(" [{0}ms]", (int)(DateTime.Now - dt).TotalMilliseconds);
if (sender == VisualEnvironmentCompiler.RemoteCompiler)
text += string.Format(Environment.NewLine+"WorkingSet {0}", VisualEnvironmentCompiler.RemoteCompiler.RemoteCompilerWorkingSet/1024/1024);
NoSavePCU.Checked = !VisualEnvironmentCompiler.Compiler.InternalDebug.PCUGenerate;
NoSemantic.Checked = !VisualEnvironmentCompiler.Compiler.InternalDebug.SemanticAnalysis;
NoCodeGeneration.Checked = !VisualEnvironmentCompiler.Compiler.InternalDebug.CodeGeneration;
NoAddStandartUnits.Checked = !VisualEnvironmentCompiler.Compiler.InternalDebug.AddStandartUnits;
NoSkipPCUErrors.Checked = !VisualEnvironmentCompiler.Compiler.InternalDebug.SkipPCUErrors;
NoSkipInternalErrorsIfSyntaxTreeIsCorrupt.Checked = !VisualEnvironmentCompiler.Compiler.InternalDebug.SkipInternalErrorsIfSyntaxTreeIsCorrupt;
NoIncludeDebugInfoInPCU.Checked = !VisualEnvironmentCompiler.Compiler.InternalDebug.IncludeDebugInfoInPCU;
cbUseStandarParserForInellisense.Checked = VisualEnvironmentCompiler.Compiler.InternalDebug.UseStandarParserForIntellisense;
//OnRebuld.Checked = VisualEnvironmentCompiler.Compiler.CompilerOptions.Rebuild;
}
text += Environment.NewLine;
if (sender.CompilerType == PascalABCCompiler.CompilerType.Remote)
text = "[remote]" + text;
CompilerConsole.AppendText(text);
CompilerConsole.SelectionStart = CompilerConsole.Text.Length;
CompilerConsole.ScrollToCaret();
}