Changeset 67 for trunk/UCore.pas
- Timestamp:
- Jan 17, 2015, 4:08:03 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r64 r67 20 20 procedure DataModuleDestroy(Sender: TObject); 21 21 private 22 FCurrentTarget: TTarget; 23 procedure SetCurrentTarget(AValue: TTarget); 22 24 public 23 25 ScaleDPI: TScaleDPI; … … 28 30 procedure LoadFromRegistry(Root: HKEY; Key: string); 29 31 procedure SaveToRegistry(Root: HKEY; Key: string); 32 property CurrentTarget: TTarget read FCurrentTarget write SetCurrentTarget; 30 33 end; 31 34 … … 39 42 40 43 uses 41 UTargetJava, UTargetDelphi, UTargetPHP, UTargetC, UTargetInterpretter, UTargetFPC; 44 UFormMain, UTargetJava, UTargetDelphi, UTargetPHP, UTargetC, 45 UTargetInterpretter, UTargetFPC; 42 46 43 47 … … 110 114 end; 111 115 116 procedure TCore.SetCurrentTarget(AValue: TTarget); 117 var 118 I: Integer; 119 begin 120 if FCurrentTarget = AValue then Exit; 121 FCurrentTarget := AValue; 122 for I := 0 to Targets.Count - 1 do 123 TTarget(Targets[I]).OnChangeState := nil; 124 if Assigned(FCurrentTarget) then begin 125 FCurrentTarget.OnChangeState := FormMain.TargetStateChanged; 126 FCurrentTarget.OnLog := FormMain.TargetLogExecute; 127 FCurrentTarget.OptimizationLevel := OptimizationLevel; 128 FCurrentTarget.Messages.OnChange := FormMain.MessagesChanged; 129 end; 130 FormMain.UpdateTargetList; 131 FormMain.UpdateInterface; 132 end; 133 134 112 135 end. 113 136
Note:
See TracChangeset
for help on using the changeset viewer.