aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Controls/TerminalBox.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-05-27 16:59:54 -0400
committerMichael <[email protected]>2017-05-27 16:59:54 -0400
commite841b168e13e0bd699c0e0d19857167aa725f1ca (patch)
tree6d8754bbf66fcc52e80d4d0bf642d919c5a41aee /ShiftOS.WinForms/Controls/TerminalBox.cs
parentfde832b35763443afdc57dc8a5d82fb3bb25009b (diff)
downloadshiftos_thereturn-e841b168e13e0bd699c0e0d19857167aa725f1ca.tar.gz
shiftos_thereturn-e841b168e13e0bd699c0e0d19857167aa725f1ca.tar.bz2
shiftos_thereturn-e841b168e13e0bd699c0e0d19857167aa725f1ca.zip
stuff
Diffstat (limited to 'ShiftOS.WinForms/Controls/TerminalBox.cs')
-rw-r--r--ShiftOS.WinForms/Controls/TerminalBox.cs11
1 files changed, 5 insertions, 6 deletions
diff --git a/ShiftOS.WinForms/Controls/TerminalBox.cs b/ShiftOS.WinForms/Controls/TerminalBox.cs
index a6dd610..7658c8c 100644
--- a/ShiftOS.WinForms/Controls/TerminalBox.cs
+++ b/ShiftOS.WinForms/Controls/TerminalBox.cs
@@ -63,15 +63,12 @@ namespace ShiftOS.WinForms.Controls
public void Write(string text)
{
- Thread.Sleep(5);
- this.SuspendLayout();
this.HideSelection = true;
this.SelectionFont = ConstructFont();
this.SelectionColor = ControlManager.ConvertColor(ConsoleEx.ForegroundColor);
this.SelectionBackColor = ControlManager.ConvertColor(ConsoleEx.BackgroundColor);
this.AppendText(Localization.Parse(text));
this.HideSelection = false;
- this.ResumeLayout();
}
private Font ConstructFont()
@@ -89,8 +86,6 @@ namespace ShiftOS.WinForms.Controls
public void WriteLine(string text)
{
- Thread.Sleep(5);
- this.SuspendLayout();
Engine.AudioManager.PlayStream(Properties.Resources.writesound);
this.HideSelection = true;
this.Select(this.TextLength, 0);
@@ -99,11 +94,12 @@ namespace ShiftOS.WinForms.Controls
this.SelectionBackColor = ControlManager.ConvertColor(ConsoleEx.BackgroundColor);
this.AppendText(Localization.Parse(text) + Environment.NewLine);
this.HideSelection = false;
- this.ResumeLayout();
}
bool quickCopying = false;
+ bool busy = false;
+
protected override void OnMouseDown(MouseEventArgs e)
{
//if right-clicking, then we initiate a quick-copy.
@@ -255,8 +251,11 @@ namespace ShiftOS.WinForms.Controls
}
}
+ public string ThreadId = "";
+
public TerminalBox() : base()
{
+ ThreadId = Thread.CurrentThread.ManagedThreadId.ToString();
this.Tag = "keepbg keepfg keepfont";
}
}