Changeset 54 for trunk/IDE/UProject.pas


Ignore:
Timestamp:
Jun 26, 2012, 7:41:11 AM (12 years ago)
Author:
chronos
Message:
  • Modified: Project instance is now freed in closed state.
  • Added: Toolbar button Open now provide dropdown list of recent opened projects.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IDE/UProject.pas

    r51 r54  
    7575    FActive: Boolean;
    7676    FModified: Boolean;
    77     function GetActive: Boolean;
    78     procedure SetActive(AValue: Boolean);
     77    FOnChange: TNotifyEvent;
    7978    procedure SetModified(AValue: Boolean);
    8079  public
     
    9190    constructor Create;
    9291    destructor Destroy; override;
    93     property Active: Boolean read GetActive write SetActive;
    9492    property Modified: Boolean read FModified write SetModified;
     93    property OnChange: TNotifyEvent read FOnChange write FOnChange;
    9594  end;
    9695
     
    10099    Name: string;
    101100    Description: TStringList;
    102     procedure InitProject(Project: TProject); virtual;
     101    procedure InitProject(var Project: TProject); virtual;
    103102    constructor Create; virtual;
    104103    destructor Destroy; override;
     
    111110  end;
    112111
    113 
    114 implementation
    115 
    116112resourcestring
    117113  SNewProject = 'New project';
    118114
     115implementation
     116
    119117{ TProjectTemplateList }
    120118
     
    126124{ TProjectTemplate }
    127125
    128 procedure TProjectTemplate.InitProject(Project: TProject);
    129 begin
    130   Project.Active := False;
    131   Project.Active := True;
     126procedure TProjectTemplate.InitProject(var Project: TProject);
     127begin
    132128  Project.FileName := SNewProject;
    133129end;
     
    319315{ TProject }
    320316
    321 function TProject.GetActive: Boolean;
    322 begin
    323   Result := FActive;
    324 end;
    325 
    326 procedure TProject.SetActive(AValue: Boolean);
    327 begin
    328   if FActive = AValue then Exit;
    329   FActive := AValue;
    330   if not FActive then Clear;
    331 end;
    332 
    333317procedure TProject.SetModified(AValue: Boolean);
    334318begin
Note: See TracChangeset for help on using the changeset viewer.