Added advanced output window
This commit is contained in:
parent
a401d4e09d
commit
eff337c2f1
@ -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<string>(_AppendText), e.Text);
|
||||
wndOutputWindow.Invoke(new Action<string>(_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<string>(_ClearText));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -47,6 +47,12 @@
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Controls\OutputWindow.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\OutputWindow.Designer.cs">
|
||||
<DependentUpon>OutputWindow.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="LocalConfiguration.cs" />
|
||||
<Compile Include="Controls\ErrorList.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
@ -189,6 +195,9 @@
|
||||
<EmbeddedResource Include="Controls\ErrorList.resx">
|
||||
<DependentUpon>ErrorList.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\OutputWindow.resx">
|
||||
<DependentUpon>OutputWindow.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\SolutionExplorer.resx">
|
||||
<DependentUpon>SolutionExplorer.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user