Changeset 61 for trunk/Forms
- Timestamp:
- Dec 4, 2014, 11:26:54 AM (10 years ago)
- Location:
- trunk/Forms
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r60 r61 263 263 FormSourceCode.MemoSource.Lines.LoadFromFile(UTF8Decode(FileName)); 264 264 Core.LastOpenedList.AddItem(FileName); 265 Core.Project FileName := FileName;266 Core. Modified := False;265 Core.Project.FileName := FileName; 266 Core.Project.Modified := False; 267 267 CurrentTarget.Compiled := False; 268 268 UpdateInterface; … … 300 300 FormMessages.Align := alClient; 301 301 FormMessages.Show; 302 PageControlRight.Width := MainForm.Width div 2;302 PageControlRight.Width := MainForm.Width div 3; 303 303 PageControlBottom.Height := MainForm.Height div 5; 304 304 end; … … 345 345 Title: string; 346 346 begin 347 AProjectSave.Enabled := Core. Modified;347 AProjectSave.Enabled := Core.Project.Modified; 348 348 Title := Core.ApplicationInfo.AppName; 349 if Core.Project FileName <> '' then Title := Core.ProjectFileName + ' - ' + Title;350 if Core. Modified then Title := Title + ' *';349 if Core.Project.FileName <> '' then Title := Core.Project.FileName + ' - ' + Title; 350 if Core.Project.Modified then Title := Title + ' *'; 351 351 Caption := Title; 352 FormSourceCode.MemoSource.Enabled := Core.Project FileName <> '';353 AProjectClose.Enabled := Core.Project FileName <> '';352 FormSourceCode.MemoSource.Enabled := Core.Project.FileName <> ''; 353 AProjectClose.Enabled := Core.Project.FileName <> ''; 354 354 AProgramRun.Enabled := (tcRun in CurrentTarget.Capabilities) and 355 (Core.Project FileName <> '') and (CurrentTarget.State = rsStopped) or (CurrentTarget.State = rsPaused);355 (Core.Project.FileName <> '') and (CurrentTarget.State = rsStopped) or (CurrentTarget.State = rsPaused); 356 356 AProgramPause.Enabled := (tcPause in CurrentTarget.Capabilities) and 357 (Core.Project FileName <> '') and (CurrentTarget.State = rsRunning);357 (Core.Project.FileName <> '') and (CurrentTarget.State = rsRunning); 358 358 AProgramStop.Enabled := (tcStop in CurrentTarget.Capabilities) and 359 (Core.Project FileName <> '') and (CurrentTarget.State <> rsStopped);359 (Core.Project.FileName <> '') and (CurrentTarget.State <> rsStopped); 360 360 AProgramCompile.Enabled := (tcCompile in CurrentTarget.Capabilities) and 361 (Core.Project FileName <> '');361 (Core.Project.FileName <> ''); 362 362 AProgramStepInto.Enabled := (tcStepInto in CurrentTarget.Capabilities) and 363 (Core.Project FileName <> '') and ((CurrentTarget.State = rsPaused) or (CurrentTarget.State = rsStopped));363 (Core.Project.FileName <> '') and ((CurrentTarget.State = rsPaused) or (CurrentTarget.State = rsStopped)); 364 364 AProgramStepOut.Enabled := (tcStepOut in CurrentTarget.Capabilities) and 365 (Core.Project FileName <> '') and (CurrentTarget.State = rsPaused);365 (Core.Project.FileName <> '') and (CurrentTarget.State = rsPaused); 366 366 AProgramRunToCursor.Enabled := (tcRunToCursor in CurrentTarget.Capabilities) and 367 (Core.Project FileName <> '') and ((CurrentTarget.State = rsPaused) or (CurrentTarget.State = rsStopped));367 (Core.Project.FileName <> '') and ((CurrentTarget.State = rsPaused) or (CurrentTarget.State = rsStopped)); 368 368 AProgramStepOver.Enabled := (tcStepOver in CurrentTarget.Capabilities) and 369 (Core.Project FileName <> '') and ((CurrentTarget.State = rsPaused) or (CurrentTarget.State = rsStopped));369 (Core.Project.FileName <> '') and ((CurrentTarget.State = rsPaused) or (CurrentTarget.State = rsStopped)); 370 370 AProgramShowExecutionPoint.Enabled := (tcPause in CurrentTarget.Capabilities) and 371 (Core.Project FileName <> '') and (CurrentTarget.State = rsPaused);371 (Core.Project.FileName <> '') and (CurrentTarget.State = rsPaused); 372 372 AShowSourcePosition.Enabled := CurrentTarget.Compiled; 373 373 AShowTargetPosition.Enabled := CurrentTarget.Compiled; … … 457 457 procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: boolean); 458 458 begin 459 if Core. Modified then AProjectSaveAs.Execute;459 if Core.Project.Modified then AProjectSaveAs.Execute; 460 460 end; 461 461 … … 481 481 Optimization := coNormal; 482 482 SourceCode := FormSourceCode.MemoSource.Text; 483 ProjectFileName := Core.Project FileName;484 ProgramName := ExtractFileNameOnly(Core.Project FileName);483 ProjectFileName := Core.Project.FileName; 484 ProgramName := ExtractFileNameOnly(Core.Project.FileName); 485 485 CurrentTarget.Messages.AddMessage(SCompileStart); 486 486 Compile; … … 566 566 procedure TMainForm.AProjectCloseExecute(Sender: TObject); 567 567 begin 568 if Core. Modified then AProjectSaveAs.Execute;568 if Core.Project.Modified then AProjectSaveAs.Execute; 569 569 AProgramStop.Execute; 570 Core.Project FileName := '';570 Core.Project.FileName := ''; 571 571 FormSourceCode.MemoSource.Clear; 572 Core. Modified := False;572 Core.Project.Modified := False; 573 573 UpdateInterface; 574 574 end; … … 577 577 begin 578 578 AProjectClose.Execute; 579 Core.Project FileName := 'Examples' + DirectorySeparator + SNewProject + '.b';579 Core.Project.FileName := 'Examples' + DirectorySeparator + SNewProject + '.b'; 580 580 FormSourceCode.MemoSource.Clear; 581 Core. Modified := False;581 Core.Project.Modified := False; 582 582 CurrentTarget.Compiled := False; 583 583 UpdateInterface; … … 602 602 procedure TMainForm.AProjectSaveAsExecute(Sender: TObject); 603 603 begin 604 SaveDialog1.FileName := Core.Project FileName;604 SaveDialog1.FileName := Core.Project.FileName; 605 605 if SaveDialog1.Execute then begin 606 606 FormSourceCode.MemoSource.Lines.SaveToFile(UTF8Decode(SaveDialog1.FileName)); 607 Core.Project FileName := SaveDialog1.FileName;607 Core.Project.FileName := SaveDialog1.FileName; 608 608 Core.LastOpenedList.AddItem(SaveDialog1.FileName); 609 Core. Modified := False;609 Core.Project.Modified := False; 610 610 UpdateInterface; 611 611 end; … … 614 614 procedure TMainForm.AProjectSaveExecute(Sender: TObject); 615 615 begin 616 if Core. Modified then AProjectSaveAs.Execute;616 if Core.Project.Modified then AProjectSaveAs.Execute; 617 617 end; 618 618 -
trunk/Forms/UFormMemory.lfm
r59 r61 1 1 object FormMemory: TFormMemory 2 Left = 2562 Left = 565 3 3 Height = 259 4 Top = 324 Top = 182 5 5 Width = 391 6 6 Caption = 'Memory' … … 34 34 Width = 330 35 35 end> 36 Font.Height = -1 136 Font.Height = -12 37 37 Font.Name = 'Courier New' 38 38 OwnerData = True -
trunk/Forms/UFormMemory.pas
r38 r61 63 63 end; 64 64 65 66 65 end. 67 66 -
trunk/Forms/UFormSourceCode.lfm
r48 r61 7 7 ClientHeight = 240 8 8 ClientWidth = 320 9 LCLVersion = '1. 1'9 LCLVersion = '1.3' 10 10 object MemoSource: TMemo 11 11 Left = 0 -
trunk/Forms/UFormSourceCode.pas
r51 r61 168 168 procedure TFormSourceCode.MemoSourceChange(Sender: TObject); 169 169 begin 170 Core. Modified := True;170 Core.Project.Modified := True; 171 171 MainForm.CurrentTarget.Compiled := False; 172 172 MainForm.UpdateInterface;
Note:
See TracChangeset
for help on using the changeset viewer.