unit UPRGObju;
{ Generated by MakeComp 1.03 from UPRGTYPE.PAS. Don't modify manually !!! }
interface
uses Classes, SysUtils, Graphics, UlanType, ULRecTyp, ULObju, 
  UPSSType,UPEPType,
  UPRGType;

type
  TUPRGObj = class(TULObj)
  protected
    function GetPrgName: TULPrgName;
    procedure SetPrgName(APrgName: TULPrgName);
    function GetPrgTime: TULPrgTime;
    procedure SetPrgTime(APrgTime: TULPrgTime);
    function GetMinRecLen: TULRecLen; override;
  public
    constructor Create(AOwner:TULObj);
    function GetULRecDesc: PULRecDesc; override;
  published
    property PrgName: TULPrgName
      read GetPrgName write SetPrgName;
    property PrgTime: TULPrgTime
      read GetPrgTime write SetPrgTime;
  end;

const
  UPRGChildRecIDs: array[0..1] of TULRecID = (
    UPSSID,UPEPID
  );
  UPRGFldDescs: array[0..1] of TULFldDesc = (
    (
     Caption: 'Program Name';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4097;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'PrgName';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TULPrgName';
    ),
    (
     Caption: 'Program Time';
     Hint: 'The current time of the program (if running)';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4096;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'PrgTime';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TULPrgTime';
    )
  );

  UPRGRecDesc: TULRecDesc = (
    Caption: 'Program';
    ChildRecIDsStr: 'UPSSID,UPEPID';
    ChildRecIDs: @UPRGChildRecIDs;
    ChildRecIDCount: 2;
    FldCount: 2;
    Flds: @UPRGFldDescs;
    Flags: rfChildAllowed OR rfRootChild OR rfHasRecName OR rfEnabled OR rfVisible;
    SortExp: '';
    EditFieldList: '';
    BrowseFieldList: '';
    MenuFieldList: '';
    BrowseChildRecIDs: '';
    NameProp: '';
    MainProp: '';
    DefDir: '';
    OpenFilter: '';
    SaveFilter: '';
    Table: '';
    Indexes: ''
   );

implementation

{TUPRGObj}
function TUPRGObj.GetMinRecLen: TULRecLen;
begin
  GetMinRecLen := sizeof(TUPRGRec);
end;

constructor TUPRGObj.Create(AOwner: TULObj);
begin
  inherited Create(TComponent(AOwner), UPRGID);
end;

function TUPRGObj.GetULRecDesc: PULRecDesc;
begin
  Result := @UPRGRecDesc;
end;

procedure TUPRGObj.SetPrgName(APrgName: TULPrgName);
begin
  if PUPRGRec(Rec)^.PrgName <> APrgName then begin
    PUPRGRec(Rec)^.PrgName := APrgName;
    if UPRGFldDescs[0].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TUPRGObj.GetPrgName: TULPrgName;
begin
  GetPrgName := PUPRGRec(Rec)^.PrgName;
end;

procedure TUPRGObj.SetPrgTime(APrgTime: TULPrgTime);
begin
  if PUPRGRec(Rec)^.PrgTime <> APrgTime then begin
    PUPRGRec(Rec)^.PrgTime := APrgTime;
    if UPRGFldDescs[1].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TUPRGObj.GetPrgTime: TULPrgTime;
begin
  GetPrgTime := PUPRGRec(Rec)^.PrgTime;
end;

{/TUPRGObj}

end.
