Changeset 232 for oup/current/FileClasses
- Timestamp:
- Jun 28, 2007, 11:24:08 AM (17 years ago)
- Location:
- oup/current/FileClasses
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/current/FileClasses/TXMP.pas
r215 r232 10 10 public 11 11 procedure InitDataFields; override; 12 procedure InitEditor; override; 12 13 end; 13 14 … … 15 16 16 17 uses 17 ConnectionManager, Math, Classes, TypeDefs, _DataTypes; 18 ConnectionManager, Math, Classes, TypeDefs, _DataTypes, ExtCtrls, StdCtrls, 19 Controls, Forms; 18 20 19 21 { TFile_TXMP } … … 106 108 107 109 110 procedure TFile_TXMP.InitEditor; 111 var 112 group: TGroupBox; 113 splitter: TSplitter; 114 begin 115 inherited; 116 FEditor := TFrame.Create(nil); 117 group := TGroupBox.Create(FEditor); 118 group.Align := alTop; 119 group.Height := 150; 120 group.Caption := '1. '; 121 group.Parent := FEditor; 122 123 splitter := TSplitter.Create(FEditor); 124 splitter.Align := alTop; 125 splitter.Top := group.Height + 10; 126 splitter.AutoSnap := False; 127 splitter.MinSize := 100; 128 splitter.Beveled := True; 129 splitter.Height := 8; 130 splitter.Parent := FEditor; 131 132 group := TGroupBox.Create(FEditor); 133 group.Align := alClient; 134 group.Caption := '2. '; 135 group.Parent := FEditor; 136 end; 137 108 138 end. 109 139 -
oup/current/FileClasses/_FileTypes.pas
r231 r232 34 34 function GetRawPartByIndex(ID: Integer): TRawDataInfo; 35 35 function GetChildCount: Integer; 36 function GetRawCount: Integer; 36 37 public 37 38 constructor Create(ConnectionID, FileID: Integer); virtual; … … 58 59 property FieldByIndex[ID: Integer]: TDataField read GetFieldByIndex; 59 60 61 property RawCount: Integer read GetRawCount; 60 62 property RawPartByOffset[Offset: Integer]: TRawDataInfo read GetRawPartByOffset; 61 63 property RawPartByIndex[ID: Integer]: TRawDataInfo read GetRawPartByIndex; … … 177 179 end; 178 180 181 function TFile.GetRawCount: Integer; 182 var 183 i: Integer; 184 begin 185 Result := Length(FRawParts); 186 if Result > 0 then 187 begin 188 Result := 0; 189 for i := 0 to High(FRawParts) do 190 if FRawParts[i].RawSize > 0 then 191 Inc(Result); 192 end; 193 end; 194 179 195 function TFile.GetRawPartByIndex(ID: Integer): TRawDataInfo; 180 begin 181 if ID < Length(FRawParts) then 182 Result := FRawParts[ID] 196 var 197 i: Integer; 198 valids: Integer; 199 begin 200 if ID < GetRawCount then 201 begin 202 valids := 0; 203 i := 0; 204 repeat 205 if FRawParts[i].RawSize > 0 then 206 begin 207 Inc(valids); 208 end; 209 Inc(i); 210 until valids > ID; 211 Result := FRawParts[i - 1]; 212 end 183 213 else 184 214 with Result do
Note:
See TracChangeset
for help on using the changeset viewer.