Changeset 60 for trunk/Forms/UFormMain.pas
- Timestamp:
- Dec 3, 2014, 10:45:24 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r59 r60 16 16 17 17 TMainForm = class(TForm) 18 AViewLog: TAction; 18 19 AProgramShowExecutionPoint: TAction; 19 20 AShowSourcePosition: TAction; … … 51 52 MenuItem17: TMenuItem; 52 53 MenuItem18: TMenuItem; 54 MenuItem19: TMenuItem; 53 55 MenuItem2: TMenuItem; 54 56 MenuItem22: TMenuItem; … … 133 135 procedure AViewCompilersExecute(Sender: TObject); 134 136 procedure AViewInterpretterExecute(Sender: TObject); 137 procedure AViewLogExecute(Sender: TObject); 135 138 procedure FormCloseQuery(Sender: TObject; var CanClose: boolean); 136 139 procedure FormCreate(Sender: TObject); … … 140 143 private 141 144 FCurrentTarget: TTarget; 145 procedure TargetLogExecute(Lines: TStrings); 142 146 procedure SetCurrentTarget(AValue: TTarget); 143 147 procedure AProjectOpenRecentExecute(Sender: TObject); … … 169 173 uses 170 174 UCore, UFormCPU, UFormOptions, UFormMessages, UFormTargets, UFormOutput, UFormInput, 171 UFormMemory, UFormSourceCode, UFormTargetCode, UTargetInterpretter ;175 UFormMemory, UFormSourceCode, UFormTargetCode, UTargetInterpretter, UFormLog; 172 176 173 177 resourcestring … … 189 193 for I := 0 to Core.Targets.Count - 1 do 190 194 TTarget(Core.Targets[I]).OnChangeState := nil; 191 FCurrentTarget.OnChangeState := TargetStateChanged; 192 FCurrentTarget.Messages.OnChange := MessagesChanged; 195 if Assigned(FCurrentTarget) then begin 196 FCurrentTarget.OnChangeState := TargetStateChanged; 197 FCurrentTarget.OnLog := TargetLogExecute; 198 FCurrentTarget.Messages.OnChange := MessagesChanged; 199 end; 193 200 UpdateTargetList; 194 201 UpdateInterface; … … 218 225 FormOutput.Reload; 219 226 FormMemory.Reload; 227 end; 228 229 procedure TMainForm.TargetLogExecute(Lines: TStrings); 230 begin 231 FormLog.Memo1.Lines.AddStrings(Lines); 220 232 end; 221 233 … … 438 450 end; 439 451 452 procedure TMainForm.AViewLogExecute(Sender: TObject); 453 begin 454 FormLog.Show; 455 end; 456 440 457 procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: boolean); 441 458 begin
Note:
See TracChangeset
for help on using the changeset viewer.