Changeset 70 for trunk/Forms


Ignore:
Timestamp:
Oct 11, 2015, 6:50:33 PM (9 years ago)
Author:
chronos
Message:
Location:
trunk/Forms
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r68 r70  
    1212  OnDestroy = FormDestroy
    1313  OnShow = FormShow
    14   LCLVersion = '1.3'
     14  LCLVersion = '1.5'
    1515  WindowState = wsMaximized
    1616  object StatusBarMain: TStatusBar
  • trunk/Forms/UFormMain.pas

    r67 r70  
    167167uses
    168168  UCore, UFormCPU, UFormOptions, UFormMessages, UFormTargets, UFormOutput, UFormInput,
    169   UFormMemory, UFormSourceCode, UFormTargetCode, UTargetInterpretter, UFormLog;
     169  UFormMemory, UFormSourceCode, UFormTargetCode, UTargetInterpretter, UFormLog,
     170  UBFTarget;
    170171
    171172resourcestring
     
    454455begin
    455456  OptionsForm.Load;
    456   //OptionsForm.LoadFromInterpretter(CurrentTarget);
    457457  if OptionsForm.ShowModal = mrOK then begin
    458     //OptionsForm.SaveToInterpretter(CurrentTarget);
    459458    OptionsForm.Save;
    460     if Assigned(Core.CurrentTarget) then
     459    if Assigned(Core.CurrentTarget) then begin
    461460      Core.CurrentTarget.OptimizationLevel := Core.OptimizationLevel;
     461      if Core.CurrentTarget is TBFTarget then begin
     462        TBFTarget(Core.CurrentTarget).CellSize := Core.CellSize;
     463        TBFTarget(Core.CurrentTarget).MemorySize := Core.MemorySize;
     464      end;
     465    end;
    462466  end;
    463467end;
  • trunk/Forms/UFormOptions.lfm

    r67 r70  
    88  ClientWidth = 468
    99  OnShow = FormShow
    10   LCLVersion = '1.3'
     10  LCLVersion = '1.5'
    1111  object ButtonOk: TButton
    1212    Left = 389
  • trunk/Forms/UFormOptions.pas

    r64 r70  
    3939    procedure Load;
    4040    procedure Save;
    41     procedure LoadFromInterpretter(Interpretter: TTargetInterpretter);
    42     procedure SaveToInterpretter(Interpretter: TTargetInterpretter);
    4341  end;
    4442
     
    8179  CheckBoxDPIAuto.Checked := Core.ScaleDPI.AutoDetect;
    8280  ComboBoxOptimizatipn.ItemIndex := Integer(Core.OptimizationLevel);
     81  SpinEditCellSize.Value := Core.CellSize;
     82  SpinEditMemorySize.Value := Core.MemorySize;
    8383  UpdateInterface;
    8484end;
     
    9090  Core.ScaleDPI.AutoDetect := CheckBoxDPIAuto.Checked;
    9191  Core.OptimizationLevel := TCompilerOptimization(ComboBoxOptimizatipn.ItemIndex);
     92  Core.CellSize := SpinEditCellSize.Value;
     93  Core.MemorySize := SpinEditMemorySize.Value;
    9294end;
    9395
     
    104106end;
    105107
    106 procedure TOptionsForm.LoadFromInterpretter(Interpretter: TTargetInterpretter
    107   );
    108 begin
    109   SpinEditCellSize.Value := Interpretter.CellSize;
    110   SpinEditMemorySize.Value := Interpretter.MemorySize;
    111 end;
    112 
    113 procedure TOptionsForm.SaveToInterpretter(Interpretter: TTargetInterpretter);
    114 begin
    115   Interpretter.CellSize := SpinEditCellSize.Value;
    116   Interpretter.MemorySize := SpinEditMemorySize.Value;
    117 end;
    118 
    119108end.
    120109
Note: See TracChangeset for help on using the changeset viewer.