Changeset 31 for trunk/Forms
- Timestamp:
- Feb 18, 2012, 8:02:50 PM (13 years ago)
- Location:
- trunk/Forms
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UCompilersForm.pas
r25 r31 31 31 32 32 uses 33 UMainForm, U Compiler;33 UMainForm, UTarget; 34 34 35 35 resourcestring … … 46 46 procedure TFormCompilers.ListView1Data(Sender: TObject; Item: TListItem); 47 47 begin 48 if (Item.Index >= 0) and (Item.Index < MainForm. Compilers.Count) then49 with T BrainFuckCompiler(MainForm.Compilers[Item.Index]) do begin48 if (Item.Index >= 0) and (Item.Index < MainForm.Targets.Count) then 49 with TTarget(MainForm.Targets[Item.Index]) do begin 50 50 Item.Caption := Name; 51 Item.Data := MainForm. Compilers[Item.Index];51 Item.Data := MainForm.Targets[Item.Index]; 52 52 Item.SubItems.Add(CompilerPath); 53 53 end; … … 56 56 procedure TFormCompilers.ListView1DblClick(Sender: TObject); 57 57 begin 58 with T BrainFuckCompiler(ListView1.Selected.Data) do58 with TTarget(ListView1.Selected.Data) do 59 59 CompilerPath := InputBox(SCompilerOptions, SCompilerPath, 60 60 CompilerPath); … … 64 64 procedure TFormCompilers.ReloadList; 65 65 begin 66 ListView1.Items.Count := MainForm. Compilers.Count;66 ListView1.Items.Count := MainForm.Targets.Count; 67 67 ListView1.Refresh; 68 68 end; -
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; -
trunk/Forms/UOptionsForm.pas
r25 r31 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 Spin, ComCtrls, U BrainFuck;9 Spin, ComCtrls, UTargetInterpretter; 10 10 11 11 type … … 28 28 { private declarations } 29 29 public 30 procedure LoadFromInterpretter(Interpretter: T BrainFuckInterpretter);31 procedure SaveToInterpretter(Interpretter: T BrainFuckInterpretter);30 procedure LoadFromInterpretter(Interpretter: TTargetInterpretter); 31 procedure SaveToInterpretter(Interpretter: TTargetInterpretter); 32 32 end; 33 33 … … 59 59 end; 60 60 61 procedure TOptionsForm.LoadFromInterpretter(Interpretter: T BrainFuckInterpretter61 procedure TOptionsForm.LoadFromInterpretter(Interpretter: TTargetInterpretter 62 62 ); 63 63 begin … … 66 66 end; 67 67 68 procedure TOptionsForm.SaveToInterpretter(Interpretter: T BrainFuckInterpretter);68 procedure TOptionsForm.SaveToInterpretter(Interpretter: TTargetInterpretter); 69 69 begin 70 70 Interpretter.CellSize := SpinEditCellSize.Value;
Note:
See TracChangeset
for help on using the changeset viewer.