OSDN Git Service

・書き込み時の新しい「書きこみ&クッキー」メッセージに対応
[gikonavigoeson/gikonavi.git] / KuroutSetting.pas
index d59f7ff..bf4b88d 100644 (file)
@@ -81,6 +81,22 @@ type
     Label14: TLabel;
     ExtListLabeledEdit: TLabeledEdit;
     Label15: TLabel;
+    LogGroupBox: TGroupBox;
+    CheckDatFileCheckBox: TCheckBox;
+    RespopupTabSheet: TTabSheet;
+    RespopuGroupBox: TGroupBox;
+    DeltaXLabeledEdit: TLabeledEdit;
+    DeltaYLabeledEdit: TLabeledEdit;
+    DeltaXUpDown: TUpDown;
+    DeltaYUpDown: TUpDown;
+    Label16: TLabel;
+    RespopupWaitLabeledEdit: TLabeledEdit;
+    RespopupWaitUpDown: TUpDown;
+    Label19: TLabel;
+    RespopupMailToCheckBox: TCheckBox;
+    ResRangeLabeledEdit: TLabeledEdit;
+    ResRangeCountUpDown: TUpDown;
+    UseGobakuCheckBox: TCheckBox;
        procedure OkBottonClick(Sender: TObject);
        procedure FormCreate(Sender: TObject);
        procedure CDeleteButtonClick(Sender: TObject);
@@ -94,6 +110,10 @@ type
     procedure MoveHistoryMaxEditExit(Sender: TObject);
     procedure AHandredLabeledEditExit(Sender: TObject);
     procedure ExtListLabeledEditExit(Sender: TObject);
+    procedure DeltaXLabeledEditExit(Sender: TObject);
+    procedure DeltaYLabeledEditExit(Sender: TObject);
+    procedure RespopupWaitLabeledEditExit(Sender: TObject);
+    procedure ResRangeLabeledEditExit(Sender: TObject);
   private
        { Private \90é\8c¾ }
        procedure SetValue;
@@ -150,12 +170,22 @@ begin
     MoveHistoryMaxEdit.Text := IntToStr( GikoSys.Setting.MoveHistorySize );
     //\81@\90æ\93ª\95\\8e¦\83\8c\83X\90\94
     AHandredUpDown.Position := GikoSys.Setting.HeadResCount;
+    // \95\\8e¦\83\8c\83X\90\94
+    ResRangeCountUpDown.Position := GikoSys.Setting.ResRangeExCount;
     // \8aÖ\98A\83L\81[\83\8f\81[\83h\92Ç\89Á\83t\83\89\83O
     AddKeywordCheckBox.Checked := GikoSys.Setting.AddKeywordLink;
     // \8cë\94½\89\9e\91Î\8dô
     ReplaceDatCheckBox.Checked := GikoSys.Setting.ReplaceDat;
     SentIniFileSizeUpDown.Position := GikoSys.Setting.SentIniFileSize;
     ExtListLabeledEdit.Text := GikoSys.Setting.ExtList;
+    // Folder.idx\93Ç\82Ý\8d\9e\82Ý\8e\9edat\83`\83F\83b\83N
+    CheckDatFileCheckBox.Checked := GikoSys.Setting.CheckDatFile;
+    DeltaXUpDown.Position := GikoSys.Setting.RespopupDeltaX;
+    DeltaYUpDown.Position := GikoSys.Setting.RespopupDeltaY;
+    RespopupWaitUpDown.Position := GikoSys.Setting.RespopupWait;
+    RespopupMailToCheckBox.Checked := GikoSys.Setting.RespopupMailTo;
+    // \8cë\94\9a\83`\83F\83b\83N
+    UseGobakuCheckBox.Checked := GikoSys.Setting.UseGobakuCheck;
 end;
 
 procedure TKuroutOption.SaveSetting;
@@ -190,7 +220,8 @@ begin
     //\81@\90æ\93ª\95\\8e¦\83\8c\83X\90\94
     GikoSys.Setting.HeadResCount :=
         StrToIntDef( AHandredLabeledEdit.Text , 1);
-
+    GikoSys.Setting.ResRangeExCount :=
+        StrToIntDef( ResRangeLabeledEdit.Text , 100 );
        GikoSys.Setting.KuroutSettingTabIndex := PageControl1.ActivePageIndex;
     // \8aÖ\98A\83L\81[\83\8f\81[\83h\92Ç\89Á\83t\83\89\83O
     GikoSys.Setting.AddKeywordLink := AddKeywordCheckBox.Checked;
@@ -198,6 +229,17 @@ begin
     GikoSys.Setting.ReplaceDat := ReplaceDatCheckBox.Checked;
     GikoSys.Setting.SentIniFileSize := SentIniFileSizeUpDown.Position;
     GikoSys.Setting.ExtList := ExtListLabeledEdit.Text;
