Changeset 13 for trunk/UMainForm.pas


Ignore:
Timestamp:
Feb 11, 2012, 5:53:25 PM (13 years ago)
Author:
chronos
Message:
  • Added: Options form.
  • Modified: Interpretter now accept source code as string again.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UMainForm.pas

    r12 r13  
    1818    ABreakpointSet: TAction;
    1919    ABreakpointUnset: TAction;
     20    AOptions: TAction;
    2021    AInterpretterStepOut: TAction;
    2122    AInterpretterRunToCursor: TAction;
     
    5152    MenuItem2: TMenuItem;
    5253    MenuItem20: TMenuItem;
     54    MenuItem22: TMenuItem;
    5355    MenuItem40: TMenuItem;
    5456    MenuItem21: TMenuItem;
     
    7274    ToolButton6: TToolButton;
    7375    ToolButton7: TToolButton;
     76    ToolButton8: TToolButton;
    7477    procedure ACompileExecute(Sender: TObject);
    7578    procedure AExitExecute(Sender: TObject);
     79    procedure AOptionsExecute(Sender: TObject);
    7680    procedure AProgramPauseExecute(Sender: TObject);
    7781    procedure AProgramStopExecute(Sender: TObject);
     
    115119
    116120uses
    117   UInterpreterForm, UApplicationInfo, UCompiledForm;
     121  UInterpreterForm, UApplicationInfo, UCompiledForm, UOptionsForm;
    118122
    119123{ TMainForm }
     
    193197
    194198procedure TMainForm.AProgramRunExecute(Sender: TObject);
    195 var
    196   SourceText: string;
    197199begin
    198200  InterpreterForm.Show;
    199201  BrainFuckInterpreter.Input := InterpreterForm.MemoInput.Lines.Text;
    200   SourceText := MemoSource.Lines.Text;
    201   SetLength(BrainFuckInterpreter.Source, Length(SourceText));
    202   Move(Pointer(SourceText)^, Pointer(BrainFuckInterpreter.Source)^, Length(SourceText));
     202  BrainFuckInterpreter.Source := MemoSource.Text;
    203203  BrainFuckInterpreter.Run;
    204204end;
     
    222222begin
    223223  Close;
     224end;
     225
     226procedure TMainForm.AOptionsExecute(Sender: TObject);
     227begin
     228  if OptionsForm.ShowModal = mrOK then begin
     229
     230  end;
    224231end;
    225232
Note: See TracChangeset for help on using the changeset viewer.