Changeset 24 for trunk/Forms/UMainForm.pas
- Timestamp:
- Feb 13, 2012, 7:28:45 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UMainForm.pas
r23 r24 21 21 AAbout: TAction; 22 22 ABreakpointToggle: TAction; 23 AGenerateNumber: TAction; 23 24 AShrinkSource: TAction; 24 25 AFormatSource: TAction; … … 65 66 MenuItem26: TMenuItem; 66 67 MenuItem27: TMenuItem; 68 MenuItem28: TMenuItem; 69 MenuItem29: TMenuItem; 67 70 MenuItemOpenRecent: TMenuItem; 68 71 MenuItemTarget: TMenuItem; … … 95 98 procedure AExitExecute(Sender: TObject); 96 99 procedure AFormatSourceExecute(Sender: TObject); 100 procedure AGenerateNumberExecute(Sender: TObject); 97 101 procedure AOptionsExecute(Sender: TObject); 98 102 procedure AProgramPauseExecute(Sender: TObject); … … 152 156 UCompilerDelphi, UCompilerPHP; 153 157 158 resourcestring 159 SEnterNumber = 'Enter number'; 160 SNumberGeneration = 'Number generation'; 161 154 162 { TMainForm } 155 163 … … 316 324 procedure TMainForm.AProgramRunExecute(Sender: TObject); 317 325 begin 326 InterpreterForm.LastStepCounter := 0; 318 327 InterpreterForm.Show; 319 328 BrainFuckInterpreter.Input := InterpreterForm.MemoInput.Lines.Text; … … 388 397 end; 389 398 399 procedure TMainForm.AGenerateNumberExecute(Sender: TObject); 400 var 401 NumberText: string; 402 Number: Integer; 403 I: Integer; 404 begin 405 NumberText := InputBox(SNumberGeneration, SEnterNumber, '1'); 406 if TryStrToInt(NumberText, Number) then begin 407 NumberText := ''; 408 for I := 0 to Number - 1 do 409 NumberText := NumberText + '+'; 410 MemoSource.Text := MemoSource.Text + NumberText; 411 end; 412 end; 413 390 414 procedure TMainForm.AOptionsExecute(Sender: TObject); 391 415 begin … … 458 482 MemoSource.Lines.SaveToFile(UTF8Decode(SaveDialog1.FileName)); 459 483 ProjectFileName := SaveDialog1.FileName; 484 LastOpenedList.Add(SaveDialog1.FileName); 460 485 Modified := False; 461 486 UpdateInterface;
Note:
See TracChangeset
for help on using the changeset viewer.