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(); }
public void CompilerConsoleScrolToEnd() { CompilerConsole.SelectionStart = CompilerConsole.Text.Length; CompilerConsole.ScrollToCaret(); }