From 38ab4e570842ed866f70781d8b4f7375fb2ae92b Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 5 Feb 2017 13:09:28 -0500 Subject: [PATCH] #51 - DevX seizure Added a wait in the TextType() method so that it doesn't fire until the current call finishes. --- ShiftOS.WinForms/Oobe.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ShiftOS.WinForms/Oobe.cs b/ShiftOS.WinForms/Oobe.cs index 2b5ac7d..bcb2ef9 100644 --- a/ShiftOS.WinForms/Oobe.cs +++ b/ShiftOS.WinForms/Oobe.cs @@ -63,16 +63,24 @@ namespace ShiftOS.WinForms int hackeffect; int percentcount; + private bool typing = false; public void TextType(string texttotype) { + while(typing == true) + { + + } + charcount = texttotype.Length; gtexttotype = texttotype; currentletter = 0; slashcount = 1; foreach (var c in gtexttotype) { + typing = true; rtext += c; + this.Invoke(new Action(() => { textgeninput.Text = rtext + "|"; @@ -82,6 +90,7 @@ namespace ShiftOS.WinForms slashcount = 1; } rtext += Environment.NewLine; + typing = false; } public Save MySave = null;