+    // Folder.idx\93Ç\82Ý\8d\9e\82Ý\8e\9edat\83`\83F\83b\83N
+    GikoSys.Setting.CheckDatFile := CheckDatFileCheckBox.Checked;
+
+    GikoSys.Setting.RespopupDeltaX := StrToInt(DeltaXLabeledEdit.Text);
+    GikoSys.Setting.RespopupDeltaY := StrToInt(DeltaYLabeledEdit.Text);
+    GikoSys.Setting.RespopupWait := StrToInt(RespopupWaitLabeledEdit.Text);
+    GikoForm.ResPopupClearTimer.Interval := GikoSys.Setting.RespopupWait;
+    GikoSys.Setting.RespopupMailTo := RespopupMailToCheckBox.Checked;
+    // \8cë\94\9a\83`\83F\83b\83N
+    GikoSys.Setting.UseGobakuCheck := UseGobakuCheckBox.Checked;
+
 end;
 
 procedure TKuroutOption.RecvBufferSizeExit(Sender: TObject);
@@ -229,12 +271,26 @@ begin
     MoveHistoryMaxEditExit(Sender);
     AHandredLabeledEditExit(Sender);
     ExtListLabeledEditExit(Sender);
+    DeltaXLabeledEditExit(Sender);
+    DeltaYLabeledEditExit(Sender);
+    RespopupWaitLabeledEditExit(Sender);
     PostColumnData();
        SaveSetting;
 end;
 
 procedure TKuroutOption.FormCreate(Sender: TObject);
+var
+    CenterForm: TCustomForm;
 begin
+    CenterForm := TCustomForm(Owner);
+    if Assigned(CenterForm) then begin
+        Left := ((CenterForm.Width - Width) div 2) + CenterForm.Left;
+        Top := ((CenterForm.Height - Height) div 2) + CenterForm.Top;
+    end else begin
+        Left := (Screen.Width - Width) div 2;
+        Top := (Screen.Height - Height) div 2;
+    end;
+
        SetValue;
        PostTimeCheckBoxClick(Sender);
 
@@ -448,8 +504,48 @@ begin
     if AnsiEndsStr(';', ExtListLabeledEdit.Text) then begin
         ExtListLabeledEdit.Text :=
             Copy(ExtListLabeledEdit.Text, 0,
-                Length(ExtListLabeledEdit.Text) - 1); 
+                Length(ExtListLabeledEdit.Text) - 1);
     end;
 end;
+// \83\8c\83X\83|\83b\83v\83A\83b\83v\88Ê\92uX
+procedure TKuroutOption.DeltaXLabeledEditExit(Sender: TObject);
+begin
+       if not GikoSys.IsNumeric(DeltaXLabeledEdit.Text) then
+               DeltaXLabeledEdit.Text := IntToStr(GikoSys.Setting.RespopupDeltaX);
+    if StrToInt(DeltaXLabeledEdit.Text) < DeltaXUpDown.Min then
+        DeltaXLabeledEdit.Text := IntToStr(DeltaXUpDown.Min);
+    if StrToInt(DeltaXLabeledEdit.Text) > DeltaXUpDown.Max then
+        DeltaXLabeledEdit.Text:= IntToStr(DeltaXUpDown.Max);
+end;
+// \83\8c\83X\83|\83b\83v\83A\83b\83v\88Ê\92uY
+procedure TKuroutOption.DeltaYLabeledEditExit(Sender: TObject);
+begin
+       if not GikoSys.IsNumeric(DeltaYLabeledEdit.Text) then
+        DeltaYLabeledEdit.Text := IntToStr(GikoSys.Setting.RespopupDeltaY);
+    if StrToInt(DeltaYLabeledEdit.Text) < DeltaYUpDown.Min then
+        DeltaYLabeledEdit.Text := IntToStr(DeltaYUpDown.Min);
+    if StrToInt(DeltaYLabeledEdit.Text) > DeltaYUpDown.Max then
+        DeltaYLabeledEdit.Text := IntToStr(DeltaYUpDown.Max);
+end;
+
+procedure TKuroutOption.RespopupWaitLabeledEditExit(Sender: TObject);
+begin
+       if not GikoSys.IsNumeric(RespopupWaitLabeledEdit.Text) then
+               RespopupWaitLabeledEdit.Text := IntToStr(GikoSys.Setting.RespopupWait);
+    if StrToInt(RespopupWaitLabeledEdit.Text) < RespopupWaitUpDown.Min then
+               RespopupWaitLabeledEdit.Text := IntToStr(RespopupWaitUpDown.Min);
+    if StrToInt(RespopupWaitLabeledEdit.Text) > RespopupWaitUpDown.Max then
+               RespopupWaitLabeledEdit.Text := IntToStr(RespopupWaitUpDown.Max);
+end;
+
+procedure TKuroutOption.ResRangeLabeledEditExit(Sender: TObject);
+begin
+       if not GikoSys.IsNumeric(ResRangeLabeledEdit.Text) then
+               ResRangeLabeledEdit.Text := '100';
+    if StrToInt(ResRangeLabeledEdit.Text) < 100 then
+        ResRangeLabeledEdit.Text := '100';
+    if StrToInt(ResRangeLabeledEdit.Text) > 9999 then
+        ResRangeLabeledEdit.Text := '9999';
+end;
 
 end.