2 SppList - SPP
\83v
\83\89\83O
\83C
\83\93\82ð
\8c\9f\8dõ
\82µ
\82Ä
\95Û
\8e\9d\82·
\82é
9 uses Classes, Windows, SysUtils, Contnrs, Dialogs, SppTypes, Graphics;
12 TSppList = class(TObjectList)
14 constructor Create(OwnsObject: boolean);
15 procedure LoadFromDirectory(Dir: String);
16 function TryGetImage(const Ghost: String; const Surface: integer;
17 Bitmap: TBitmap): boolean;
28 constructor TSppList.Create(OwnsObject: boolean);
30 inherited Create(true);
31 if OwnsObject = false then
32 raise Exception.Create('OwnsObject must be set to true');
35 procedure TSppList.LoadFromDirectory(Dir: String);
38 Item: TSurfacePreviewPlugin;
40 i := FindFirst(Dir + '\spp\*.dll', 0, F);
44 Item := TSurfacePreviewPlugin.Create(F.Name);
47 on E: ESppException do
49 ShowMessage('SSP
\83v
\83\89\83O
\83C
\83\93\83\8d\81[
\83h
\8e¸
\94s:'#13#10 + E.Message);
58 function TSppList.TryGetImage(const Ghost: String; const Surface: integer;
59 Bitmap: TBitmap): boolean;
63 for i := 0 to Self.Count-1 do
65 if (Items[i] as TSurfacePreviewPlugin).SetSizeAndGetImage(Ghost,
76 Spps := TSppList.Create(true);