/// <summary> /// Adds a line of <paramref name="text"/> to RAD Projects Extension output pane /// </summary> /// <param name="text">Text to be added to the output</param> /// <param name="activate">If true, the pane is activated (brought to front)</param> public void Output(string text, bool activate = false) { ThreadHelper.ThrowIfNotOnUIThread(); OutputWindow.OutputString(text + Environment.NewLine); if (activate) { OutputWindow.Activate(); // Brings output pane into view } }
void AddTextToOutputWindow(string ExeFileName, string Text) { //if ((DateTime.Now - dt).TotalSeconds >= 1) // Application.DoEvents() ExeFileName = Tools.FileNameToLower(ExeFileName); if (WorkbenchStorage.SetCurrentTabPageIfWriteToOutputWindow) { WorkbenchStorage.SetCurrentTabPageIfWriteToOutputWindow = false; CurrentCodeFileDocument = WorkbenchServiceFactory.RunService.GetRunTab(ExeFileName) as CodeFileDocumentControl; } BottomTabsVisible = true; if (BottomActiveContent != OutputWindow) { OutputWindow.Activate(); CurrentCodeFileDocument.Activate(); OutputWindow.Activate(); } TextBoxBase textBox = OutputTextBoxs[WorkbenchServiceFactory.RunService.GetRunTab(ExeFileName) as CodeFileDocumentControl]; textBox.BeginInvoke(new AppendTextInternalAsyncDelegate(AppendTextInternalAsync), textBox, Text); if (textBox == OutputWindow.outputTextBox) { OutputWindow.OutputTextBoxScrolToEnd(); } if (WorkbenchServiceFactory.DebuggerManager.IsRun(ExeFileName)) { for (int i = 0; i < TabStack.Count; i++) { TextBoxBase tb = OutputTextBoxs[TabStack[i]]; if (textBox != tb) { tb.BeginInvoke(new AppendTextInternalAsyncDelegate(AppendTextInternalAsync), tb, Text); } } } if (!WorkbenchServiceFactory.RunService.IsRun(ExeFileName)) { SetFocusToEditor(); } }
public void ParagraphReporting(Paragraph results) { if (isOutputShown) { mOutput.Activate(); mTextBox = mOutput.outputWindow; fd = mOutput.outputWindow.Document; } else { mOutput = new OutputWindow(); mOutput.Owner = MainWindow; mOutput.Closed += setWindowToFalse; mOutput.Show(); isOutputShown = true; RichTextBox mTextBox = mOutput.outputWindow; FlowDocument fd = mOutput.outputWindow.Document; } fd.Blocks.Add(results); mOutput.outputWindow.ScrollToEnd(); mOutput.Scroller.ScrollToEnd(); }
public static void ActiveOutputWindow() { OutputWindow.Activate(); }