Changeset 31 for trunk/Forms/UMainForm.pas
- Timestamp:
- Feb 18, 2012, 8:02:50 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UMainForm.pas
r30 r31 7 7 uses 8 8 Classes, SysUtils, FileUtil, SynEdit, Forms, Controls, Graphics, Dialogs, 9 Menus, ActnList, StdCtrls, ComCtrls, U BrainFuck, UCoolTranslator, StrUtils,10 SpecializedList, U Compiler, Registry, URegistry, ULastOpenedList, Process;9 Menus, ActnList, StdCtrls, ComCtrls, UTargetInterpretter, UCoolTranslator, StrUtils, 10 SpecializedList, UTarget, Registry, URegistry, ULastOpenedList, Process; 11 11 12 12 const … … 146 146 CompilerIndex: Integer; 147 147 ProjectFileName: string; 148 BrainFuckCompiler: T BrainFuckCompiler;149 BrainFuckInterpreter: T BrainFuckInterpretter;148 BrainFuckCompiler: TTarget; 149 BrainFuckInterpreter: TTargetInterpretter; 150 150 BreakPoints: TListInteger; 151 Compilers: TCompilerList;151 Targets: TTargetList; 152 152 LastOpenedList: TLastOpenedList; 153 153 OpenProjectOnStart: Boolean; … … 168 168 uses 169 169 UInterpretterForm, UApplicationInfo, UCompiledForm, UOptionsForm, 170 U CompilerDelphi, UCompilerPHP, UCompilerC, UCompilersForm;170 UTargetDelphi, UTargetPHP, UTargetC, UCompilersForm; 171 171 172 172 resourcestring … … 255 255 end; 256 256 LastOpenedList.LoadFromRegistry(Root, Key); 257 Compilers.LoadFromRegistry(Root, Key);257 Targets.LoadFromRegistry(Root, Key); 258 258 end; 259 259 260 260 procedure TMainForm.SaveToRegistry(Root: HKEY; Key: string); 261 261 begin 262 Compilers.SaveToRegistry(Root, Key);262 Targets.SaveToRegistry(Root, Key); 263 263 LastOpenedList.SaveToRegistry(Root, Key); 264 264 with TRegistryEx.Create do … … 308 308 begin 309 309 MenuItemTarget.Clear; 310 for I := 0 to Compilers.Count - 1 do begin310 for I := 0 to Targets.Count - 1 do begin 311 311 NewMenuItem := TMenuItem.Create(MenuItemTarget); 312 NewMenuItem.Caption := T BrainFuckCompiler(Compilers[I]).Name;312 NewMenuItem.Caption := TTarget(Targets[I]).Name; 313 313 NewMenuItem.OnClick := MenuItemTargetClick; 314 314 if I = CompilerIndex then NewMenuItem.Checked := True; … … 320 320 begin 321 321 BreakPoints := TListInteger.Create; 322 BrainFuckInterpreter := T BrainFuckInterpretter.Create;322 BrainFuckInterpreter := TTargetInterpretter.Create; 323 323 BrainFuckInterpreter.OnChangeState := BrainFuckInterpreterChangeState; 324 BrainFuckCompiler := TBrainFuckCompiler.Create; 325 Compilers := TCompilerList.Create; 326 Compilers.Add(TBrainFuckCompilerDelphi.Create); 327 Compilers.Add(TBrainFuckCompilerPHP.Create); 328 Compilers.Add(TBrainFuckCompilerC.Create); 324 BrainFuckCompiler := TTarget.Create; 325 Targets := TTargetList.Create; 326 Targets.Add(TTargetInterpretter.Create); 327 Targets.Add(TTargetDelphi.Create); 328 Targets.Add(TTargetPHP.Create); 329 Targets.Add(TTargetC.Create); 329 330 UpdateTargetList; 330 331 LastOpenedList := TLastOpenedList.Create; … … 338 339 SaveToRegistry(RegistryRoot, ApplicationInfo.RegistryKey); 339 340 LastOpenedList.Free; 340 Compilers.Free;341 Targets.Free; 341 342 BrainFuckCompiler.Free; 342 343 BrainFuckInterpreter.Free; … … 449 450 procedure TMainForm.ACompileExecute(Sender: TObject); 450 451 begin 451 with T BrainFuckCompiler(Compilers[CompilerIndex]) do begin452 with TTarget(Targets[CompilerIndex]) do begin 452 453 Optimization := coNormal; 453 454 Source := MemoSource.Text; … … 466 467 procedure TMainForm.ACompileAndRunExecute(Sender: TObject); 467 468 begin 468 with T BrainFuckCompiler(Compilers[CompilerIndex]) do begin469 with TTarget(Targets[CompilerIndex]) do begin 469 470 Optimization := coNormal; 470 471 Source := MemoSource.Text;
Note:
See TracChangeset
for help on using the changeset viewer.