#51 - DevX seizure

Added a wait in the TextType() method so that it doesn't fire until the
current call finishes.
This commit is contained in:
Michael 2017-02-05 13:09:28 -05:00
parent 4b46d338c0
commit 38ab4e5708

View file

@ -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;