Changeset 18 for trunk/UInterpreterForm.pas
- Timestamp:
- Feb 11, 2012, 9:32:25 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UInterpreterForm.pas
r12 r18 22 22 Label4: TLabel; 23 23 Label6: TLabel; 24 Label7: TLabel; 24 25 LabelStepCounter: TLabel; 25 26 LabelProgramPointer: TLabel; 26 27 Label5: TLabel; 27 28 LabelMemoryPointer: TLabel; 29 LabelStepSpeed: TLabel; 28 30 ListViewMemory: TListView; 29 31 MemoInput: TMemo; … … 44 46 ToolButton6: TToolButton; 45 47 ToolButton7: TToolButton; 48 procedure FormHide(Sender: TObject); 49 procedure FormShow(Sender: TObject); 46 50 procedure ListViewMemoryData(Sender: TObject; Item: TListItem); 47 51 procedure MemoInputKeyPress(Sender: TObject; var Key: char); 48 52 procedure Timer1Timer(Sender: TObject); 49 53 private 50 { private declarations }54 LastStepCounter: Integer; 51 55 public 52 56 procedure RefreshListViewMemory; … … 64 68 {$R *.lfm} 65 69 70 resourcestring 71 SStepsPerSecond = ' steps/s'; 72 66 73 { TInterpreterForm } 67 74 … … 71 78 LabelMemoryPointer.Caption := IntToStr(MainForm.BrainFuckInterpreter.MemoryPosition); 72 79 LabelStepCounter.Caption := IntToStr(MainForm.BrainFuckInterpreter.StepCount); 80 LabelStepSpeed.Caption := IntToStr(MainForm.BrainFuckInterpreter.StepCount - LastStepCounter) + SStepsPerSecond; 81 LastStepCounter := MainForm.BrainFuckInterpreter.StepCount; 73 82 RefreshListViewMemory; 74 83 MemoOutput.Lines.Text := MainForm.BrainFuckInterpreter.Output; … … 101 110 end; 102 111 112 procedure TInterpreterForm.FormHide(Sender: TObject); 113 begin 114 Timer1.Enabled := False; 115 end; 116 117 procedure TInterpreterForm.FormShow(Sender: TObject); 118 begin 119 Timer1.Enabled := True; 120 end; 121 103 122 procedure TInterpreterForm.MemoInputKeyPress(Sender: TObject; var Key: char); 104 123 begin
Note:
See TracChangeset
for help on using the changeset viewer.