Changeset 36 for trunk/IDE/UProject.pas


Ignore:
Timestamp:
Feb 13, 2012, 4:07:34 PM (12 years ago)
Author:
chronos
Message:
  • Modified: Partialy solved project open/close/save management.
Location:
trunk/IDE
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/IDE

    • Property svn:ignore
      •  

        old new  
        44Transpascal.lps
        55Transpascal.exe
         6heaptrclog.trc
  • trunk/IDE/UProject.pas

    r35 r36  
    99  Classes, SysUtils, Dialogs, DOM, XMLWrite, XMLRead, FileUtil,
    1010  SpecializedList;
     11
     12const
     13  ProjectExt = '.tppr';
    1114
    1215type
     
    6366    FActive: Boolean;
    6467    function GetActive: Boolean;
     68    function GetFileName: string;
    6569    procedure SetActive(AValue: Boolean);
    6670  public
     
    7579    procedure Clear;
    7680    property Active: Boolean read GetActive write SetActive;
     81    property FileName: string read GetFileName;
    7782  end;
    7883
     
    236241end;
    237242
     243function TProject.GetFileName: string;
     244begin
     245  Result := GetDir(True) + Name + ProjectExt;
     246end;
     247
    238248procedure TProject.SetActive(AValue: Boolean);
    239249begin
     250  if FActive = AValue then Exit;
    240251  FActive := AValue;
     252  if FActive then Clear;
    241253end;
    242254
     
    264276    Doc.Free;
    265277  end;
     278  FModified := False;
    266279end;
    267280
     
    310323    Free;
    311324  end;
     325  FModified := False;
    312326  inherited Save;
    313327end;
Note: See TracChangeset for help on using the changeset viewer.