Changeset 67 for trunk/Forms/UFormMain.pas
- Timestamp:
- Jan 17, 2015, 4:08:03 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r65 r67 11 11 type 12 12 13 { T MainForm}14 15 T MainForm= class(TForm)13 { TFormMain } 14 15 TFormMain = class(TForm) 16 16 AViewLog: TAction; 17 17 AProgramShowExecutionPoint: TAction; … … 140 140 procedure TimerRefreshTimer(Sender: TObject); 141 141 private 142 FCurrentTarget: TTarget;143 procedure TargetLogExecute(Lines: TStrings);144 procedure SetCurrentTarget(AValue: TTarget);145 142 procedure AProjectOpenRecentExecute(Sender: TObject); 146 procedure TargetStateChanged(Sender: TObject);147 procedure MessagesChanged(Sender: TObject);148 143 procedure MenuItemTargetClick(Sender: TObject); 149 144 procedure ProjectOpen(FileName: string); … … 152 147 procedure LastOpenedListChange(Sender: TObject); 153 148 public 149 procedure MessagesChanged(Sender: TObject); 150 procedure TargetLogExecute(Lines: TStrings); 151 procedure TargetStateChanged(Sender: TObject); 154 152 procedure LoadFromRegistry(Root: HKEY; Key: string); 155 153 procedure SaveToRegistry(Root: HKEY; Key: string); … … 157 155 procedure UpdateStatusBar; 158 156 procedure UpdateTargetList; 159 property CurrentTarget: TTarget read FCurrentTarget write SetCurrentTarget; 160 end; 161 162 var 163 MainForm: TMainForm; 157 end; 158 159 var 160 FormMain: TFormMain; 164 161 165 162 … … 184 181 SCloseProjectFirst = 'Project need to be closed before it can be openned'; 185 182 186 { TMainForm } 187 188 procedure TMainForm.SetCurrentTarget(AValue: TTarget); 189 var 190 I: Integer; 191 begin 192 if FCurrentTarget = AValue then Exit; 193 FCurrentTarget := AValue; 194 for I := 0 to Core.Targets.Count - 1 do 195 TTarget(Core.Targets[I]).OnChangeState := nil; 196 if Assigned(FCurrentTarget) then begin 197 FCurrentTarget.OnChangeState := TargetStateChanged; 198 FCurrentTarget.OnLog := TargetLogExecute; 199 FCurrentTarget.OptimizationLevel := Core.OptimizationLevel; 200 FCurrentTarget.Messages.OnChange := MessagesChanged; 201 end; 202 UpdateTargetList; 203 UpdateInterface; 204 end; 205 206 procedure TMainForm.FormShow(Sender: TObject); 183 { TFormMain } 184 185 procedure TFormMain.FormShow(Sender: TObject); 207 186 begin 208 187 with Core.ScaleDPI do begin … … 222 201 end; 223 202 224 procedure T MainForm.TimerRefreshTimer(Sender: TObject);203 procedure TFormMain.TimerRefreshTimer(Sender: TObject); 225 204 begin 226 205 FormCPU.Reload; … … 229 208 end; 230 209 231 procedure T MainForm.TargetLogExecute(Lines: TStrings);210 procedure TFormMain.TargetLogExecute(Lines: TStrings); 232 211 begin 233 212 FormLog.Memo1.Lines.AddStrings(Lines); 234 213 end; 235 214 236 procedure T MainForm.TargetStateChanged(Sender: TObject);215 procedure TFormMain.TargetStateChanged(Sender: TObject); 237 216 begin 238 217 UpdateInterface; 239 if C urrentTarget.State = rsPaused then218 if Core.CurrentTarget.State = rsPaused then 240 219 AProgramShowExecutionPoint.Execute; 241 if CurrentTarget.State = rsStopped then CurrentTarget.Messages.AddMessage(SProgramStopped); 242 end; 243 244 procedure TMainForm.MessagesChanged(Sender: TObject); 220 if Core.CurrentTarget.State = rsStopped then 221 Core.CurrentTarget.Messages.AddMessage(SProgramStopped); 222 end; 223 224 procedure TFormMain.MessagesChanged(Sender: TObject); 245 225 begin 246 226 FormMessages.Reload; 247 227 end; 248 228 249 procedure T MainForm.MenuItemTargetClick(Sender: TObject);229 procedure TFormMain.MenuItemTargetClick(Sender: TObject); 250 230 var 251 231 I: Integer; … … 253 233 if Sender is TMenuItem then 254 234 with TMenuItem(Sender) do begin 255 C urrentTarget := TTarget(Core.Targets[MenuIndex]);235 Core.CurrentTarget := TTarget(Core.Targets[MenuIndex]); 256 236 Checked := True; 257 237 for I := 0 to Parent.Count - 1 do … … 260 240 end; 261 241 262 procedure T MainForm.ProjectOpen(FileName: string);242 procedure TFormMain.ProjectOpen(FileName: string); 263 243 begin 264 244 if Core.Project.Openned then … … 268 248 Core.Project.FileName := FileName; 269 249 Core.Project.Openned := True; 270 C urrentTarget.Compiled := False;250 Core.CurrentTarget.Compiled := False; 271 251 UpdateInterface; 272 252 end; 273 253 274 procedure T MainForm.UpdateToolBarHints;254 procedure TFormMain.UpdateToolBarHints; 275 255 var 276 256 I: Integer; … … 280 260 end; 281 261 282 procedure T MainForm.DockInit;262 procedure TFormMain.DockInit; 283 263 begin 284 264 FormSourceCode.ManualDock(TabSheetSource, nil, alClient); … … 303 283 FormMessages.Align := alClient; 304 284 FormMessages.Show; 305 PageControlRight.Width := MainForm.Width div 3;306 PageControlBottom.Height := MainForm.Height div 5;307 end; 308 309 procedure T MainForm.LastOpenedListChange(Sender: TObject);285 PageControlRight.Width := FormMain.Width div 3; 286 PageControlBottom.Height := FormMain.Height div 5; 287 end; 288 289 procedure TFormMain.LastOpenedListChange(Sender: TObject); 310 290 begin 311 291 Core.LastOpenedList.LoadToMenuItem(MenuItemOpenRecent, AProjectOpenRecentExecute); … … 313 293 end; 314 294 315 procedure T MainForm.LoadFromRegistry(Root: HKEY; Key: string);295 procedure TFormMain.LoadFromRegistry(Root: HKEY; Key: string); 316 296 var 317 297 TargetName: string; … … 322 302 OpenKey(Key, True); 323 303 TargetName := ReadStringWithDefault('TargetName', 'Interpretter'); 324 CurrentTarget := Core.Targets.FindByName(TargetName); 325 if not Assigned(CurrentTarget) then CurrentTarget := TTarget(Core.Targets[0]); 304 Core.CurrentTarget := Core.Targets.FindByName(TargetName); 305 if not Assigned(Core.CurrentTarget) then 306 Core.CurrentTarget := TTarget(Core.Targets[0]); 326 307 finally 327 308 Free; … … 329 310 end; 330 311 331 procedure T MainForm.SaveToRegistry(Root: HKEY; Key: string);312 procedure TFormMain.SaveToRegistry(Root: HKEY; Key: string); 332 313 begin 333 314 with TRegistryEx.Create do … … 335 316 RootKey := Root; 336 317 OpenKey(Key, True); 337 WriteString('TargetName', C urrentTarget.Name);318 WriteString('TargetName', Core.CurrentTarget.Name); 338 319 finally 339 320 Free; … … 341 322 end; 342 323 343 procedure T MainForm.UpdateInterface;324 procedure TFormMain.UpdateInterface; 344 325 var 345 326 Title: string; … … 354 335 AProjectClose.Enabled := Core.Project.Openned; 355 336 AProjectSaveAs.Enabled := Core.Project.Openned; 356 AProgramRun.Enabled := (tcRun in C urrentTarget.Capabilities) and357 Core.Project.Openned and (C urrentTarget.State = rsStopped) or (CurrentTarget.State = rsPaused);358 AProgramPause.Enabled := (tcPause in C urrentTarget.Capabilities) and359 Core.Project.Openned and (C urrentTarget.State = rsRunning);360 AProgramStop.Enabled := (tcStop in C urrentTarget.Capabilities) and361 Core.Project.Openned and (C urrentTarget.State <> rsStopped);362 AProgramCompile.Enabled := (tcCompile in C urrentTarget.Capabilities) and337 AProgramRun.Enabled := (tcRun in Core.CurrentTarget.Capabilities) and 338 Core.Project.Openned and (Core.CurrentTarget.State = rsStopped) or (Core.CurrentTarget.State = rsPaused); 339 AProgramPause.Enabled := (tcPause in Core.CurrentTarget.Capabilities) and 340 Core.Project.Openned and (Core.CurrentTarget.State = rsRunning); 341 AProgramStop.Enabled := (tcStop in Core.CurrentTarget.Capabilities) and 342 Core.Project.Openned and (Core.CurrentTarget.State <> rsStopped); 343 AProgramCompile.Enabled := (tcCompile in Core.CurrentTarget.Capabilities) and 363 344 Core.Project.Openned; 364 AProgramStepInto.Enabled := (tcStepInto in C urrentTarget.Capabilities) and365 Core.Project.Openned and ((C urrentTarget.State = rsPaused) or (CurrentTarget.State = rsStopped));366 AProgramStepOut.Enabled := (tcStepOut in C urrentTarget.Capabilities) and367 Core.Project.Openned and (C urrentTarget.State = rsPaused);368 AProgramRunToCursor.Enabled := (tcRunToCursor in C urrentTarget.Capabilities) and369 Core.Project.Openned and ((C urrentTarget.State = rsPaused) or (CurrentTarget.State = rsStopped));370 AProgramStepOver.Enabled := (tcStepOver in C urrentTarget.Capabilities) and371 Core.Project.Openned and ((C urrentTarget.State = rsPaused) or (CurrentTarget.State = rsStopped));372 AProgramShowExecutionPoint.Enabled := (tcPause in C urrentTarget.Capabilities) and373 Core.Project.Openned and (C urrentTarget.State = rsPaused);374 AShowSourcePosition.Enabled := C urrentTarget.Compiled;375 AShowTargetPosition.Enabled := C urrentTarget.Compiled;345 AProgramStepInto.Enabled := (tcStepInto in Core.CurrentTarget.Capabilities) and 346 Core.Project.Openned and ((Core.CurrentTarget.State = rsPaused) or (Core.CurrentTarget.State = rsStopped)); 347 AProgramStepOut.Enabled := (tcStepOut in Core.CurrentTarget.Capabilities) and 348 Core.Project.Openned and (Core.CurrentTarget.State = rsPaused); 349 AProgramRunToCursor.Enabled := (tcRunToCursor in Core.CurrentTarget.Capabilities) and 350 Core.Project.Openned and ((Core.CurrentTarget.State = rsPaused) or (Core.CurrentTarget.State = rsStopped)); 351 AProgramStepOver.Enabled := (tcStepOver in Core.CurrentTarget.Capabilities) and 352 Core.Project.Openned and ((Core.CurrentTarget.State = rsPaused) or (Core.CurrentTarget.State = rsStopped)); 353 AProgramShowExecutionPoint.Enabled := (tcPause in Core.CurrentTarget.Capabilities) and 354 Core.Project.Openned and (Core.CurrentTarget.State = rsPaused); 355 AShowSourcePosition.Enabled := Core.CurrentTarget.Compiled; 356 AShowTargetPosition.Enabled := Core.CurrentTarget.Compiled; 376 357 UpdateStatusBar; 377 358 end; 378 359 379 procedure T MainForm.UpdateStatusBar;360 procedure TFormMain.UpdateStatusBar; 380 361 begin 381 362 StatusBarMain.Panels[0].Text := IntToStr(FormSourceCode.MemoSource.CaretPos.X) + … … 383 364 end; 384 365 385 procedure T MainForm.UpdateTargetList;366 procedure TFormMain.UpdateTargetList; 386 367 var 387 368 I: Integer; 388 369 begin 389 Core.Targets.LoadToMenuItem(MenuItemTarget, MenuItemTargetClick, C urrentTarget);390 Core.Targets.LoadToMenuItem(PopupMenuTargets.Items, MenuItemTargetClick, C urrentTarget);370 Core.Targets.LoadToMenuItem(MenuItemTarget, MenuItemTargetClick, Core.CurrentTarget); 371 Core.Targets.LoadToMenuItem(PopupMenuTargets.Items, MenuItemTargetClick, Core.CurrentTarget); 391 372 392 373 // Update toolbutton 393 I := Core.Targets.IndexOf(C urrentTarget);374 I := Core.Targets.IndexOf(Core.CurrentTarget); 394 375 if I <> -1 then 395 376 with TTarget(Core.Targets[I]) do begin … … 400 381 end; 401 382 402 procedure T MainForm.FormCreate(Sender: TObject);383 procedure TFormMain.FormCreate(Sender: TObject); 403 384 begin 404 385 UpdateTargetList; … … 406 387 end; 407 388 408 procedure T MainForm.FormDestroy(Sender: TObject);389 procedure TFormMain.FormDestroy(Sender: TObject); 409 390 begin 410 391 SaveToRegistry(HKEY(Core.ApplicationInfo.RegistryRoot), Core.ApplicationInfo.RegistryKey); 411 392 end; 412 393 413 procedure T MainForm.AProgramRunExecute(Sender: TObject);414 begin 415 if C urrentTarget is TTargetInterpretter then416 TTargetInterpretter(C urrentTarget).Input := FormInput.MemoInput.Lines.Text;417 if not C urrentTarget.Compiled then AProgramCompile.Execute;418 C urrentTarget.Run;419 C urrentTarget.Messages.AddMessage(SProgramStarted);420 end; 421 422 procedure T MainForm.AShowSourcePositionExecute(Sender: TObject);394 procedure TFormMain.AProgramRunExecute(Sender: TObject); 395 begin 396 if Core.CurrentTarget is TTargetInterpretter then 397 TTargetInterpretter(Core.CurrentTarget).Input := FormInput.MemoInput.Lines.Text; 398 if not Core.CurrentTarget.Compiled then AProgramCompile.Execute; 399 Core.CurrentTarget.Run; 400 Core.CurrentTarget.Messages.AddMessage(SProgramStarted); 401 end; 402 403 procedure TFormMain.AShowSourcePositionExecute(Sender: TObject); 423 404 var 424 405 DebugStep: TDebugStep; 425 406 begin 426 DebugStep := C urrentTarget.DebugSteps.SearchByTargetPos(FormTargetCode.MemoTarget.SelStart);407 DebugStep := Core.CurrentTarget.DebugSteps.SearchByTargetPos(FormTargetCode.MemoTarget.SelStart); 427 408 if Assigned(DebugStep) then begin 428 409 FormSourceCode.MemoSource.SelStart := DebugStep.SourcePosition; … … 431 412 end; 432 413 433 procedure T MainForm.AShowTargetPositionExecute(Sender: TObject);414 procedure TFormMain.AShowTargetPositionExecute(Sender: TObject); 434 415 var 435 416 DebugStep: TDebugStep; 436 417 begin 437 DebugStep := C urrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart);418 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart); 438 419 if Assigned(DebugStep) then begin 439 420 FormTargetCode.MemoTarget.SelStart := DebugStep.TargetPosition; … … 442 423 end; 443 424 444 procedure T MainForm.AViewCompilersExecute(Sender: TObject);425 procedure TFormMain.AViewCompilersExecute(Sender: TObject); 445 426 begin 446 427 FormCompilers.Show; 447 428 end; 448 429 449 procedure T MainForm.AViewInterpretterExecute(Sender: TObject);430 procedure TFormMain.AViewInterpretterExecute(Sender: TObject); 450 431 begin 451 432 FormCPU.Show; 452 433 end; 453 434 454 procedure T MainForm.AViewLogExecute(Sender: TObject);435 procedure TFormMain.AViewLogExecute(Sender: TObject); 455 436 begin 456 437 FormLog.Show; 457 438 end; 458 439 459 procedure T MainForm.FormCloseQuery(Sender: TObject; var CanClose: boolean);440 procedure TFormMain.FormCloseQuery(Sender: TObject; var CanClose: boolean); 460 441 begin 461 442 if Core.Project.Modified then begin … … 465 446 end; 466 447 467 procedure T MainForm.AExitExecute(Sender: TObject);448 procedure TFormMain.AExitExecute(Sender: TObject); 468 449 begin 469 450 Close; 470 451 end; 471 452 472 procedure T MainForm.AOptionsExecute(Sender: TObject);453 procedure TFormMain.AOptionsExecute(Sender: TObject); 473 454 begin 474 455 OptionsForm.Load; … … 477 458 //OptionsForm.SaveToInterpretter(CurrentTarget); 478 459 OptionsForm.Save; 479 if Assigned(C urrentTarget) then480 C urrentTarget.OptimizationLevel := Core.OptimizationLevel;481 end; 482 end; 483 484 procedure T MainForm.AProgramCompileExecute(Sender: TObject);485 begin 486 with C urrentTarget do begin460 if Assigned(Core.CurrentTarget) then 461 Core.CurrentTarget.OptimizationLevel := Core.OptimizationLevel; 462 end; 463 end; 464 465 procedure TFormMain.AProgramCompileExecute(Sender: TObject); 466 begin 467 with Core.CurrentTarget do begin 487 468 AProgramStop.Execute; 488 469 SourceCode := FormSourceCode.MemoSource.Text; 489 470 ProjectFileName := Core.Project.FileName; 490 471 ProgramName := ExtractFileNameOnly(Core.Project.FileName); 491 C urrentTarget.Messages.AddMessage(SCompileStart);472 Core.CurrentTarget.Messages.AddMessage(SCompileStart); 492 473 Compile; 493 C urrentTarget.Messages.AppendMessage(SDone);474 Core.CurrentTarget.Messages.AppendMessage(SDone); 494 475 FormTargetCode.MemoTarget.Text := TargetCode; 495 476 UpdateInterface; … … 497 478 end; 498 479 499 procedure T MainForm.ABreakpointToggleExecute(Sender: TObject);480 procedure TFormMain.ABreakpointToggleExecute(Sender: TObject); 500 481 var 501 482 DebugStep: TDebugStep; 502 483 BreakPoint: TBreakPoint; 503 484 begin 504 DebugStep := C urrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart);485 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart); 505 486 if Assigned(DebugStep) then begin 506 BreakPoint := C urrentTarget.BreakPoints.SearchByTargetPos(DebugStep.TargetPosition);487 BreakPoint := Core.CurrentTarget.BreakPoints.SearchByTargetPos(DebugStep.TargetPosition); 507 488 if Assigned(BreakPoint) then 508 C urrentTarget.BreakPoints.Delete(CurrentTarget.BreakPoints.IndexOf(BreakPoint))509 else C urrentTarget.BreakPoints.AddItem(DebugStep.TargetPosition);510 end; 511 end; 512 513 procedure T MainForm.AProgramPauseExecute(Sender: TObject);514 begin 515 C urrentTarget.Pause;516 end; 517 518 procedure T MainForm.AProgramRunToCursorExecute(Sender: TObject);489 Core.CurrentTarget.BreakPoints.Delete(Core.CurrentTarget.BreakPoints.IndexOf(BreakPoint)) 490 else Core.CurrentTarget.BreakPoints.AddItem(DebugStep.TargetPosition); 491 end; 492 end; 493 494 procedure TFormMain.AProgramPauseExecute(Sender: TObject); 495 begin 496 Core.CurrentTarget.Pause; 497 end; 498 499 procedure TFormMain.AProgramRunToCursorExecute(Sender: TObject); 519 500 var 520 501 DebugStep: TDebugStep; 521 502 begin 522 if C urrentTarget.State = rsStopped then begin523 if not C urrentTarget.Compiled then AProgramCompile.Execute;524 DebugStep := C urrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart);525 C urrentTarget.BreakPoints.SetSystem(DebugStep.TargetPosition);503 if Core.CurrentTarget.State = rsStopped then begin 504 if not Core.CurrentTarget.Compiled then AProgramCompile.Execute; 505 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart); 506 Core.CurrentTarget.BreakPoints.SetSystem(DebugStep.TargetPosition); 526 507 AProgramRun.Execute; 527 508 end else begin 528 DebugStep := C urrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart);529 C urrentTarget.RunToCursor(DebugStep.TargetPosition);530 end; 531 end; 532 533 procedure T MainForm.AProgramShowExecutionPointExecute(Sender: TObject);509 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart); 510 Core.CurrentTarget.RunToCursor(DebugStep.TargetPosition); 511 end; 512 end; 513 514 procedure TFormMain.AProgramShowExecutionPointExecute(Sender: TObject); 534 515 var 535 516 DebugStep: TDebugStep; 536 517 begin 537 DebugStep := C urrentTarget.DebugSteps.SearchByTargetPos(CurrentTarget.ExecutionPosition);518 DebugStep := Core.CurrentTarget.DebugSteps.SearchByTargetPos(Core.CurrentTarget.ExecutionPosition); 538 519 FormSourceCode.MemoSource.SelStart := DebugStep.SourcePosition; 539 520 FormTargetCode.MemoTarget.SelStart := DebugStep.TargetPosition; … … 542 523 end; 543 524 544 procedure T MainForm.AProgramStepIntoExecute(Sender: TObject);545 begin 546 if C urrentTarget.State = rsStopped then begin547 if not C urrentTarget.Compiled then AProgramCompile.Execute;548 C urrentTarget.BreakPoints.SetSystem(TDebugStep(CurrentTarget.DebugSteps.First).TargetPosition);525 procedure TFormMain.AProgramStepIntoExecute(Sender: TObject); 526 begin 527 if Core.CurrentTarget.State = rsStopped then begin 528 if not Core.CurrentTarget.Compiled then AProgramCompile.Execute; 529 Core.CurrentTarget.BreakPoints.SetSystem(TDebugStep(Core.CurrentTarget.DebugSteps.First).TargetPosition); 549 530 AProgramRun.Execute; 550 end else C urrentTarget.StepInto;551 end; 552 553 procedure T MainForm.AProgramStepOutExecute(Sender: TObject);554 begin 555 C urrentTarget.StepOut;556 end; 557 558 procedure T MainForm.AProgramStepOverExecute(Sender: TObject);559 begin 560 if C urrentTarget.State = rsStopped then begin561 if not C urrentTarget.Compiled then AProgramCompile.Execute;562 C urrentTarget.BreakPoints.SetSystem(TDebugStep(CurrentTarget.DebugSteps.First).TargetPosition);531 end else Core.CurrentTarget.StepInto; 532 end; 533 534 procedure TFormMain.AProgramStepOutExecute(Sender: TObject); 535 begin 536 Core.CurrentTarget.StepOut; 537 end; 538 539 procedure TFormMain.AProgramStepOverExecute(Sender: TObject); 540 begin 541 if Core.CurrentTarget.State = rsStopped then begin 542 if not Core.CurrentTarget.Compiled then AProgramCompile.Execute; 543 Core.CurrentTarget.BreakPoints.SetSystem(TDebugStep(Core.CurrentTarget.DebugSteps.First).TargetPosition); 563 544 AProgramRun.Execute; 564 end else C urrentTarget.StepOver;565 end; 566 567 procedure T MainForm.AProgramStopExecute(Sender: TObject);568 begin 569 C urrentTarget.Stop;570 end; 571 572 procedure T MainForm.AProjectCloseExecute(Sender: TObject);545 end else Core.CurrentTarget.StepOver; 546 end; 547 548 procedure TFormMain.AProgramStopExecute(Sender: TObject); 549 begin 550 Core.CurrentTarget.Stop; 551 end; 552 553 procedure TFormMain.AProjectCloseExecute(Sender: TObject); 573 554 var 574 555 DialogResult: TModalResult; … … 589 570 end; 590 571 591 procedure T MainForm.AProjectNewExecute(Sender: TObject);572 procedure TFormMain.AProjectNewExecute(Sender: TObject); 592 573 begin 593 574 AProjectClose.Execute; … … 596 577 FormSourceCode.MemoSource.Clear; 597 578 Core.Project.Openned := True; 598 C urrentTarget.Compiled := False;579 Core.CurrentTarget.Compiled := False; 599 580 UpdateInterface; 600 581 end; 601 582 602 procedure T MainForm.AProjectOpenRecentExecute(Sender: TObject);583 procedure TFormMain.AProjectOpenRecentExecute(Sender: TObject); 603 584 begin 604 585 AProjectClose.Execute; … … 607 588 end; 608 589 609 procedure T MainForm.AProjectOpenExecute(Sender: TObject);590 procedure TFormMain.AProjectOpenExecute(Sender: TObject); 610 591 begin 611 592 if Core.LastOpenedList.Items.Count > 0 then … … 620 601 end; 621 602 622 procedure T MainForm.AProjectSaveAsExecute(Sender: TObject);603 procedure TFormMain.AProjectSaveAsExecute(Sender: TObject); 623 604 begin 624 605 SaveDialog1.FileName := Core.Project.FileName; … … 632 613 end; 633 614 634 procedure T MainForm.AProjectSaveExecute(Sender: TObject);615 procedure TFormMain.AProjectSaveExecute(Sender: TObject); 635 616 begin 636 617 if Core.Project.Modified and FileExistsUTF8(Core.Project.FileName) then begin
Note:
See TracChangeset
for help on using the changeset viewer.