public void Stop() { Running = false; SetStartButtonText("Start"); if (this.Worker != null) { this.Worker.Join(); this.Worker = null; } CommandsDisplay.Hide(); CommandsInput.Show(); }
public void Start() { if (CommandsInput.TextLength > 1) { Running = true; SetStartButtonText("Stop"); this.Worker = new Thread(new ThreadStart(this.ExecuteCommands)); this.Worker.IsBackground = true; this.Worker.Start(); CommandsInput.Hide(); CommandsDisplay.Show(); } }