Changeset 4 for trunk/UInstance.pas


Ignore:
Timestamp:
Feb 3, 2011, 8:01:00 AM (13 years ago)
Author:
chronos
Message:
  • Fixed: Add and edit operations.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UInstance.pas

    r2 r4  
    66
    77uses
    8   Classes, SysUtils, USource;
     8  Classes, SysUtils, USource, Contnrs;
    99
    1010type
    11 
    1211  { TInstance }
    1312
     
    1514    Id: Integer;
    1615    Name: string;
     16    Downloaded: Boolean;
     17    Compiled: Boolean;
    1718    IDESource: TSource;
    1819    IDERevision: string;
     
    2425    procedure Start;
    2526    procedure Update;
     27    procedure Download;
     28  end;
     29
     30  { TInstanceList }
     31
     32  TInstanceList = class(TObjectList)
     33    function GetNewId: Integer;
    2634  end;
    2735
    2836implementation
     37
     38{ TInstanceList }
     39
     40function TInstanceList.GetNewId: Integer;
     41var
     42  I: Integer;
     43begin
     44  Result := 1;
     45  for I := 0 to Count - 1 do
     46    if TInstance(Items[I]).Id >= Result then
     47      Result := TInstance(Items[I]).Id + 1;
     48end;
    2949
    3050{ TInstance }
     
    4565end;
    4666
     67procedure TInstance.Download;
     68begin
     69
     70end;
     71
    4772end.
    4873
Note: See TracChangeset for help on using the changeset viewer.