From: naru Date: Sun, 6 Apr 2003 12:06:02 +0000 (+0000) Subject: OpenDialog incluced X-Git-Tag: SVG1-1~3 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=766d822fe76f110f3aaba636268dc69308ec7f5a;p=winbottle%2Fsvg-dll.git OpenDialog incluced --- diff --git a/SVG.dpr b/SVG.dpr index ef2f7d8..ec019dd 100644 --- a/SVG.dpr +++ b/SVG.dpr @@ -8,7 +8,7 @@ library SVG; {$R *.res} uses - Windows, Classes, SysUtils, Graphics, IniFiles; + Windows, Classes, SysUtils, Graphics, IniFiles, Dialogs; const SurfaceWidth = 48; @@ -55,7 +55,7 @@ end; // CanConfigure‚́AConfigure‚ðŒÄ‚΂ê‚Ä‚â‚邱‚Æ‚ª‚ ‚é‚©‚Ç‚¤‚©‚ð•Ô‚·B function GetVersion(DLLName: PChar; NameLen: integer; var Version: integer; var CanConfigure: boolean): integer; cdecl; -const ThisDLL = 'SVG Surface Loader for Ver. 1'; +const ThisDLL = 'SVG Surface Loader for Ver. 1.1'; begin Version := 1; CanConfigure := true; @@ -243,7 +243,34 @@ end; // DLLŒÅ—L‚̐ݒè‚ðs‚¤B // procedure Configure; cdecl; +var OpenDialog: TOpenDialog; + Ini: TIniFile; begin + try + ShowMessage('Specify SSTP Viewer''s ghost file.'); + OpenDialog := TOpenDialog.Create(nil); + try + OpenDialog.Filter := 'Ghost Definition File(ghost.txt)|ghost.txt|' + + 'All Files(*.*)|*.*'; + OpenDialog.FileName := GhostFile; + if OpenDialog.Execute then + begin + GhostFile := OpenDialog.FileName; + Ini := TIniFile.Create(MyPath + ConfigFile); + try + Ini.WriteString('SVG', 'GhostFile', GhostFile); + finally + Ini.Free; + end; + Ghost2File.Clear; + end; + finally + OpenDialog.Free; + end; + except + on E: Exception do + ShowMessage(E.Message); + end; end; exports