Changeset 60 for trunk/Forms
- Timestamp:
- Dec 3, 2014, 10:45:24 PM (10 years ago)
- Location:
- trunk/Forms
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.lfm
r59 r60 889 889 } 890 890 end 891 object MenuItem19: TMenuItem 892 Action = AViewLog 893 end 891 894 object MenuItem30: TMenuItem 892 895 Action = AViewCompilers … … 1076 1079 Caption = 'Show execution point' 1077 1080 OnExecute = AProgramShowExecutionPointExecute 1081 end 1082 object AViewLog: TAction 1083 Category = 'View' 1084 Caption = 'Log' 1085 OnExecute = AViewLogExecute 1078 1086 end 1079 1087 end -
trunk/Forms/UFormMain.lrt
r59 r60 37 37 TMAINFORM.ASHOWSOURCEPOSITION.CAPTION=Show position in source 38 38 TMAINFORM.APROGRAMSHOWEXECUTIONPOINT.CAPTION=Show execution point 39 TMAINFORM.AVIEWLOG.CAPTION=Log -
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.