| 31 |
|
procedure LoadDatFilePart(FileID, Offset, Size: Integer; var Target: TStream); overload; override; |
| 32 |
|
procedure UpdateDatFilePart(FileID, Offset, Size: Integer; Src: TStream); overload; override; |
| 33 |
|
|
| 34 |
+ |
function GetDatLinks(FileID: Integer): TDatLinkList; override; |
| 35 |
|
function GetRawList(FileID: Integer): TRawDataList; override; |
| 36 |
|
function GetRawInfo(FileID, DatOffset: Integer): TRawDataInfo; override; |
| 37 |
|
|
| 56 |
|
|
| 57 |
|
|
| 58 |
|
constructor TAccess_OUP_ADB.Create(DBFilename: String; ConnectionID: Integer; var Msg: TStatusMessages); |
| 58 |
– |
var |
| 59 |
– |
i: Integer; |
| 59 |
|
begin |
| 60 |
|
Msg := SM_UnknownError; |
| 61 |
|
if not FileExists(DBFilename) then |
| 140 |
|
Fdat_files[i].Name := FQuery.FieldByName('name').AsString; |
| 141 |
|
Fdat_files[i].Extension := FQuery.FieldByName('extension').AsString; |
| 142 |
|
Fdat_files[i].Size := FQuery.FieldByName('size').AsInteger; |
| 143 |
< |
Fdat_files[i].FileType := HexToLong(FQuery.FieldByName('contenttype').AsString); |
| 143 |
> |
Fdat_files[i].FileType := StrToInt('$'+FQuery.FieldByName('contenttype').AsString); |
| 144 |
|
Fdat_files[i].DatAddr := 0; |
| 145 |
|
Inc(i); |
| 146 |
|
FQuery.Next; |
| 260 |
|
name := fields.Strings[2]; |
| 261 |
|
extension := fields.Strings[0]; |
| 262 |
|
end; |
| 263 |
+ |
if SortType in [ST_ExtNameAsc, ST_ExtNameDesc] then |
| 264 |
+ |
begin |
| 265 |
+ |
id := fields.Strings[2]; |
| 266 |
+ |
name := fields.Strings[1]; |
| 267 |
+ |
extension := fields.Strings[0]; |
| 268 |
+ |
end; |
| 269 |
|
end; |
| 270 |
|
|
| 271 |
|
begin |
| 279 |
|
begin |
| 280 |
|
if (NoEmptyFiles = False) or ((Fdat_files[i].FileType and $02) = 0) then |
| 281 |
|
begin |
| 282 |
< |
if AppSettings.FilenumbersAsHex then |
| 278 |
< |
id := IntToHex(Fdat_files[i].ID, 4) |
| 279 |
< |
else |
| 280 |
< |
id := FormatNumber(Fdat_files[i].ID, 5, '0'); |
| 282 |
> |
id := FormatNumber(Fdat_files[i].ID, 5, '0'); |
| 283 |
|
name := Fdat_files[i].Name; |
| 284 |
|
extension := Fdat_files[i].Extension; |
| 285 |
|
|
| 287 |
|
ST_IDAsc, ST_IDDesc: list.Add(id + ';' + name + ';' + extension); |
| 288 |
|
ST_NameAsc, ST_NameDesc: list.Add(name + ';' + id + ';' + extension); |
| 289 |
|
ST_ExtAsc, ST_ExtDesc: list.Add(extension + ';' + id + ';' + name); |
| 290 |
+ |
ST_ExtNameAsc, ST_ExtNameDesc: list.Add(name + ';' + extension + ';' + id); |
| 291 |
|
end; |
| 292 |
|
end; |
| 293 |
|
end; |
| 294 |
|
end; |
| 295 |
< |
Result := TStringList.Create; |
| 295 |
> |
if not Assigned(Result) then |
| 296 |
> |
Result := TStringList.Create; |
| 297 |
|
if list.Count > 0 then |
| 298 |
|
begin |
| 299 |
|
fields := TStringList.Create; |
| 300 |
< |
if SortType in [ST_IDAsc, ST_NameAsc, ST_ExtAsc] then |
| 300 |
> |
if SortType in [ST_IDAsc, ST_NameAsc, ST_ExtAsc, ST_ExtNameAsc] then |
| 301 |
|
for i := 0 to list.Count - 1 do |
| 302 |
|
begin |
| 303 |
|
getfields; |
| 327 |
|
var |
| 328 |
|
i: Integer; |
| 329 |
|
begin |
| 330 |
< |
Result := TStringList.Create; |
| 330 |
> |
if not Assigned(Result) then |
| 331 |
> |
Result := TStringList.Create; |
| 332 |
> |
if Result is TStringList then |
| 333 |
> |
TStringList(Result).Sorted := True; |
| 334 |
|
for i := 0 to Length(Fdat_extensionsmap) - 1 do |
| 335 |
|
begin |
| 336 |
|
with Fdat_extensionsmap[i] do |