OSDN Git Service

datファイルのD&Dで、ファイル名チェックで、ファイルパスまで送っていたので、
[gikonavigoeson/gikonavi.git] / Option.pas
index d1b89fa..83c6bda 100644 (file)
@@ -116,8 +116,6 @@ type
                 OpenMailerCheckBox: TCheckBox;
                 GroupBox6: TGroupBox;
                 LogDeleteMessageCheckBox: TCheckBox;
-                ResAnchorGroupBox: TGroupBox;
-                ResAnchorCheckBox: TCheckBox;
                 TabSheet1: TTabSheet;
                TabAddRadioGroup: TRadioGroup;
                 GroupBox8: TGroupBox;
@@ -219,6 +217,8 @@ type
     gppLeftBottomRB: TRadioButton;
     gppBottomRB: TRadioButton;
     gppRighBottomRB: TRadioButton;
+    ResAnchorCheckBox: TCheckBox;
+    IgnoreLimitResCountCheckBox: TCheckBox;
                procedure FormCreate(Sender: TObject);
                procedure FormDestroy(Sender: TObject);
                procedure ApplyButtonClick(Sender: TObject);
@@ -766,6 +766,8 @@ begin
 
        //\83\8d\83O\8dí\8f\9c\8e\9e\83\81\83b\83Z\81[\83W
        LogDeleteMessageCheckBox.Checked := GikoSys.Setting.DeleteMsg;
+    //\93¯ID\83\8c\83X\83A\83\93\83J\81[\95\\8e¦\82Ì\90§\8cÀ\90\94\89z\82¦\83\81\83b\83Z\81[\83W
+    IgnoreLimitResCountCheckBox.Checked := GikoSys.Setting.LimitResCountMessage;
 
        //\8fI\97¹\8e\9e\8am\94F\83_\83C\83A\83\8d\83O
        ShowDialogForEndCheckBox.Checked := GikoSys.Setting.ShowDialogForEnd;
@@ -1031,6 +1033,8 @@ begin
 
        GikoSys.Setting.OpenMailer := OpenMailerCheckBox.Checked;
        GikoSys.Setting.DeleteMsg := LogDeleteMessageCheckBox.Checked;
+    GikoSys.Setting.LimitResCountMessage := IgnoreLimitResCountCheckBox.Checked;
+
        //\8fI\97¹\8e\9e\8am\94F\83_\83C\83A\83\8d\83O
        GikoSys.Setting.ShowDialogForEnd := ShowDialogForEndCheckBox.Checked;
        //AllTabClose
@@ -1283,7 +1287,7 @@ end;
 function TOptionDialog.CheckFolder: Boolean;
 begin
        if Trim(LogFolderEdit.Text) = '' then
-               LogFolderEdit.Text := ExtractFilePath(Application.ExeName) + 'Log';
+               LogFolderEdit.Text := GikoSys.GetAppDir + 'Log';
 
        if DirectoryExists(LogFolderEdit.Text) then begin
                Result := True;
@@ -1321,13 +1325,19 @@ begin
 end;
 
 procedure TOptionDialog.SoundPlayButtonClick(Sender: TObject);
+var
+    s : String;
 begin
-       if not FileExists(SoundFileEdit.Text) then begin
+    s := SoundFileEdit.Text;
+    if (AnsiPos('.\', s) = 1) then begin
+        s := GikoSys.Setting.GetAppDir + Copy(s, 2, Length(s));
+    end;
+       if not FileExists(s) then begin
                MsgBox(Handle, '\91\8dÝ\82µ\82È\82¢\83t\83@\83C\83\8b\82Å\82·', '\83G\83\89\81[', MB_ICONSTOP or MB_OK);
                SoundFileEdit.Text := '';
                Exit;
        end;
-       if not sndPlaySound(PChar(SoundFileEdit.Text), SND_ASYNC or SND_NOSTOP) then begin
+       if not sndPlaySound(PChar(s), SND_ASYNC or SND_NOSTOP) then begin
                sndPlaySound(nil, SND_ASYNC);
        end;
 end;
@@ -1488,12 +1498,12 @@ end;
 
 procedure TOptionDialog.CSSSetContent(Content: string);
 var
-       doc : Variant;
+       doc : OleVariant;
 begin
        if CSSBrowser.Document <> nil then begin
-               doc := CSSBrowser.Document;
+               doc := CSSBrowser.OleObject.Document;
                doc.open;
-                               doc.Clear;
+        doc.Clear;
                doc.charset := 'Shift_JIS';
                doc.Write(Content);
                doc.Close;