Changeset 38 for trunk/Forms/UFormMain.pas
- Timestamp:
- Feb 19, 2012, 10:29:55 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r37 r38 49 49 ImageList1: TImageList; 50 50 MainMenu1: TMainMenu; 51 MemoMessages: TMemo;52 51 MemoSource: TMemo; 53 52 MemoTarget: TMemo; … … 91 90 MenuItem9: TMenuItem; 92 91 OpenDialog1: TOpenDialog; 93 PageControl1: TPageControl; 94 PageControl2: TPageControl; 95 PageControl3: TPageControl; 96 Panel1: TPanel; 92 PageControlMain: TPageControl; 93 PageControlRight: TPageControl; 94 PageControlBottom: TPageControl; 95 PanelLeft: TPanel; 96 PanelMemory: TPanel; 97 PanelCPU: TPanel; 98 PanelOutput: TPanel; 99 PanelInput: TPanel; 97 100 PopupMenuTarget: TPopupMenu; 98 101 PopupMenuSource: TPopupMenu; … … 100 103 Splitter1: TSplitter; 101 104 Splitter2: TSplitter; 102 StatusBar1: TStatusBar; 103 TabSheet1: TTabSheet; 104 TabSheet2: TTabSheet; 105 Splitter3: TSplitter; 106 Splitter4: TSplitter; 107 Splitter5: TSplitter; 108 StatusBarMain: TStatusBar; 109 TabSheetMessages: TTabSheet; 110 TabSheetDebug: TTabSheet; 105 111 TabSheetSource: TTabSheet; 106 112 TabSheetTarget: TTabSheet; 107 ToolBar1: TToolBar; 113 TimerRefresh: TTimer; 114 ToolBarMain: TToolBar; 108 115 ToolButton1: TToolButton; 109 116 ToolButton10: TToolButton; … … 157 164 procedure MemoSourceMouseDown(Sender: TObject; Button: TMouseButton; 158 165 Shift: TShiftState; X, Y: Integer); 166 procedure TimerRefreshTimer(Sender: TObject); 159 167 private 160 168 FCurrentTarget: TTarget; … … 165 173 procedure SetCurrentTarget(AValue: TTarget); 166 174 procedure UpdateToolBarHints; 175 procedure DockInit; 167 176 public 168 177 Modified: Boolean; … … 187 196 188 197 uses 189 UFormCPU, UApplicationInfo, UFormOptions, 190 UTargetDelphi, UTargetPHP, UTargetC, UFormTargets; 198 UFormCPU, UApplicationInfo, UFormOptions, UFormMessages, 199 UTargetDelphi, UTargetPHP, UTargetC, UFormTargets, UFormOutput, UFormInput, 200 UFormMemory; 191 201 192 202 resourcestring … … 199 209 procedure TMainForm.FormShow(Sender: TObject); 200 210 begin 201 PageControl 1.TabIndex := 0;211 PageControlMain.TabIndex := 0; 202 212 if OpenProjectOnStart and (LastOpenedList.Count > 0) then 203 213 ProjectOpen(LastOpenedList[0]) … … 206 216 UpdateToolBarHints; 207 217 UpdateTargetList; 218 DockInit; 208 219 end; 209 220 … … 234 245 begin 235 246 UpdateStatusBar; 247 end; 248 249 procedure TMainForm.TimerRefreshTimer(Sender: TObject); 250 begin 251 FormCPU.Reload; 252 FormOutput.Reload; 253 FormMemory.Reload; 236 254 end; 237 255 … … 283 301 I: Integer; 284 302 begin 285 for I := 0 to ToolBar1.ControlCount - 1 do 286 ToolBar1.Controls[I].Hint := ToolBar1.Controls[I].Caption; 303 for I := 0 to ToolBarMain.ControlCount - 1 do 304 ToolBarMain.Controls[I].Hint := ToolBarMain.Controls[I].Caption; 305 end; 306 307 procedure TMainForm.DockInit; 308 begin 309 FormCPU.ManualDock(PanelCPU, nil, alClient); 310 FormCPU.Align := alClient; 311 FormCPU.Show; 312 FormInput.ManualDock(PanelInput, nil, alClient); 313 FormInput.Align := alClient; 314 FormInput.Show; 315 FormOutput.ManualDock(PanelOutput, nil, alClient); 316 FormOutput.Align := alClient; 317 FormOutput.Show; 318 FormMemory.ManualDock(PanelMemory, nil, alClient); 319 FormMemory.Align := alClient; 320 FormMemory.Show; 321 FormMesssages.ManualDock(TabSheetMessages, nil, alClient); 322 FormMesssages.Align := alClient; 323 FormMesssages.Show; 287 324 end; 288 325 … … 362 399 procedure TMainForm.UpdateStatusBar; 363 400 begin 364 StatusBar 1.Panels[0].Text := IntToStr(MemoSource.CaretPos.X) + ', ' + IntToStr(MemoSource.CaretPos.Y);401 StatusBarMain.Panels[0].Text := IntToStr(MemoSource.CaretPos.X) + ', ' + IntToStr(MemoSource.CaretPos.Y); 365 402 end; 366 403 … … 403 440 procedure TMainForm.AProgramRunExecute(Sender: TObject); 404 441 begin 405 InterpreterForm.LastStepCounter := 0;406 InterpreterForm.Show;442 FormCPU.LastStepCounter := 0; 443 FormCPU.Show; 407 444 if CurrentTarget is TTargetInterpretter then 408 TTargetInterpretter(CurrentTarget).Input := InterpreterForm.MemoInput.Lines.Text;445 TTargetInterpretter(CurrentTarget).Input := FormInput.MemoInput.Lines.Text; 409 446 if not CurrentTarget.Compiled then AProgramCompile.Execute; 410 447 CurrentTarget.Run; … … 418 455 if Assigned(DebugStep) then begin 419 456 MemoSource.SelStart := DebugStep.SourcePosition; 420 PageControl 1.TabIndex := 0;457 PageControlMain.TabIndex := 0; 421 458 end; 422 459 end; … … 429 466 if Assigned(DebugStep) then begin 430 467 MemoTarget.SelStart := DebugStep.TargetPosition; 431 PageControl 1.TabIndex := 1;468 PageControlMain.TabIndex := 1; 432 469 end; 433 470 end; … … 458 495 procedure TMainForm.AViewInterpretterExecute(Sender: TObject); 459 496 begin 460 InterpreterForm.Show;497 FormCPU.Show; 461 498 end; 462 499 … … 573 610 MemoSource.SelStart := DebugStep.SourcePosition; 574 611 MemoTarget.SelStart := DebugStep.TargetPosition; 575 if PageControl 1.TabIndex = 0 then MemoSource.SetFocus;576 if PageControl 1.TabIndex = 1 then MemoTarget.SetFocus;612 if PageControlMain.TabIndex = 0 then MemoSource.SetFocus; 613 if PageControlMain.TabIndex = 1 then MemoTarget.SetFocus; 577 614 end; 578 615
Note:
See TracChangeset
for help on using the changeset viewer.