예제 #1
0
 public void ShowCommand(int id, TuringMachine.Command command)
 {
     lvCommands.Items.Add(new ListViewItem(
             new string[] {
                 "",
                 id.ToString(),
                 command.ToString()
             }
         ));
 }
예제 #2
0
 private void tmMachine_StepPerformed(object sender, TuringMachine.StepPerformedEventArgs e)
 {
     lblStepsPerformedValue.Text = (int.Parse(lblStepsPerformedValue.Text) + 1).ToString();
 }
예제 #3
0
 private void tmMachine_SelectedCellIdChanged(object sender, TuringMachine.SelectedCellIdChangedEventArgs e)
 {
     if(e.SelectedCellId < thTape.Cells.Count)
     {
         thTape.SelectedCellId = e.SelectedCellId;
     }
 }
예제 #4
0
 private void tmMachine_StateChanged(object sender, TuringMachine.StateChangedEventArgs e)
 {
     lblStateValue.Text = e.State.ToString();
 }
예제 #5
0
 private void tmMachine_ProgramStarted(object sender, TuringMachine.ProgramStartedEventArgs e)
 {
     lblMaxStepsValue.Text = e.MaxSteps.ToString();
 }