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 ExecPaste() { CurrentCodeFileDocument.Paste(true); }
public void ExecCopy() { CurrentCodeFileDocument.Copy(); }
public void ExecCut() { CurrentCodeFileDocument.Cut(); }
public void OpenFileWithForm() { OpenFile(null, null); CurrentCodeFileDocument.AddDesigner(null); }