aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Controls
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.WinForms/Controls')
-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";
}
}