From eff337c2f1836a3803be0037a7cfa63dffd43346 Mon Sep 17 00:00:00 2001 From: alcexhim Date: Thu, 12 Jun 2014 12:52:47 -0400 Subject: [PATCH] Added advanced output window --- .../MainWindow.cs | 26 ++++++++----------- ...ace.WindowsForms.DesktopApplication.csproj | 9 +++++++ 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.cs b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.cs index 5b3208bd..97ed6625 100644 --- a/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.cs +++ b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/MainWindow.cs @@ -28,7 +28,7 @@ namespace UniversalEditor.UserInterface.WindowsForms private DockingWindow dwToolbox = null; - private TextBox txtOutputWindow = null; + private Controls.OutputWindow wndOutputWindow = null; private DockingWindow dwOutput = null; #endregion @@ -115,15 +115,7 @@ namespace UniversalEditor.UserInterface.WindowsForms dwToolbox.Behavior = DockBehavior.AutoHide; #region Message Log - txtOutputWindow = new TextBox(); - txtOutputWindow.ReadOnly = true; - txtOutputWindow.Dock = DockStyle.Fill; - txtOutputWindow.Font = new System.Drawing.Font(System.Drawing.FontFamily.GenericMonospace, 10, FontStyle.Regular); - txtOutputWindow.ScrollBars = ScrollBars.Vertical; - txtOutputWindow.Multiline = true; - txtOutputWindow.BackColor = AwesomeControls.Theming.Theme.CurrentTheme.ColorTable.CommandBarControlBackground; - txtOutputWindow.ForeColor = AwesomeControls.Theming.Theme.CurrentTheme.ColorTable.CommandBarControlText; - dwOutput = dcc.Windows.Add("Output", txtOutputWindow); + dwOutput = dcc.Windows.Add("Output", wndOutputWindow); dcc.Areas[DockPosition.Center].Areas[DockPosition.Bottom].Windows.Add(dwOutput); #endregion #region Error List @@ -149,21 +141,25 @@ namespace UniversalEditor.UserInterface.WindowsForms private void _AppendText(string text) { - txtOutputWindow.AppendText(text); + wndOutputWindow.AppendText(text); + } + private void _ClearText(string text) + { + wndOutputWindow.ClearText(); } private void OutputWindow_TextWritten(object sender, TextWrittenEventArgs e) { - if (txtOutputWindow != null) + if (wndOutputWindow != null) { - txtOutputWindow.Invoke(new Action(_AppendText), e.Text); + wndOutputWindow.Invoke(new Action(_AppendText), e.Text); } } private void OutputWindow_TextCleared(object sender, EventArgs e) { - if (txtOutputWindow != null) + if (wndOutputWindow != null) { - txtOutputWindow.Text = String.Empty; + wndOutputWindow.Invoke(new Action(_ClearText)); } } diff --git a/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/UniversalEditor.UserInterface.WindowsForms.DesktopApplication.csproj b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/UniversalEditor.UserInterface.WindowsForms.DesktopApplication.csproj index 9a5f62f1..a4d504df 100644 --- a/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/UniversalEditor.UserInterface.WindowsForms.DesktopApplication.csproj +++ b/CSharp/Environments/WindowsForms/Engines/UniversalEditor.UserInterface.WindowsForms.DesktopApplication/UniversalEditor.UserInterface.WindowsForms.DesktopApplication.csproj @@ -47,6 +47,12 @@ + + UserControl + + + OutputWindow.cs + UserControl @@ -189,6 +195,9 @@ ErrorList.cs + + OutputWindow.cs + SolutionExplorer.cs