OSDN Git Service

OpenDialog incluced
authornaru <bottle@mikage.to>
Sun, 6 Apr 2003 12:06:02 +0000 (12:06 +0000)
committernaru <bottle@mikage.to>
Sun, 6 Apr 2003 12:06:02 +0000 (12:06 +0000)
SVG.dpr

diff --git a/SVG.dpr b/SVG.dpr
index ef2f7d8..ec019dd 100644 (file)
--- 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\82Í\81AConfigure\82ð\8cÄ\82Î\82ê\82Ä\82â\82é\82±\82Æ\82ª\82 \82é\82©\82Ç\82¤\82©\82ð\95Ô\82·\81B
 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\8cÅ\97L\82Ì\90Ý\92è\82ð\8ds\82¤\81B
 //
 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