Changeset 112 for oup/current/DataAccess
- Timestamp:
- Feb 22, 2007, 1:37:39 AM (18 years ago)
- Location:
- oup/current/DataAccess
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/current/DataAccess/Access_OUP_ADB.pas
r106 r112 262 262 extension := fields.Strings[0]; 263 263 end; 264 if SortType in [ST_ExtNameAsc, ST_ExtNameDesc] then 265 begin 266 id := fields.Strings[2]; 267 name := fields.Strings[1]; 268 extension := fields.Strings[0]; 269 end; 264 270 end; 265 271 … … 275 281 if (NoEmptyFiles = False) or ((Fdat_files[i].FileType and $02) = 0) then 276 282 begin 277 if AppSettings.FilenumbersAsHex then 278 id := IntToHex(Fdat_files[i].ID, 4) 279 else 280 id := FormatNumber(Fdat_files[i].ID, 5, '0'); 283 id := FormatNumber(Fdat_files[i].ID, 5, '0'); 281 284 name := Fdat_files[i].Name; 282 285 extension := Fdat_files[i].Extension; … … 286 289 ST_NameAsc, ST_NameDesc: list.Add(name + ';' + id + ';' + extension); 287 290 ST_ExtAsc, ST_ExtDesc: list.Add(extension + ';' + id + ';' + name); 291 ST_ExtNameAsc, ST_ExtNameDesc: list.Add(name + ';' + extension + ';' + id); 288 292 end; 289 293 end; … … 294 298 begin 295 299 fields := TStringList.Create; 296 if SortType in [ST_IDAsc, ST_NameAsc, ST_ExtAsc ] then300 if SortType in [ST_IDAsc, ST_NameAsc, ST_ExtAsc, ST_ExtNameAsc] then 297 301 for i := 0 to list.Count - 1 do 298 302 begin -
oup/current/DataAccess/Access_OniArchive.pas
r105 r112 60 60 61 61 constructor TAccess_OniArchive.Create(DatFilename: String; ConnectionID: Integer; var Msg: TStatusMessages); 62 type63 THeader = packed record64 Ident: array[0..$13] of Byte;65 Files: Integer;66 NamedFiles: Integer;67 Extensions: Integer;68 DataAddr: Integer;69 DataSize: Integer;70 NamesAddr: Integer;71 NamesSize: Integer;72 Ident2: array[0..$F] of Byte;73 end;74 TFilesMap = array of packed record75 Extension: array[0..$3] of Char;76 DataAddr: Integer;77 NameAddr: Integer;78 FileSize: Integer;79 FileType: LongWord;80 end;81 TNamedFilesMap = array of packed record82 FileNumber: Integer;83 blubb: Integer;84 end;85 62 const 86 63 header_ident1_pc: array[0..$13] of Byte = … … 250 227 extension := fields.Strings[0]; 251 228 end; 229 if SortType in [ST_ExtNameAsc, ST_ExtNameDesc] then 230 begin 231 id := fields.Strings[2]; 232 name := fields.Strings[1]; 233 extension := fields.Strings[0]; 234 end; 252 235 end; 253 236 … … 263 246 if (NoEmptyFiles = False) or ((Fdat_files[i].FileType and $02) = 0) then 264 247 begin 265 if AppSettings.FilenumbersAsHex then 266 id := IntToHex(Fdat_files[i].ID, 4) 267 else 268 id := FormatNumber(Fdat_files[i].ID, 5, '0'); 248 id := FormatNumber(Fdat_files[i].ID, 5, '0'); 269 249 name := Fdat_files[i].Name; 270 250 extension := Fdat_files[i].Extension; … … 274 254 ST_NameAsc, ST_NameDesc: list.Add(name + ';' + id + ';' + extension); 275 255 ST_ExtAsc, ST_ExtDesc: list.Add(extension + ';' + id + ';' + name); 256 ST_ExtNameAsc, ST_ExtNameDesc: list.Add(name + ';' + extension + ';' + id); 276 257 end; 277 258 end; … … 282 263 begin 283 264 fields := TStringList.Create; 284 if SortType in [ST_IDAsc, ST_NameAsc, ST_ExtAsc ] then265 if SortType in [ST_IDAsc, ST_NameAsc, ST_ExtAsc, ST_ExtNameAsc] then 285 266 for i := 0 to list.Count - 1 do 286 267 begin -
oup/current/DataAccess/ConnectionManager.pas
r101 r112 35 35 function CloseConnection(ID: Integer; var Msg: TStatusMessages): Boolean; overload; 36 36 function CloseConnection(FileName: String; var Msg: TStatusMessages): Boolean; overload; 37 function FileOpened(FileName: String): Integer; 37 38 published 38 39 end; … … 261 262 262 263 264 function TConnectionManager.FileOpened(FileName: String): Integer; 265 var 266 i: Integer; 267 begin 268 Result := -1; 269 if Length(FConnections) > 0 then 270 for i := 0 to High(FConnections) do 271 if FConnections[i].FileName = FileName then 272 begin 273 Result := FConnections[i].ConnectionID; 274 Exit; 275 end; 276 end; 277 278 263 279 initialization 264 280 ConManager := TConnectionManager.Create;
Note:
See TracChangeset
for help on using the changeset viewer.