/// <summary> /// Default Constructor /// </summary> public TuringMachineForm() { InitializeComponent(); inpt = new Interpreter(); txtSource.Font = new Font("Courier New", 9); cboPreset.SelectedIndex = 0; grpSourceCode.Text = String.Format("Source Code (Ctrl + E to input \"{0}\", Ctrl + D for \"{1}\")", Interpreter.SYMBOL_SMDELTA, TuringMachine.SYMBOL_START); }
/// <summary> /// Start Machine /// </summary> /// <param name="text"></param> public void StartMachine(string text) { lblTMGui.SetText(text); txtResult.BackColor = txtState.BackColor; txtResult.ForeColor = Color.Black; txtResult.Text = ""; inpt = new Interpreter(); foreach (string ss in txtSource.Text.Replace("\r\n", "\n").Split('\n')) { inpt.AddStatement(ss); } StateChanged(true); tmrInterpret.Enabled = true; }