Changeset 24 for trunk/Forms


Ignore:
Timestamp:
Feb 13, 2012, 7:28:45 AM (13 years ago)
Author:
chronos
Message:
  • Added: Tool for number generation using '+' symbol.
Location:
trunk/Forms
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UInterpretterForm.pas

    r23 r24  
    5252    procedure Timer1Timer(Sender: TObject);
    5353  private
     54  public
    5455    LastStepCounter: Integer;
    55   public
    5656    procedure RefreshListViewMemory;
    5757    procedure UpadateInterface;
  • trunk/Forms/UMainForm.lfm

    r23 r24  
    55  Width = 643
    66  Caption = 'LazFuck'
    7   ClientHeight = 440
     7  ClientHeight = 446
    88  ClientWidth = 643
    99  Menu = MainMenu1
     
    1616  object MemoSource: TMemo
    1717    Left = 0
    18     Height = 363
     18    Height = 370
    1919    Top = 56
    2020    Width = 643
     
    3434  object StatusBar1: TStatusBar
    3535    Left = 0
    36     Height = 21
    37     Top = 419
     36    Height = 20
     37    Top = 426
    3838    Width = 643
    3939    Panels = <   
     
    544544      object MenuItem27: TMenuItem
    545545        Action = AShrinkSource
     546      end
     547      object MenuItem28: TMenuItem
     548        Action = AGenerateNumber
    546549      end
    547550    end
     
    745748      OnExecute = AShrinkSourceExecute
    746749    end
     750    object AGenerateNumber: TAction
     751      Caption = 'Generate code for number'
     752      ImageIndex = 13
     753      OnExecute = AGenerateNumberExecute
     754    end
    747755  end
    748756  object ImageList1: TImageList
     
    750758    top = 96
    751759    Bitmap = {
    752       4C690D0000001000000010000000000000000000000000000000000000000000
     760      4C690E0000001000000010000000000000000000000000000000000000000000
    753761      0000000000000000000000000000000000000000000000000000000000000000
    754762      000000000000000000000000000000000000000000FF000000FF000000FF0000
     
    11611169      64200000607E000060B2000060C8000060B20000607E00006420000075000000
    11621170      8100FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1171      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1172      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1173      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1174      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1175      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1176      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1177      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1178      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1179      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1180      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1181      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1182      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1183      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     1184      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000063000000B7FFFF
     1185      FF00FFFFFF00000000FF000000FF000000B7FFFFFF00FFFFFF00000000FF0000
     1186      00FF0000008BFFFFFF00FFFFFF00FFFFFF0000000040000000FF000000B7FFFF
     1187      FF0000000063000000B7FFFFFF00000000B700000063000000630000008B0000
     1188      0020000000FF00000020FFFFFF0000000020000000FF000000FF000000B7FFFF
     1189      FF00FFFFFF00FFFFFF00FFFFFF000000008B0000008BFFFFFF00FFFFFF00FFFF
     1190      FF00000000FF00000040FFFFFF0000000020000000B70000008B000000B7FFFF
     1191      FF00FFFFFF00FFFFFF00FFFFFF00000000FF0000008BFFFFFF00FFFFFF000000
     1192      0020000000FF00000020FFFFFF00FFFFFF00FFFFFF000000008B000000B7FFFF
     1193      FF00FFFFFF00FFFFFF000000008B000000FF00000040FFFFFF00FFFFFF000000
     1194      00FF00000040FFFFFF00FFFFFF00FFFFFF00FFFFFF000000008B000000B7FFFF
     1195      FF00FFFFFF0000000040000000FF000000B7FFFFFF00FFFFFF00FFFFFF00FFFF
     1196      FF00000000FF00000063FFFFFF00FFFFFF00FFFFFF000000008B000000B7FFFF
     1197      FF00FFFFFF00000000FF000000FF00000020FFFFFF00FFFFFF00FFFFFF00FFFF
     1198      FF00000000FF0000008BFFFFFF00FFFFFF00FFFFFF000000008B000000B7FFFF
     1199      FF0000000063000000FF00000063FFFFFF00FFFFFF0000000063000000B70000
     1200      0020000000FF00000063FFFFFF00FFFFFF00FFFFFF000000008B000000B7FFFF
     1201      FF000000008B000000FF000000FF000000FF0000008BFFFFFF00000000B70000
     1202      00FF000000B7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
    11631203      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
    11641204      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     
    12351275      Action = AShrinkSource
    12361276    end
     1277    object MenuItem29: TMenuItem
     1278      Action = AGenerateNumber
     1279    end
    12371280  end
    12381281end
  • trunk/Forms/UMainForm.lrt

    r23 r24  
    3232TMAINFORM.AFORMATSOURCE.CAPTION=Format source
    3333TMAINFORM.ASHRINKSOURCE.CAPTION=Shrink source
     34TMAINFORM.AGENERATENUMBER.CAPTION=Generate code for number
  • trunk/Forms/UMainForm.pas

    r23 r24  
    2121    AAbout: TAction;
    2222    ABreakpointToggle: TAction;
     23    AGenerateNumber: TAction;
    2324    AShrinkSource: TAction;
    2425    AFormatSource: TAction;
     
    6566    MenuItem26: TMenuItem;
    6667    MenuItem27: TMenuItem;
     68    MenuItem28: TMenuItem;
     69    MenuItem29: TMenuItem;
    6770    MenuItemOpenRecent: TMenuItem;
    6871    MenuItemTarget: TMenuItem;
     
    9598    procedure AExitExecute(Sender: TObject);
    9699    procedure AFormatSourceExecute(Sender: TObject);
     100    procedure AGenerateNumberExecute(Sender: TObject);
    97101    procedure AOptionsExecute(Sender: TObject);
    98102    procedure AProgramPauseExecute(Sender: TObject);
     
    152156  UCompilerDelphi, UCompilerPHP;
    153157
     158resourcestring
     159  SEnterNumber = 'Enter number';
     160  SNumberGeneration = 'Number generation';
     161
    154162{ TMainForm }
    155163
     
    316324procedure TMainForm.AProgramRunExecute(Sender: TObject);
    317325begin
     326  InterpreterForm.LastStepCounter := 0;
    318327  InterpreterForm.Show;
    319328  BrainFuckInterpreter.Input := InterpreterForm.MemoInput.Lines.Text;
     
    388397end;
    389398
     399procedure TMainForm.AGenerateNumberExecute(Sender: TObject);
     400var
     401  NumberText: string;
     402  Number: Integer;
     403  I: Integer;
     404begin
     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;
     412end;
     413
    390414procedure TMainForm.AOptionsExecute(Sender: TObject);
    391415begin
     
    458482    MemoSource.Lines.SaveToFile(UTF8Decode(SaveDialog1.FileName));
    459483    ProjectFileName := SaveDialog1.FileName;
     484    LastOpenedList.Add(SaveDialog1.FileName);
    460485    Modified := False;
    461486    UpdateInterface;
Note: See TracChangeset for help on using the changeset viewer.