OSDN Git Service

バタ66
[gikonavigoeson/gikonavi.git] / Option.pas
1 unit Option;
2
3 interface
4
5 uses
6         Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
7         ComCtrls, StdCtrls, ExtCtrls, Dialogs, FileCtrl, MMSystem,
8         GikoSystem, GikoUtil, Buttons, UrlMon, Menus, ImgList, OleCtrls,
9 {$IF Defined(DELPRO) }
10         SHDocVw,
11         MSHTML,
12 {$ELSE}
13         SHDocVw_TLB,
14         MSHTML_TLB,
15 {$IFEND}
16         BoardGroup, BrowserRecord;
17
18 type
19         TOptionDialog = class(TForm)
20                 CancelBotton: TButton;
21                 ApplyButton: TButton;
22                 FontDialog: TFontDialog;
23                 ColorDialog: TColorDialog;
24                 OpenDialog: TOpenDialog;
25                 Label26: TLabel;
26                 CroutOption: TButton;
27                 OptionTab: TPageControl;
28                 ConnectSheet: TTabSheet;
29                 ReadProxyGroupBox: TGroupBox;
30                 ReadAddressLabel: TLabel;
31                 ReadPortLabel: TLabel;
32                 ReadUserIDLabel: TLabel;
33                 ReadPasswordLabel: TLabel;
34                 ReadProxyCheck: TCheckBox;
35                 ReadProxyAddressEdit: TEdit;
36                 ReadPortEdit: TEdit;
37                 ReadProxyUserIDEdit: TEdit;
38                 ReadProxyPasswordEdit: TEdit;
39                 WriteProxyGroupBox: TGroupBox;
40                 WriteAddressLabel: TLabel;
41                 WritePortLabel: TLabel;
42                 WriteUserIDLabel: TLabel;
43                 WritePasswordLabel: TLabel;
44                 WriteProxyCheck: TCheckBox;
45                 WriteProxyAddressEdit: TEdit;
46                 WritePortEdit: TEdit;
47                                 WriteProxyUserIDEdit: TEdit;
48                                 WriteProxyPasswordEdit: TEdit;
49                 Font1Sheet: TTabSheet;
50                 Bevel1: TBevel;
51                 Bevel2: TBevel;
52                 Label19: TLabel;
53                                 Bevel5: TBevel;
54                 Label20: TLabel;
55                 Label21: TLabel;
56                 Label22: TLabel;
57                 Label23: TLabel;
58                 lblSFont: TLabel;
59                 CabinetFontBotton: TButton;
60                 CabinetColorBotton: TButton;
61                 CabinetDefaultButton: TButton;
62                 CabinetMemo: TMemo;
63                 ListMemo: TMemo;
64                 ListFontBotton: TButton;
65                 ListColorBotton: TButton;
66                 ListDefaultBotton: TButton;
67                 HintFontButton: TButton;
68                 HintBackButton: TButton;
69                 HintDefaultButton: TButton;
70                 HintMemo: TMemo;
71                 EditorMemo: TMemo;
72                 EditorFontBotton: TButton;
73                 EditorColorBotton: TButton;
74                 EditorDefaultBotton: TButton;
75                 BrowserTabMemo: TMemo;
76                 BruwserTabFontButton: TButton;
77                 BrowserTabDefaultButton: TButton;
78                 OddResNumCheckBox: TCheckBox;
79                 OddResNumColorBox: TColorBox;
80                 CSSTabSheet: TTabSheet;
81                 GroupBox12: TGroupBox;
82                 CSSListLabel: TLabel;
83                 CSSCheckBox: TCheckBox;
84                 CSSListView: TListView;
85                 CSSBrowser: TWebBrowser;
86                 CSSFontCheckBox: TCheckBox;
87                 CSSBackColorCheckBox: TCheckBox;
88                 CSSFontButton: TButton;
89                 CSSBackColorButton: TButton;
90                 TabSheet3: TTabSheet;
91                 GroupBox9: TGroupBox;
92                 ThreadListIconCheckBox: TCheckBox;
93                 GroupBox16: TGroupBox;
94                 CreationTimeLogsCheckBox: TCheckBox;
95                 FutureThreadCheckBox: TCheckBox;
96                 GroupBox5: TGroupBox;
97                 BrowserMaxLabel: TLabel;
98                 BrowserMaxCombo: TComboBox;
99                 GroupBox17: TGroupBox;
100                 SelectIntervalLabel: TLabel;
101                 Label4: TLabel;
102                 Label6: TLabel;
103                 SelectIntervalEdit: TEdit;
104                 GroupBox18: TGroupBox;
105                 DatOchiSortCombo: TComboBox;
106                 ThreadSheet: TTabSheet;
107                 GroupBox1: TGroupBox;
108                 ShowMailCheckBox: TCheckBox;
109                 ResRangeHoldCheckBox: TCheckBox;
110                 ResRangeHoldComboBox: TComboBox;
111                 GroupBox2: TGroupBox;
112                 AppFolderLabel: TLabel;
113                 URLAppCheckBox: TCheckBox;
114                 AppFolderEdit: TEdit;
115                 AppFolderButton: TButton;
116                 OpenMailerCheckBox: TCheckBox;
117                 GroupBox6: TGroupBox;
118                 LogDeleteMessageCheckBox: TCheckBox;
119                 TabSheet1: TTabSheet;
120                 TabAddRadioGroup: TRadioGroup;
121                 GroupBox8: TGroupBox;
122                 Label14: TLabel;
123                 Label15: TLabel;
124                 Label16: TLabel;
125                 PreviewVisibleCheckBox: TCheckBox;
126                 PreviewSizeComboBox: TComboBox;
127                 PreviewWaitEdit: TEdit;
128                 GroupBox10: TGroupBox;
129                 UnActivePopupCheckBox: TCheckBox;
130                 ResPopupBoldCheckBox: TCheckBox;
131                 TabSheet2: TTabSheet;
132                 GroupBox7: TGroupBox;
133                 Label3: TLabel;
134                 Label11: TLabel;
135                 URLDisplayCheckBox: TCheckBox;
136                 AddressHistoryCountEdit: TEdit;
137                 TabStopAddressBarCheckBox: TCheckBox;
138                 LinkAddCheckBox: TCheckBox;
139                 GroupBox15: TGroupBox;
140                 ShowDialogForEndCheckBox: TCheckBox;
141                 AllTabCloseCheckBox: TCheckBox;
142                 SambaGroupBox: TGroupBox;
143                 UseSambaCheckBox: TCheckBox;
144                 TabAutoSaveLoad: TGroupBox;
145                 TabLoadSave: TCheckBox;
146                 SoundSheet: TTabSheet;
147                 SoundEventGroupBox: TGroupBox;
148                 SoundListView: TListView;
149                 SoundReferButton: TButton;
150                 SoundFileEdit: TEdit;
151                 SoundPlayButton: TBitBtn;
152                 FolderSheet: TTabSheet;
153                 FolderGroupBox: TGroupBox;
154                 Label1: TLabel;
155                 Label2: TLabel;
156                 Label5: TLabel;
157                 LogFolderEdit: TEdit;
158                 LogFolderButton: TButton;
159                 NGwordSheet: TTabSheet;
160                 GroupBox14: TGroupBox;
161                 RloCheckBox: TCheckBox;
162                 ReplaceulCheckBox: TCheckBox;
163                 PopUpAbonCheckBox: TCheckBox;
164                 ShowNGLineCheckBox: TCheckBox;
165                 AddResAnchorCheckBox: TCheckBox;
166                 DeleteSyriaCheckBox: TCheckBox;
167                 UserIDSheet: TTabSheet;
168                 GroupBox3: TGroupBox;
169                 Label9: TLabel;
170                 Label10: TLabel;
171                 ForcedLoginLabel: TLabel;
172                 UserIDEdit: TEdit;
173                 PasswordEdit: TEdit;
174                 AutoLoginCheckBox: TCheckBox;
175                 ForcedLoginCheckBox: TCheckBox;
176                 GroupBox4: TGroupBox;
177                 Label13: TLabel;
178                 BoardURLComboBox: TComboBox;
179                 AddURLButton: TButton;
180                 RemoveURLButton: TButton;
181                 OkBotton: TButton;
182                 SpamFilterGroupBox: TGroupBox;
183                 SpamFilterAlgorithmComboBox: TComboBox;
184                 TabSheet4: TTabSheet;
185                 GroupBox13: TGroupBox;
186                 UseUndecidedCheckBox: TCheckBox;
187                 Tora3URLLabel: TLabel;
188                 Label12: TLabel;
189                 GroupBox11: TGroupBox;
190                 Label7: TLabel;
191                 BeUserIDEdit: TEdit;
192                 Label8: TLabel;
193     BeCodeEdit: TEdit;
194                 BeAutoLoginCheckBox: TCheckBox;
195     GroupBox19: TGroupBox;
196     Label17: TLabel;
197     MaxRecordCountEdit: TEdit;
198     Label18: TLabel;
199     UnFocusedBoldCheckBox: TCheckBox;
200     IgnoreKanaCheckBox: TCheckBox;
201     UseKatjuTypeSkinCheckBox: TCheckBox;
202     GroupBox20: TGroupBox;
203     AutoSortCheckBox: TCheckBox;
204     Label24: TLabel;
205     GroupBox21: TGroupBox;
206     StoredTaskTrayCB: TCheckBox;
207     GroupBox22: TGroupBox;
208     LoopBrowserTabsCB: TCheckBox;
209     GroupBox23: TGroupBox;
210     IgnoreContextCheckBox: TCheckBox;
211     GroupBox24: TGroupBox;
212     gppRightTopRB: TRadioButton;
213     gppTopRB: TRadioButton;
214     gppLeftTopRB: TRadioButton;
215     gppLeftRB: TRadioButton;
216     gppRightRB: TRadioButton;
217     gppLeftBottomRB: TRadioButton;
218     gppBottomRB: TRadioButton;
219     gppRighBottomRB: TRadioButton;
220     ResAnchorCheckBox: TCheckBox;
221     IgnoreLimitResCountCheckBox: TCheckBox;
222     GroupBox25: TGroupBox;
223     Label25: TLabel;
224     BoukenComboBox: TComboBox;
225     BoukenModButton: TButton;
226     BoukenDelButton: TButton;
227     BoukenEdit: TEdit;
228     GroupBox26: TGroupBox;
229     UseUnicodeCB: TCheckBox;
230     Label27: TLabel;
231                 procedure FormCreate(Sender: TObject);
232                 procedure FormDestroy(Sender: TObject);
233                 procedure ApplyButtonClick(Sender: TObject);
234                 procedure CabinetFontBottonClick(Sender: TObject);
235                 procedure CabinetColorBottonClick(Sender: TObject);
236                 procedure EditorFontBottonClick(Sender: TObject);
237                 procedure OkBottonClick(Sender: TObject);
238                 procedure ReadProxyCheckClick(Sender: TObject);
239                 procedure ListFontBottonClick(Sender: TObject);
240                 procedure ListColorBottonClick(Sender: TObject);
241                 procedure EditorColorBottonClick(Sender: TObject);
242                 procedure CabinetDefaultButtonClick(Sender: TObject);
243                 procedure ReadPortEditExit(Sender: TObject);
244                 procedure ListDefaultBottonClick(Sender: TObject);
245                 procedure EditorDefaultBottonClick(Sender: TObject);
246                 procedure HintFontButtonClick(Sender: TObject);
247                 procedure HintBackButtonClick(Sender: TObject);
248                 procedure HintDefaultButtonClick(Sender: TObject);
249                 procedure LogFolderButtonClick(Sender: TObject);
250                 procedure FormClose(Sender: TObject; var Action: TCloseAction);
251                 procedure SoundReferButtonClick(Sender: TObject);
252                 procedure SoundPlayButtonClick(Sender: TObject);
253                 procedure SoundListViewChanging(Sender: TObject; Item: TListItem;
254                         Change: TItemChange; var AllowChange: Boolean);
255                 procedure SoundFileEditChange(Sender: TObject);
256                 procedure OptionTabChange(Sender: TObject);
257                 procedure AppFolderButtonClick(Sender: TObject);
258                 procedure WriteProxyCheckClick(Sender: TObject);
259                 procedure WritePortEditExit(Sender: TObject);
260                 procedure Tora3URLLabelClick(Sender: TObject);
261                 procedure HotKeyEnter(Sender: TObject);
262                 procedure HotKeyExit(Sender: TObject);
263                 procedure URLAppCheckBoxClick(Sender: TObject);
264                 procedure BruwserTabFontButtonClick(Sender: TObject);
265                 procedure BrowserTabDefaultButtonClick(Sender: TObject);
266                 procedure AddressHistoryCountEditExit(Sender: TObject);
267                 procedure PreviewWaitEditExit(Sender: TObject);
268                 procedure CSSCheckBoxClick(Sender: TObject);            procedure CSSFontButtonClick(Sender: TObject);
269                 procedure CSSBackColorButtonClick(Sender: TObject);
270                 procedure CSSFontCheckBoxClick(Sender: TObject);
271                 procedure CSSBackColorCheckBoxClick(Sender: TObject);
272                 procedure CSSListViewChange(Sender: TObject; Item: TListItem;
273                         Change: TItemChange);
274                 procedure AddURLButtonClick(Sender: TObject);
275                 procedure RemoveURLButtonClick(Sender: TObject);
276                 procedure OddResNumCheckBoxClick(Sender: TObject);
277                 procedure ResRangeHoldCheckBoxClick(Sender: TObject);
278                 procedure CroutOptionClick(Sender: TObject);
279     procedure MaxRecordCountEditExit(Sender: TObject);
280     procedure BoukenDelButtonClick(Sender: TObject);
281     procedure BoukenComboBoxChange(Sender: TObject);
282     procedure BoukenModButtonClick(Sender: TObject);
283         private
284                 { Private \90é\8c¾ }
285                 FClose: Boolean;
286                 FRepaintList: Boolean;
287                 FRepaintThread: Boolean;
288                 FCSSFont: TFont;
289                 FCSSBackColor: TColor;
290                 FCSSStrings: TStringList;
291                 function GetMemoText(font: TFont; text: string): string;
292 //              function GetFontText(Font: TFont; Text: string): string;
293                 procedure SetValue;
294                 procedure SaveSetting;
295                 procedure SettingApply;
296                 function CheckFolder: Boolean;
297                 procedure SetAbonpropertys;
298                 procedure CSSSetContent(Content: string);
299                 procedure CSSPreview;
300                 //! CSS\83v\83\8c\83r\83\85\81[\97pHTMLBody\90\90¬
301                 function CreatePreviewBody(Res: array of TResRec): string;
302                 //! CSS/SKIN\83v\83\8c\83r\83\85\81[\97pStyle\95\8e\9a\97ñ\8eæ\93¾
303                 function GetPreviewUserStyle(): string;
304         public
305                 { Public \90é\8c¾ }
306         end;
307
308 var
309         OptionDialog: TOptionDialog;
310
311 implementation
312
313 uses
314         Giko, Editor, Setting, ActnList, KuroutSetting, Math, HTMLCreate;
315
316 const
317         FONT_TEXT: string = '%s %d pt';
318         MEMO_CABINET: string = '\83L\83\83\83r\83l\83b\83g';
319         MEMO_THREAD: string = '\83X\83\8c\83b\83h\83\8a\83X\83g';
320         MEMO_BROWSERPOPUP: string = '\83u\83\89\83E\83U\83|\83b\83v\83A\83b\83v';
321         MEMO_BROWSERTAB: string = '\83u\83\89\83E\83U\83^\83u';
322         MEMO_EDITOR: string = '\83G\83f\83B\83^\83e\83L\83X\83g';
323         DEFAULT_FONT_NAME: string = '\82l\82\82o\83S\83V\83b\83N';
324         DEFAULT_FONT_SIZE: Integer = 9;
325         DEFAULT_TABFONT_NAME: string = '\82l\82\82o\83S\83V\83b\83N';
326         DEFAULT_TABFONT_SIZE: Integer = 9;
327 //      URL_TORA3: WideString = 'http://2ch.tora3.net/';
328         URL_TORA3: WideString = 'http://ronin.bbspink.com/';
329         DEFAULT_CSS_FILENAME = 'default.css';
330
331 {$R *.DFM}
332
333 procedure TOptionDialog.FormCreate(Sender: TObject);
334 var
335     CenterForm: TCustomForm;
336 begin
337     CenterForm := TCustomForm(Owner);
338     if Assigned(CenterForm) then begin
339         Left := ((CenterForm.Width - Width) div 2) + CenterForm.Left;
340         Top := ((CenterForm.Height - Height) div 2) + CenterForm.Top;
341     end else begin
342         Left := (Screen.Width - Width) div 2;
343         Top := (Screen.Height - Height) div 2;
344     end;
345
346         CSSBrowser.Navigate('about:blank');
347         FClose := True;
348
349         OptionTab.ActivePage := ConnectSheet;
350         SetValue;
351
352         CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET);
353         ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD);
354         HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP);
355         BrowserTabMemo.Text := GetMemoText(BrowserTabMemo.Font, MEMO_BROWSERTAB);
356         EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR);
357
358         Tora3URLLabel.Cursor := 5;
359         lblSFont.Caption := '\81\9a\8fd\97v\81\9a'#13#10#13#10
360                                                                                 + '\83X\83\8c\83b\83h\95\\8e¦\83G\83\8a\83A\82Ì\83t\83H\83\93\83g\95Ï\8dX\82Í\81A'#13#10
361                                                                                 + '\81uCSS \82Æ\83X\83L\83\93\81v\83^\83u\82Å\90Ý\92è\8fo\97\88\82Ü\82·';
362
363         ForcedLoginLabel.Caption := '- \83`\83F\83b\83N\82ð\93ü\82ê\82é\82Ì\82Í\83Z\83L\83\85\83\8a\83e\83B\8fã\8dD\82Ü\82µ\82­\82 \82è\82Ü\82¹\82ñ\81B' + #13#10
364                                                                         + '\81@\82â\82Þ\82ð\93¾\82È\82¢\8e\9e\82¾\82¯\82É\82µ\82Ä\82­\82¾\82³\82¢\81B';
365         CSSCheckBoxClick(Sender);
366         BrowserMaxLabel.Caption :=
367                 '\83u\83\89\83E\83U\82ª\8dÅ\8f¬\89»\82³\82ê\82Ä\82¢\82é\82Æ\82«\82É\88È\89º\82Ì\91\80\8dì\82Å\83u\83\89\83E\83U\82ð\8dÅ\91å\89»\82µ\82Ü\82·\81B'#13#10 +
368                 '\82Ü\82½\81A\83z\83C\81[\83\8b\83N\83\8a\83b\83N\82É\82æ\82è\8dÅ\91å\89»\82ð\83L\83\83\83\93\83Z\83\8b\82·\82é\82±\82Æ\82ª\8fo\97\88\82Ü\82·\81B';
369
370         if OptionTab.PageCount > GikoSys.Setting.OptionDialogTabIndex then begin
371                 OptionTab.ActivePageIndex := GikoSys.Setting.OptionDialogTabIndex;
372                 OptionTabChange( nil );
373         end;
374         
375 end;
376
377 procedure TOptionDialog.FormDestroy(Sender: TObject);
378 begin
379         CSSListView.OnChange := nil;
380         if FCSSStrings <> nil then
381                 FCSSStrings.Free;
382         if FCSSFont <> nil then
383                 FCSSFont.Free;
384         sndPlaySound(nil, SND_ASYNC);
385
386 end;
387
388 procedure TOptionDialog.OkBottonClick(Sender: TObject);
389 begin
390         FClose := True;
391         ReadPortEditExit(Sender);
392         WritePortEditExit(Sender);
393         AddressHistoryCountEditExit(Sender);
394     MaxRecordCountEditExit(Sender);
395         PreviewWaitEditExit(Sender);
396
397         if not CheckFolder then begin
398                 FClose := False;
399                 Exit;
400         end;
401                 SetAbonpropertys;
402         SaveSetting;
403         SettingApply;
404
405 end;
406
407 procedure TOptionDialog.ApplyButtonClick(Sender: TObject);
408 begin
409         ReadPortEditExit(Sender);
410         WritePortEditExit(Sender);
411         AddressHistoryCountEditExit(Sender);
412         MaxRecordCountEditExit(Sender);
413         PreviewWaitEditExit(Sender);
414
415         if not CheckFolder then begin
416                 FClose := False;
417                 Exit;
418         end;
419         SetAbonpropertys;
420         SaveSetting;
421         SettingApply;
422         FClose := False;
423 end;
424
425 //function TOptionDialog.GetFontText(Font: TFont; Text: string): string;
426 //begin
427 //      result := Format(Text, [Font.Name, Font.Size]);
428 //end;
429
430 function TOptionDialog.GetMemoText(font: TFont; text: string): string;
431 var
432         s: string;
433 begin
434         s := '';
435         if font <> nil then
436                 s := Format(FONT_TEXT, [Font.Name, Font.Size]) + #13#10;
437         Result := s + text;
438 end;
439
440 //\83L\83\83\83r\83l\83b\83g\83t\83H\83\93\83g\83{\83^\83\93
441 procedure TOptionDialog.CabinetFontBottonClick(Sender: TObject);
442 begin
443         FontDialog.Options := [fdAnsiOnly, fdEffects];
444         FontDialog.Font.Assign(CabinetMemo.Font);
445         if FontDialog.Execute then begin
446                 FontDialog.Font.Style := FontDialog.Font.Style - [fsUnderline] - [fsStrikeout];
447                 CabinetMemo.Font.Assign(FontDialog.Font);
448                 CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET);
449                 CabinetMemo.Font.Charset := SHIFTJIS_CHARSET;
450         end;
451 end;
452
453 //\83L\83\83\83r\83l\83b\83g\94w\8ci\90F\83{\83^\83\93
454 procedure TOptionDialog.CabinetColorBottonClick(Sender: TObject);
455 begin
456         ColorDialog.Color := CabinetMemo.Color;
457         if ColorDialog.Execute then begin
458                 CabinetMemo.Color := ColorDialog.Color;
459         end;
460 end;
461
462 //\83L\83\83\83r\83l\83b\83g\83f\83t\83H\83\8b\83g\83{\83^\83\93
463 procedure TOptionDialog.CabinetDefaultButtonClick(Sender: TObject);
464 begin
465         CabinetMemo.Font.Name := DEFAULT_FONT_NAME;
466         CabinetMemo.Font.Size := DEFAULT_FONT_SIZE;
467         CabinetMemo.Font.Color := clWindowText;
468         CabinetMemo.Font.Style := [];
469         CabinetMemo.Color := clWindow;
470         CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET);
471 end;
472
473 //\83X\83\8c\83b\83h\83\8a\83X\83g\83t\83H\83\93\83g\83{\83^\83\93
474 procedure TOptionDialog.ListFontBottonClick(Sender: TObject);
475 begin
476         FontDialog.Options := [fdAnsiOnly, fdEffects];
477         FontDialog.Font.Assign(ListMemo.Font);
478         if FontDialog.Execute then begin
479                 ListMemo.Font.Assign(FontDialog.Font);
480                 ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD);
481                 ListMemo.Font.Charset := SHIFTJIS_CHARSET;
482         end;
483 end;
484
485 //\83X\83\8c\83b\83h\83\8a\83X\83g\94w\8ci\90F\83{\83^\83\93
486 procedure TOptionDialog.ListColorBottonClick(Sender: TObject);
487 begin
488         ColorDialog.Color := ListMemo.Color;
489         if ColorDialog.Execute then begin
490                 ListMemo.Color := ColorDialog.Color;
491         end;
492 end;
493
494 //\83X\83\8c\83b\83h\83\8a\83X\83g\83f\83t\83H\83\8b\83g\83{\83^\83\93
495 procedure TOptionDialog.ListDefaultBottonClick(Sender: TObject);
496 begin
497         ListMemo.Font.Name := DEFAULT_FONT_NAME;
498         ListMemo.Font.Size := DEFAULT_FONT_SIZE;
499         ListMemo.Font.Color := clWindowText;
500         ListMemo.Font.Style := [];
501         ListMemo.Color := clWindow;
502         ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD);
503 end;
504
505 //\83u\83\89\83E\83U\83|\83b\83v\83A\83b\83v\83t\83H\83\93\83g\83{\83^\83\93
506 procedure TOptionDialog.HintFontButtonClick(Sender: TObject);
507 begin
508         FontDialog.Options := [fdAnsiOnly, fdEffects];
509         FontDialog.Font.Assign(HintMemo.Font);
510         if FontDialog.Execute then begin
511                 HintMemo.Font.Assign(FontDialog.Font);
512                 HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP);
513                 HintMemo.Font.Charset := SHIFTJIS_CHARSET;
514         end;
515 end;
516
517 //\83u\83\89\83E\83U\83|\83b\83v\83A\83b\83v\94w\8ci\90F\83{\83^\83\93
518 procedure TOptionDialog.HintBackButtonClick(Sender: TObject);
519 begin
520         ColorDialog.Color := HintMemo.Color;
521         if ColorDialog.Execute then begin
522                 HintMemo.Color := ColorDialog.Color;
523         end;
524 end;
525
526 //\83u\83\89\83E\83U\83|\83b\83v\83A\83b\83v\83f\83t\83H\83\8b\83g\83{\83^\83\93
527 procedure TOptionDialog.HintDefaultButtonClick(Sender: TObject);
528 begin
529         HintMemo.Font.Name := DEFAULT_FONT_NAME;
530         HintMemo.Font.Size := DEFAULT_FONT_SIZE;
531         HintMemo.Font.Color := clWindowText;
532         HintMemo.Font.Style := [];
533         HintMemo.Color := clInfoBk;
534         HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP);
535 end;
536
537 //\83u\83\89\83E\83U\83^\83u\83t\83H\83\93\83g\83{\83^\83\93
538 procedure TOptionDialog.BruwserTabFontButtonClick(Sender: TObject);
539 begin
540         FontDialog.Options := [fdAnsiOnly];
541         FontDialog.Font.Assign(BrowserTabMemo.Font);
542         if FontDialog.Execute then begin
543                 BrowserTabMemo.Font.Assign(FontDialog.Font);
544                 BrowserTabMemo.Text := GetMemoText(FontDialog.Font, MEMO_BROWSERTAB);
545                 BrowserTabMemo.Font.Charset := SHIFTJIS_CHARSET;
546         end;
547 end;
548
549 //\83u\83\89\83E\83U\83^\83u\83f\83t\83H\83\8b\83g\83{\83^\83\93
550 procedure TOptionDialog.BrowserTabDefaultButtonClick(Sender: TObject);
551 begin
552         BrowserTabMemo.Font.Name := DEFAULT_TABFONT_NAME;
553         BrowserTabMemo.Font.Size := DEFAULT_TABFONT_SIZE;
554         BrowserTabMemo.Font.Color := clWindowText;
555         BrowserTabMemo.Font.Style := [];
556         BrowserTabMemo.Color := clBtnFace;
557         BrowserTabMemo.Text := GetMemoText(BrowserTabMemo.Font, MEMO_BROWSERTAB);
558 end;
559
560 //\83G\83f\83B\83^\83t\83H\83\93\83g\83{\83^\83\93
561 procedure TOptionDialog.EditorFontBottonClick(Sender: TObject);
562 begin
563         FontDialog.Options := [fdAnsiOnly, fdEffects];
564         FontDialog.Font.Assign(EditorMemo.Font);
565         if FontDialog.Execute then begin
566                 EditorMemo.Font.Assign(FontDialog.Font);
567                 EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR);
568                 EditorMemo.Font.Charset := SHIFTJIS_CHARSET;
569         end;
570 end;
571
572 //\83G\83f\83B\83^\94w\8ci\90F\83{\83^\83\93
573 procedure TOptionDialog.EditorColorBottonClick(Sender: TObject);
574 begin
575         ColorDialog.Color := EditorMemo.Font.Color;
576         if ColorDialog.Execute then begin
577                 EditorMemo.Color := ColorDialog.Color;
578         end;
579 end;
580
581 //\83G\83f\83B\83^\83f\83t\83H\83\8b\83g\83{\83^\83\93
582 procedure TOptionDialog.EditorDefaultBottonClick(Sender: TObject);
583 begin
584         EditorMemo.Font.Name := DEFAULT_FONT_NAME;
585         EditorMemo.Font.Size := DEFAULT_FONT_SIZE;
586         EditorMemo.Font.Color := clWindowText;
587         EditorMemo.Font.Style := [];
588         EditorMemo.Color := clWindow;
589         EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR);
590 end;
591
592 procedure TOptionDialog.SetValue;
593 var
594         i: Integer;
595         Item: TListItem;
596 //      s: string;
597         idx: Integer;
598         FileList : TStringList;
599     DomainList : TStringList;
600 begin
601
602         //\93Ç\82Ý\8d\9e\82Ý\97p\83v\83\8d\83L\83V
603         ReadProxyCheck.Checked := GikoSys.Setting.ReadProxy;
604         ReadProxyCheckClick(nil);
605         ReadProxyAddressEdit.Text := GikoSys.Setting.ReadProxyAddress;
606         ReadPortEdit.Text := IntToStr(GikoSys.Setting.ReadProxyPort);
607         ReadProxyUserIDEdit.Text := GikoSys.Setting.ReadProxyUserID;
608         ReadProxyPasswordEdit.Text := GikoSys.Setting.ReadProxyPassword;
609         //\8f\91\82«\8d\9e\82Ý\97p\83v\83\8d\83L\83V
610         WriteProxyCheck.Checked := GikoSys.Setting.WriteProxy;
611         WriteProxyCheckClick(nil);
612         WriteProxyAddressEdit.Text := GikoSys.Setting.WriteProxyAddress;
613         WritePortEdit.Text := IntToStr(GikoSys.Setting.WriteProxyPort);
614         WriteProxyUserIDEdit.Text := GikoSys.Setting.WriteProxyUserID;
615         WriteProxyPasswordEdit.Text := GikoSys.Setting.WriteProxyPassword;
616         //\83L\83\83\83r\83l\83b\83g\83t\83H\83\93\83g
617         CabinetMemo.Font.Name := GikoSys.Setting.CabinetFontName;
618         CabinetMemo.Font.Size := GikoSys.Setting.CabinetFontSize;
619         CabinetMemo.Font.Color := GikoSys.Setting.CabinetFontColor;
620         CabinetMemo.Font.Style := [];
621         if GikoSys.Setting.CabinetFontBold then
622                 CabinetMemo.Font.Style := [fsBold];
623         if GikoSys.Setting.CabinetFontItalic then
624                 CabinetMemo.Font.Style := CabinetMemo.Font.Style + [fsItalic];
625         CabinetMemo.Color := GikoSys.Setting.CabinetBackColor;
626
627         //\83X\83\8c\83b\83h\83\8a\83X\83g\83t\83H\83\93\83g
628         ListMemo.Font.Name := GikoSys.Setting.ListFontName;
629         ListMemo.Font.Size := GikoSys.Setting.ListFontSize;
630         ListMemo.Font.Color := GikoSys.Setting.ListFontColor;
631         ListMemo.Font.Style := [];
632         if GikoSys.Setting.ListFontBold then
633                 ListMemo.Font.Style := ListMemo.Font.Style + [fsBold];
634         if GikoSys.Setting.ListFontItalic then
635                 ListMemo.Font.Style := ListMemo.Font.Style + [fsItalic];
636
637         ListMemo.Color := GikoSys.Setting.ListBackColor;
638         //\83\8c\83X\90\94\91\9d\8c¸\83X\83\8c\8b­\92²\95\\8e¦\83`\83F\83b\83N\83{\83b\83N\83X\81\95\83J\83\89\81[\83_\83C\83A\83\8d\83O
639         OddResNumCheckBox.Checked := GikoSys.Setting.UseOddColorOddResNum;
640         OddResNumColorBox.Selected := GikoSys.Setting.OddColor;
641         OddResNumColorBox.Enabled := OddResNumCheckBox.Checked;
642         UnFocusedBoldCheckBox.Checked := GikoSys.Setting.UnFocusedBold;
643         UnFocusedBoldCheckBox.Enabled := OddResNumCheckBox.Checked;
644
645         //\83u\83\89\83E\83U\83|\83b\83v\83A\83b\83v\83t\83H\83\93\83g
646         HintMemo.Font.Name := GikoSys.Setting.HintFontName;
647         HintMemo.Font.Size := GikoSys.Setting.HintFontSize;
648         HintMemo.Font.Color := GikoSys.Setting.HintFontColor;
649         HintMemo.Color := GikoSys.Setting.HintBackColor;
650         //\83u\83\89\83E\83U\83^\83u\83t\83H\83\93\83g
651         BrowserTabMemo.Font.Name := GikoSys.Setting.BrowserTabFontName;
652         BrowserTabMemo.Font.Size := GikoSys.Setting.BrowserTabFontSize;
653         BrowserTabMemo.Font.Style := [];
654         if GikoSys.Setting.BrowserTabFontBold then
655                 BrowserTabMemo.Font.Style := BrowserTabMemo.Font.Style + [fsBold];
656         if GikoSys.Setting.BrowserTabFontItalic then
657                 BrowserTabMemo.Font.Style := BrowserTabMemo.Font.Style + [fsItalic];
658         //\83G\83f\83B\83^\83\81\83\82\83t\83H\83\93\83g
659         EditorMemo.Font.Name := GikoSys.Setting.EditorFontName;
660         EditorMemo.Font.Size := GikoSys.Setting.EditorFontSize;
661         EditorMemo.Font.Color := GikoSys.Setting.EditorFontColor;
662         EditorMemo.Color := GikoSys.Setting.EditorBackColor;
663         //CSS\95\\8e¦
664         CSSCheckBox.Checked := GikoSys.Setting.UseCSS;
665         //\82©\82¿\82ã\83X\83L\83\93\8eg\97p
666         UseKatjuTypeSkinCheckBox.Checked := GikoSys.Setting.UseKatjushaType;
667         if FCSSFont <> nil then
668                 FCSSFont.Free;
669         FCSSFont := TFont.Create;
670         if (GikoSys.Setting.BrowserFontName <> '') or
671                  (GikoSys.Setting.BrowserFontSize <> 0) or
672                  (GikoSys.Setting.BrowserFontBold <> 0) or
673                  (GikoSys.Setting.BrowserFontItalic <> 0) or
674                  (GikoSys.Setting.BrowserFontColor <> -1 ) then begin
675                 CSSFontCheckBox.Checked := True;
676                 FCSSFont.Name := GikoSys.Setting.BrowserFontName;
677                 FCSSFont.Size := GikoSys.Setting.BrowserFontSize;
678                 FCSSFont.Style := [];
679                 if GikoSys.Setting.BrowserFontBold = 1 then
680                         FCSSFont.Style := FCSSFont.Style + [fsBold];
681                 if GikoSys.Setting.BrowserFontItalic = 1 then
682                         FCSSFont.Style := FCSSFont.Style + [fsItalic];
683                 i := GikoSys.Setting.BrowserFontColor;
684                 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
685                 FCSSFont.Color := i;
686         end;
687         if GikoSys.Setting.BrowserBackColor <> -1 then begin
688                 CSSBackColorCheckBox.Checked := True;
689
690                 i := GikoSys.Setting.BrowserBackColor;
691                 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
692                 FCSSBackColor := i;
693         end;
694         //
695         //\83X\83^\83C\83\8b\83V\81[\83g\83t\83@\83C\83\8b\96¼\88ê\97\97
696         FileList := TStringList.Create;
697         try
698         FileList.BeginUpdate;
699                 GikoSys.GetFileList(GikoSys.GetStyleSheetDir, '*.css', FileList, True, True);
700         FileList.EndUpdate;
701                 Idx := Length(GikoSys.GetStyleSheetDir);
702                 for i := 0 to FileList.Count - 1 do
703                         FileList[i] := Copy(FileList[i], Idx + 1, Length(FileList[i]));
704                 FileList.Sort;
705                 for i := 0 to FileList.Count - 1 do begin
706                         //s := ExtractFileName(FileList[i]);
707                         if LowerCase(FileList[i]) = DEFAULT_CSS_FILENAME then
708                                 Item := CSSListView.Items.Insert(0)
709                         else
710                                 Item := CSSListView.Items.Add;
711                         Item.Caption := ChangeFileExt(FileList[i], '');
712                         if LowerCase(FileList[i]) = LowerCase(GikoSys.Setting.CSSFileName) then
713                                 Item.Selected := True;
714                 end;
715         finally
716                 FileList.Free;
717         end;
718         //\83X\83L\83\93\83t\83@\83C\83\8b\96¼\88ê\97\97
719         //FileList := TStringList.Create;
720         if FCSSStrings <> nil then
721                 FCSSStrings.Clear;
722         FCSSStrings := TStringList.Create;
723         try
724                 GikoSys.GetDirectoryList(GikoSys.GetSkinDir, '*', FCSSStrings, False);
725
726                 Idx := Length(GikoSys.GetSkinDir);
727                 FCSSStrings.Sort;
728                 for i := 0 to FCSSStrings.Count - 1 do begin
729                         Item := CSSListView.Items.Add;
730                         Item.Data := PChar( FCSSStrings[i] );
731                         Item.Caption := Copy( FCSSStrings[i], Idx + 1, Length(FCSSStrings[i]) );
732                         if LowerCase(FCSSStrings[i]) = LowerCase(GikoSys.Setting.CSSFileName) then
733                                 Item.Selected := True;
734                 end;
735         finally
736         end;
737
738         if (CSSListView.ItemIndex = -1) and (CSSListView.Items.Count > 0) then
739                 CSSListView.Items[0].Selected := True;
740
741         //Mail\97\93\95\\8e¦
742         ShowMailCheckBox.Checked := GikoSys.Setting.ShowMail;
743
744         // \8bN\93®\8e\9e\83\8c\83X\95\\8e¦\94Í\88Í\82Ì\8cÅ\92è
745         ResRangeHoldCheckBox.Checked := GikoSys.Setting.ResRangeHold;
746         case GikoSys.Setting.ResRange of
747         Ord( grrAll ):  ResRangeHoldComboBox.ItemIndex := 0;
748         Ord( grrKoko ): ResRangeHoldComboBox.ItemIndex := 2;
749         Ord( grrNew ):  ResRangeHoldComboBox.ItemIndex := 3;
750         10..65535:                                              ResRangeHoldComboBox.ItemIndex := 1;
751         end;
752         ResRangeHoldComboBox.Enabled := GikoSys.Setting.ResRangeHold;
753         //\83^\83u\92Ç\89Á\88Ê\92u
754         TabAddRadioGroup.ItemIndex := Ord(GikoSys.Setting.BrowserTabAppend);
755         //\94Â\8dX\90VURL
756         //BoardURL2chEdit.Text := GikoSys.Setting.BoardURL2ch;
757                 BoardURLComboBox.Clear;
758                 BoardURLComboBox.Items.AddStrings(GikoSys.Setting.BoardURLs);
759                 try
760                         BoardURLComboBox.ItemIndex := GikoSys.Setting.BoardURLSelected - 1;
761                 except
762                         BoardURLComboBox.ItemIndex := 0;
763                 end;
764         //\94F\8fØ
765         UserIDEdit.Text := GikoSys.Setting.UserID;
766         PasswordEdit.Text := GikoSys.Setting.Password;
767         AutoLoginCheckBox.Checked := GikoSys.Setting.AutoLogin;
768         ForcedLoginCheckBox.Checked := GikoSys.Setting.ForcedLogin;
769         //\83\8d\83O\83t\83H\83\8b\83_
770         if GikoSys.Setting.NewLogFolder = '' then
771                 LogFolderEdit.Text := GikoSys.Setting.LogFolder
772         else
773                 LogFolderEdit.Text := GikoSys.Setting.NewLogFolder;
774         //\83T\83E\83\93\83h
775         for i := 0 to GikoSys.Setting.GetSoundCount - 1 do begin
776                 Item := SoundListView.Items.Add;
777                 Item.Caption := GikoSys.Setting.SoundViewName[i];
778                 if FileExists(GikoSys.Setting.SoundFileName[i]) then
779                         Item.SubItems.Add(GikoSys.Setting.SoundFileName[i])
780                 else
781                         Item.SubItems.Add('');
782         end;
783         //URL\83N\83\8a\83b\83N\8e\9e\93®\8dì
784         URLAppCheckBox.Checked := GikoSys.Setting.URLApp;
785         URLAppCheckBoxClick(nil);
786         AppFolderEdit.Text := GikoSys.Setting.URLAppFile;
787
788         //mailto\83N\83\8a\83b\83N\8e\9e\93®\8dì
789         OpenMailerCheckBox.Checked := GikoSys.Setting.OpenMailer;
790
791         //\83\8d\83O\8dí\8f\9c\8e\9e\83\81\83b\83Z\81[\83W
792         LogDeleteMessageCheckBox.Checked := GikoSys.Setting.DeleteMsg;
793     //\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
794     IgnoreLimitResCountCheckBox.Checked := GikoSys.Setting.LimitResCountMessage;
795
796         //\8fI\97¹\8e\9e\8am\94F\83_\83C\83A\83\8d\83O
797         ShowDialogForEndCheckBox.Checked := GikoSys.Setting.ShowDialogForEnd;
798         //AllTabClose
799         AllTabCloseCheckBox.Checked := GikoSys.Setting.ShowDialogForAllTabClose;
800         //Samba
801         UseSambaCheckBox.Checked := GikoSys.Setting.UseSamba;
802         ResAnchorCheckBox.Checked := GikoSys.Setting.ResAnchorJamp;
803         // \83u\83\89\83E\83U\8dÅ\91å\89»
804         BrowserMaxCombo.ItemIndex := Ord( GikoSys.Setting.BrowserAutoMaximize );
805         //\83|\83b\83v\83A\83b\83v\88Ê\92u
806         case GikoSys.Setting.PopupPosition of
807                 gppRightTop:            gppRightTopRB.Checked := True;
808                 gppRight:                       gppRightRB.Checked := True;
809                 gppRightBottom:     gppRighBottomRB.Checked := True;
810                 gppTop:                         gppTopRB.Checked := True;
811                 gppCenter:                      gppTopRB.Checked := True; // \93Ç\82Ý\8d\9e\82Ý\82Å\95Ï\8a·\82µ\82Ä\82é\82Í\82¸
812                 gppBottom:                      gppBottomRB.Checked := True;
813                 gppLeftTop:             gppLeftTopRB.Checked := True;
814                 gppLeft:                        gppLeftRB.Checked := True;
815                 gppLeftBottom:      gppLeftBottomRB.Checked := True;
816         end;
817
818         //\94ñ\83A\83N\83e\83B\83u\8e\9e\83|\83b\83v\83A\83b\83v\95\\8e¦
819         UnActivePopupCheckBox.Checked := GikoSys.Setting.UnActivePopup;
820         //\83\8c\83X\83|\83b\83v\83A\83b\83v\83{\81[\83\8b\83h\95\\8e¦
821         ResPopupBoldCheckBox.Checked := GikoSys.Setting.ResPopupHeaderBold;
822
823         //\83A\83h\83\8c\83X\83o\81[
824         URLDisplayCheckBox.Checked := GikoSys.Setting.URLDisplay;
825         TabStopAddressBarCheckBox.Checked := GikoSys.Setting.AddressBarTabStop;
826         LinkAddCheckBox.Checked := GikoSys.Setting.LinkAddAddressBar;
827         AddressHistoryCountEdit.Text := IntToStr(GikoSys.Setting.AddressHistoryCount);
828
829         //HTML\83v\83\8c\83r\83\85\81[
830         PreviewVisibleCheckBox.Checked := GikoSys.Setting.PreviewVisible;
831         PreviewWaitEdit.Text := IntToStr(GikoSys.Setting.PreviewWait);
832         PreviewSizeComboBox.ItemIndex := 2;
833         case GikoSys.Setting.PreviewSize of
834                 gpsXLarge: PreviewSizeComboBox.ItemIndex := 4;
835                 gpsLarge: PreviewSizeComboBox.ItemIndex := 3;
836                 gpsMedium: PreviewSizeComboBox.ItemIndex := 2;
837                 gpsSmall: PreviewSizeComboBox.ItemIndex := 1;
838                 gpsXSmall: PreviewSizeComboBox.ItemIndex := 0;
839         end;
840
841         //\83X\83\8c\83b\83h\88ê\97\97\8dX\90V\83A\83C\83R\83\93
842         ThreadListIconCheckBox.Checked := GikoSys.Setting.ListIconVisible;
843         CreationTimeLogsCheckBox.Checked := GikoSys.Setting.CreationTimeLogs;
844         FutureThreadCheckBox.Checked := GikoSys.Setting.FutureThread;
845         SelectIntervalEdit.Text := IntToStr(GikoSys.Setting.SelectInterval);
846
847         //dat\97\8e\82¿\83X\83\8c\83\\81[\83g\8f\87
848         case TGikoBoardColumnID( GikoSys.Setting.DatOchiSortIndex ) of
849                 gbcTitle:
850                         if GikoSys.Setting.DatOchiSortOrder then
851                                 DatOchiSortCombo.ItemIndex := 1
852                         else
853                                 DatOchiSortCombo.ItemIndex := 2;
854                 gbcRoundDate://gbcLastModified:
855                         if GikoSys.Setting.DatOchiSortOrder then
856                                 DatOchiSortCombo.ItemIndex := 3
857                         else
858                                 DatOchiSortCombo.ItemIndex := 4;
859                 gbcCreated:
860                         if GikoSys.Setting.DatOchiSortOrder then
861                                 DatOchiSortCombo.ItemIndex := 5
862                         else
863                                 DatOchiSortCombo.ItemIndex := 6;
864                 gbcLastModified:
865                         if GikoSys.Setting.DatOchiSortOrder then
866                                 DatOchiSortCombo.ItemIndex := 7
867                         else
868                                 DatOchiSortCombo.ItemIndex := 8;
869         else
870                 DatOchiSortCombo.ItemIndex := 0;
871         end;
872         AutoSortCheckBox.Checked := GikoSys.Setting.AutoSortThreadList;
873         
874         //\82 \82Ú\81`\82ñ
875         RloCheckBox.Checked := GikoSys.Setting.AbonDeleterlo;
876         ReplaceulCheckBox.Checked := GikoSys.Setting.AbonReplaceul;
877         PopUpAbonCheckBox.Checked := GikoSys.Setting.PopUpAbon;
878         ShowNGLineCheckBox.Checked := GikoSys.Setting.ShowNGLinesNum;
879         AddResAnchorCheckBox.Checked := GikoSys.Setting.AddResAnchor;
880         DeleteSyriaCheckBox.Checked := GikoSys.Setting.DeleteSyria;
881         IgnoreKanaCheckBox.Checked := GikoSys.Setting.IgnoreKana;
882 {$IFDEF SPAM_FILTER_ENABLED}
883         // \83X\83p\83\80\83t\83B\83\8b\83^\82Ì\90Ý\92è\82ð\95\\8e¦\82·\82é
884         SpamFilterGroupBox.Visible := True;
885 {$ENDIF}
886         // \8eg\97p\82·\82é\83X\83p\83\80\83t\83B\83\8b\83^
887 {$IFDEF DEBUG}
888         SpamFilterAlgorithmComboBox.Clear;
889         SpamFilterAlgorithmComboBox.AddItem( '\8eg\97p\82µ\82È\82¢', nil );
890         SpamFilterAlgorithmComboBox.AddItem( 'Paul Graham \96@', nil );
891         SpamFilterAlgorithmComboBox.AddItem( 'Gary Robinson \96@', nil );
892         SpamFilterAlgorithmComboBox.AddItem( 'Gary Robinson-Fisher \96@', nil );
893 {$ENDIF}
894         SpamFilterAlgorithmComboBox.ItemIndex :=
895                 Ord( GikoSys.Setting.SpamFilterAlgorithm );
896
897         //TabAutoLoad
898         TabLoadSave.Checked := Gikosys.Setting.TabAutoLoadSave;
899         UseUndecidedCheckBox.Checked := GikoSys.Setting.UseUndecided;
900
901     // \83\8c\83X\83G\83f\83B\83^Unicode\93ü\97Í
902     UseUnicodeCB.Checked := Gikosys.Setting.UseUnicode;
903
904         //Be2ch\94F\8fØ
905         BeUserIDEdit.Text := GikoSys.Setting.BeUserID;
906         BeCodeEdit.Text := GikoSys.Setting.BePassword;
907         BeAutoLoginCheckBox.Checked := GikoSys.Setting.BeAutoLogin;
908         //\97\9a\97ð\82Ì\8dÅ\91å\95Û\91\90\94
909         MaxRecordCountEdit.Text := IntToStr(GikoSys.Setting.MaxRecordCount);
910     // \8dÅ\8f¬\89»\8e\9e\82É\83^\83X\83N\83g\83\8c\83C\82É\8ai\94[\82·\82é\82©
911     StoredTaskTrayCB.Checked := GikoSys.Setting.StoredTaskTray;
912     // \83u\83\89\83E\83U\83^\83u\82Ì\88Ú\93®\82Å\83\8b\81[\83v\82ð\8b\96\89Â\82·\82é\82©
913     LoopBrowserTabsCB.Checked := GikoSys.Setting.LoopBrowserTabs;
914     //
915     IgnoreContextCheckBox.Checked := GikoSys.Setting.GestureIgnoreContext;
916
917     // \96`\8c¯\82Ì\8f\91\83h\83\81\83C\83\93\88ê\97\97\8eæ\93¾
918     BoukenComboBox.Text := '';
919     BoukenComboBox.Items.Clear;
920     DomainList := TStringList.Create;
921     GikoSys.GetBoukenDomain(DomainList);
922     for i := 0 to DomainList.Count - 1 do begin
923         BoukenComboBox.Items.Add( DomainList[i] ) ;
924     end;
925     DomainList.Free;
926     BoukenComboBox.ItemIndex := 0;
927     BoukenComboBox.OnChange(nil);
928 end;
929
930 procedure TOptionDialog.SaveSetting;
931 var
932         i: Integer;
933         tmp: string;
934 //      Item: TListItem;
935 begin
936         GikoSys.Setting.OptionDialogTabIndex := OptionTab.TabIndex;
937
938         GikoSys.Setting.ReadProxy := ReadProxyCheck.Checked;
939         GikoSys.Setting.ReadProxyAddress := ReadProxyAddressEdit.Text;
940         GikoSys.Setting.ReadProxyPort := StrToInt(ReadPortEdit.Text);
941         GikoSys.Setting.ReadProxyUserID := ReadProxyUserIDEdit.Text;
942         GikoSys.Setting.ReadProxyPassword := ReadProxyPasswordEdit.Text;
943
944         GikoSys.Setting.WriteProxy := WriteProxyCheck.Checked;
945         GikoSys.Setting.WriteProxyAddress := WriteProxyAddressEdit.Text;
946         GikoSys.Setting.WriteProxyPort := StrToInt(WritePortEdit.Text);
947         GikoSys.Setting.WriteProxyUserID := WriteProxyUserIDEdit.Text;
948         GikoSys.Setting.WriteProxyPassword := WriteProxyPasswordEdit.Text;
949
950         GikoSys.Setting.CabinetFontName := CabinetMemo.Font.Name;
951         GikoSys.Setting.CabinetFontSize := CabinetMemo.Font.Size;
952         GikoSys.Setting.CabinetFontColor := CabinetMemo.Font.Color;
953         GikoSys.Setting.CabinetFontBold  := fsBold in CabinetMemo.Font.Style;
954         GikoSys.Setting.CabinetFontItalic:= fsItalic in CabinetMemo.Font.Style;
955         GikoSys.Setting.CabinetBackColor := CabinetMemo.Color;
956
957         GikoSys.Setting.ListFontName    := ListMemo.Font.Name;
958         GikoSys.Setting.ListFontSize    := ListMemo.Font.Size;
959         GikoSys.Setting.ListFontColor   := ListMemo.Font.Color;
960         GikoSys.Setting.ListFontBold    := fsBold in ListMemo.Font.Style;
961         GikoSys.Setting.ListFontItalic  := fsItalic in ListMemo.Font.Style;
962         GikoSys.Setting.ListBackColor := ListMemo.Color;
963         GikoSys.Setting.UseOddColorOddResNum := OddResNumCheckBox.Checked;
964         GikoSys.Setting.OddColor := OddResNumColorBox.Selected;
965         GikoSys.Setting.UnFocusedBold := (UnFocusedBoldCheckBox.Enabled) and
966                                                                                 (UnFocusedBoldCheckBox.Checked);
967
968         GikoSys.Setting.HintFontName := HintMemo.Font.Name;
969         GikoSys.Setting.HintFontSize := HintMemo.Font.Size;
970         GikoSys.Setting.HintFontColor := HintMemo.Font.Color;
971         GikoSys.Setting.HintBackColor := HintMemo.Color;
972
973         GikoSys.Setting.BrowserTabFontName := BrowserTabMemo.Font.Name;
974         GikoSys.Setting.BrowserTabFontSize := BrowserTabMemo.Font.Size;
975         GikoSys.Setting.BrowserTabFontBold := fsBold in BrowserTabMemo.Font.Style;
976         GikoSys.Setting.BrowserTabFontItalic := fsItalic in BrowserTabMemo.Font.Style;
977         GikoSys.Setting.EditorFontName := EditorMemo.Font.Name;
978         GikoSys.Setting.EditorFontSize := EditorMemo.Font.Size;
979         GikoSys.Setting.EditorFontColor := EditorMemo.Font.Color;
980         GikoSys.Setting.EditorBackColor := EditorMemo.Color;
981         {FRepaintThread : \95\\8e¦\8dÏ\82Ý\83X\83\8c\83b\83h\82Ì\8dÄ\95`\89æ\82ª\95K\97v\82©\82Ç\82¤\82©
982         \90Ý\92è\82ª\95Ï\82í\82Á\82Ä\82¢\82½\8fê\8d\87\81Atrue\82É\82µ\82Ä\8aù\82É\95\\8e¦\82µ\82Ä\82¢\82é\91S\82Ä\82Ì
983         \83X\83\8c\83b\83h\82ÌRepaint\82ðtrue\82É\82·\82é
984         }
985         //CSS\95\\8e¦
986         if GikoSys.Setting.UseCSS <> CSSCheckBox.Checked then FRepaintThread := true;
987         GikoSys.Setting.UseCSS := CSSCheckBox.Checked;
988         GikoSys.Setting.UseKatjushaType := UseKatjuTypeSkinCheckBox.Checked;
989         //CSS\83t\83@\83C\83\8b\96¼
990         tmp := GikoSys.Setting.CSSFileName;
991         GikoSys.Setting.CSSFileName := DEFAULT_CSS_FILENAME;
992         if CSSListView.Items.Count > 0 then begin
993                 try
994                         if CSSListView.Items[CSSListView.ItemIndex].Data <> nil then
995                                 GikoSys.Setting.CSSFileName := string( CSSListView.Items[CSSListView.ItemIndex].data )
996                         else
997                                 GikoSys.Setting.CSSFileName := CSSListView.Items[CSSListView.ItemIndex].Caption + '.css';
998                 except
999                 end;
1000         end;
1001         if tmp <> GikoSys.Setting.CSSFileName then FRepaintThread := true;
1002         // CSS \82Ì\83t\83H\83\93\83g\8ew\92è
1003         if CSSFontCheckBox.Checked then begin
1004                 if GikoSys.Setting.BrowserFontName <> FCSSFont.Name then FRepaintThread := true;
1005                 GikoSys.Setting.BrowserFontName := FCSSFont.Name;
1006                 if GikoSys.Setting.BrowserFontSize <> FCSSFont.Size then FRepaintThread := true;
1007                 GikoSys.Setting.BrowserFontSize := FCSSFont.Size;
1008                 if fsBold in FCSSFont.Style then begin
1009                         if GikoSys.Setting.BrowserFontBold <> 1 then FRepaintThread := true;
1010                         GikoSys.Setting.BrowserFontBold := 1;
1011                 end else begin
1012                         if GikoSys.Setting.BrowserFontBold <> -1 then FRepaintThread := true;
1013                         GikoSys.Setting.BrowserFontBold := -1;
1014                 end;
1015                 if fsItalic in FCSSFont.Style then begin
1016                         if GikoSys.Setting.BrowserFontItalic <> 1 then FRepaintThread := true;
1017                         GikoSys.Setting.BrowserFontItalic := 1;
1018                 end else begin
1019                         if GikoSys.Setting.BrowserFontItalic <> -1 then FRepaintThread := true;
1020                         GikoSys.Setting.BrowserFontItalic := -1;
1021                 end;
1022                 i := ColorToRGB( FCSSFont.Color );
1023                 if (GikoSys.Setting.BrowserFontColor <> (i shr 16) or (i and $ff00) or ((i and $ff) shl 16)) then
1024                         FRepaintThread := true;
1025                 GikoSys.Setting.BrowserFontColor := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
1026         end else begin
1027                 if GikoSys.Setting.BrowserFontName <> '' then FRepaintThread := true;
1028                 GikoSys.Setting.BrowserFontName := '';
1029                 if GikoSys.Setting.BrowserFontSize <> 0 then FRepaintThread := true;
1030                 GikoSys.Setting.BrowserFontSize := 0;
1031                 if GikoSys.Setting.BrowserFontBold <> 0 then FRepaintThread := true;
1032                 GikoSys.Setting.BrowserFontBold := 0;
1033                 if GikoSys.Setting.BrowserFontItalic <> 0 then FRepaintThread := true;
1034                 GikoSys.Setting.BrowserFontItalic := 0;
1035                 if GikoSys.Setting.BrowserFontColor <> -1 then FRepaintThread := true;
1036                 GikoSys.Setting.BrowserFontColor := -1;
1037         end;
1038         if CSSBackColorCheckBox.Checked then begin
1039                 i := ColorToRGB( FCSSBackColor );
1040                 if(GikoSys.Setting.BrowserBackColor <> (i shr 16) or (i and $ff00) or ((i and $ff) shl 16)) then
1041                         FRepaintThread := true;
1042                 GikoSys.Setting.BrowserBackColor := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
1043         end else begin
1044                 if GikoSys.Setting.BrowserBackColor <> -1 then FRepaintThread := true;
1045                 GikoSys.Setting.BrowserBackColor := -1;
1046         end;
1047
1048         //Mail\97\93\95\\8e¦
1049         if GikoSys.Setting.ShowMail <> ShowMailCheckBox.Checked then FRepaintThread := true;
1050         GikoSys.Setting.ShowMail := ShowMailCheckBox.Checked;
1051         // \8bN\93®\8e\9e\83\8c\83X\95\\8e¦\94Í\88Í\82Ì\8cÅ\92è
1052         GikoSys.Setting.ResRangeHold := ResRangeHoldCheckBox.Checked;
1053         case ResRangeHoldComboBox.ItemIndex of
1054                 0: GikoSys.Setting.ResRange := Ord( grrAll );
1055                 1: GikoSys.Setting.ResRange := GikoSys.Setting.ResRangeExCount;
1056                 2: GikoSys.Setting.ResRange := Ord( grrKoko );
1057                 3: GikoSys.Setting.ResRange := Ord( grrNew );
1058         end;
1059
1060         GikoSys.Setting.BrowserTabAppend := TGikoTabAppend(TabAddRadioGroup.ItemIndex);
1061
1062 //      GikoSys.Setting.BoardURL2ch := BoardURL2chEdit.Text;
1063         GikoSys.Setting.BoardURLs.Clear;
1064         GikoSys.Setting.BoardURLs.AddStrings(BoardURLComboBox.Items);
1065         GikoSys.Setting.BoardURLSelected := BoardURLComboBox.ItemIndex + 1;
1066         GikoSys.Setting.UserID := UserIDEdit.Text;
1067         GikoSys.Setting.Password := PasswordEdit.Text;
1068         GikoSys.Setting.AutoLogin := AutoLoginCheckBox.Checked;
1069         GikoSys.Setting.ForcedLogin := ForcedLoginCheckBox.Checked;
1070         GikoSys.Setting.URLApp := URLAppCheckBox.Checked;
1071         GikoSys.Setting.URLAppFile := AppFolderEdit.Text;
1072
1073         GikoSys.Setting.OpenMailer := OpenMailerCheckBox.Checked;
1074         GikoSys.Setting.DeleteMsg := LogDeleteMessageCheckBox.Checked;
1075     GikoSys.Setting.LimitResCountMessage := IgnoreLimitResCountCheckBox.Checked;
1076
1077         //\8fI\97¹\8e\9e\8am\94F\83_\83C\83A\83\8d\83O
1078         GikoSys.Setting.ShowDialogForEnd := ShowDialogForEndCheckBox.Checked;
1079         //AllTabClose
1080         GikoSys.Setting.ShowDialogForAllTabClose := AllTabCloseCheckBox.Checked;
1081         //Samba
1082         GikoSys.Setting.UseSamba := UseSambaCheckBox.Checked;
1083         GikoSys.Setting.ResAnchorJamp := ResAnchorCheckBox.Checked;
1084         // \83u\83\89\83E\83U\8dÅ\91å\89»
1085         GikoSys.Setting.BrowserAutoMaximize := TGikoBrowserAutoMaximize( BrowserMaxCombo.ItemIndex );
1086         //\83|\83b\83v\83A\83b\83v\88Ê\92u
1087     if (gppRightTopRB.Checked) then GikoSys.Setting.PopupPosition := gppRightTop;
1088     if (gppRightRB.Checked) then GikoSys.Setting.PopupPosition := gppRight;
1089     if (gppRighBottomRB.Checked) then GikoSys.Setting.PopupPosition := gppRightBottom;
1090     if (gppTopRB.Checked) then GikoSys.Setting.PopupPosition := gppTop;
1091     if (gppBottomRB.Checked) then GikoSys.Setting.PopupPosition := gppBottom;
1092     if (gppLeftTopRB.Checked) then GikoSys.Setting.PopupPosition := gppLeftTop;
1093     if (gppLeftRB.Checked) then GikoSys.Setting.PopupPosition := gppLeft;
1094     if (gppLeftBottomRB.Checked) then GikoSys.Setting.PopupPosition := gppLeftBottom;
1095         //\94ñ\83A\83N\83e\83B\83u\8e\9e\83|\83b\83v\83A\83b\83v\95\\8e¦
1096         GikoSys.Setting.UnActivePopup := UnActivePopupCheckBox.Checked;
1097         //\83\8c\83X\83|\83b\83v\83A\83b\83v\83{\81[\83\8b\83h\95\\8e¦
1098         GikoSys.Setting.ResPopupHeaderBold := ResPopupBoldCheckBox.Checked;
1099
1100         //\83A\83h\83\8c\83X\83o\81[
1101         GikoSys.Setting.URLDisplay := URLDisplayCheckBox.Checked;
1102         GikoSys.Setting.AddressBarTabStop := TabStopAddressBarCheckBox.Checked;
1103         GikoSys.Setting.LinkAddAddressBar := LinkAddCheckBox.Checked;
1104         if GikoSys.IsNumeric(AddressHistoryCountEdit.Text) then
1105                 GikoSys.Setting.AddressHistoryCount := StrToInt(AddressHistoryCountEdit.Text)
1106         else
1107                 GikoSys.Setting.AddressHistoryCount := 100;
1108
1109         //HTML\83v\83\8c\83r\83\85\81[
1110         GikoSys.Setting.PreviewVisible := PreviewVisibleCheckBox.Checked;
1111         if GikoSys.IsNumeric(PreviewWaitEdit.Text) then
1112                 GikoSys.Setting.PreviewWait := StrToInt(PreviewWaitEdit.Text)
1113         else
1114                 GikoSys.Setting.PreviewWait := 500;
1115         case PreviewSizeComboBox.ItemIndex of
1116                 0: GikoSys.Setting.PreviewSize := gpsXSmall;
1117                 1: GikoSys.Setting.PreviewSize := gpsSmall;
1118                 2: GikoSys.Setting.PreviewSize := gpsMedium;
1119                 3: GikoSys.Setting.PreviewSize := gpsLarge;
1120                 4: GikoSys.Setting.PreviewSize := gpsXLarge;
1121         end;
1122
1123         //\83X\83\8c\83b\83h\88ê\97\97\8dX\90V\83A\83C\83R\83\93
1124         GikoSys.Setting.ListIconVisible := ThreadListIconCheckBox.Checked;
1125
1126         GikoSys.Setting.CreationTimeLogs := CreationTimeLogsCheckBox.Checked;
1127         GikoSys.Setting.FutureThread := FutureThreadCheckBox.Checked;
1128         if StrToIntDef(SelectIntervalEdit.Text, 110) > 55 then
1129                 GikoSys.Setting.SelectInterval := StrToIntDef(SelectIntervalEdit.Text, 110)
1130         else
1131                 GikoSys.Setting.SelectInterval := 55;
1132
1133         //dat\97\8e\82¿\83X\83\8c\83\\81[\83g\8f\87
1134         case DatOchiSortCombo.ItemIndex of
1135                 0: GikoSys.Setting.DatOchiSortIndex := -1;      //\95À\82Ñ\91Ö\82¦\82µ\82È\82¢
1136                 1: begin        //\83X\83\8c\94Ô\8d\86(\8f¸\8f\87)
1137                         GikoSys.Setting.DatOchiSortOrder := true;
1138                         GikoSys.Setting.DatOchiSortIndex := Ord( gbcTitle );
1139                    end;
1140                 2: begin        //\83X\83\8c\94Ô\8d\86(\8d~\8f\87)
1141                         GikoSys.Setting.DatOchiSortOrder := false;
1142                         GikoSys.Setting.DatOchiSortIndex := Ord( gbcTitle );
1143                    end;
1144                 3: begin        //\8eæ\93¾\93ú\8e\9e(\8f¸\8f\87)
1145                         GikoSys.Setting.DatOchiSortOrder := true;
1146                         GikoSys.Setting.DatOchiSortIndex := Ord( gbcRoundDate );{gbcLastModified}
1147                    end;
1148                 4: begin        //\8eæ\93¾\93ú\8e\9e(\8d~\8f\87)
1149                         GikoSys.Setting.DatOchiSortOrder := false;
1150                         GikoSys.Setting.DatOchiSortIndex := Ord( gbcRoundDate );{gbcLastModified}
1151                    end;
1152                 5: begin        //\83X\83\8c\8dì\90¬\93ú\8e\9e(\8f¸\8f\87)
1153                         GikoSys.Setting.DatOchiSortOrder := true;
1154                         GikoSys.Setting.DatOchiSortIndex := Ord( gbcCreated );
1155                    end;
1156                 6: begin        //\83X\83\8c\8dì\90¬\93ú\8e\9e(\8d~\8f\87)
1157                         GikoSys.Setting.DatOchiSortOrder := false;
1158                         GikoSys.Setting.DatOchiSortIndex := Ord( gbcCreated );
1159                    end;
1160                 7:      begin  //\83X\83\8c\8dÅ\8fI\8dX\90V\93ú\8e\9e\81i\8f¸\8f\87\81j
1161                         GikoSys.Setting.DatOchiSortOrder := true;
1162                         GikoSys.Setting.DatOchiSortIndex := Ord( gbcLastModified );{gbcLastModified}
1163                         end;
1164                 8:      begin  //\83X\83\8c\8dÅ\8fI\8dX\90V\93ú\8e\9e\81i\8d~\8f\87\81j
1165                         GikoSys.Setting.DatOchiSortOrder := false;
1166                         GikoSys.Setting.DatOchiSortIndex := Ord( gbcLastModified );{gbcLastModified}
1167                         end;
1168         end;
1169         GikoSys.Setting.AutoSortThreadList := AutoSortCheckBox.Checked;
1170
1171         GikoSys.Setting.WriteSystemSettingFile;
1172         GikoSys.Setting.WriteBoardURLSettingFile;
1173 //      GikoForm.SetBrowserTabState;
1174
1175         if LogFolderEdit.Text <> '' then begin
1176                 GikoSys.Setting.NewLogFolder := LogFolderEdit.Text;
1177                 GikoSys.Setting.WriteFolderSettingFile;
1178         end;
1179
1180         for i := 0 to SoundListView.Items.Count - 1 do begin
1181                 if FileExists(SoundListView.Items[i].SubItems[0]) then
1182                         GikoSys.Setting.SoundFileName[i] := SoundListView.Items[i].SubItems[0]
1183                 else
1184                         GikoSys.Setting.SoundFileName[i] := '';
1185         end;
1186
1187         //\82 \82Ú\81`\82ñ
1188         GikoSys.Setting.AbonDeleterlo := RloCheckBox.Checked;
1189         GikoSys.Setting.AbonReplaceul := ReplaceulCheckBox.Checked;
1190         GikoSys.Setting.PopUpAbon := PopUpAbonCheckBox.Checked;
1191         GikoSys.Setting.ShowNGLinesNum := ShowNGLineCheckBox.Checked;
1192         GikoSys.Setting.AddResAnchor := AddResAnchorCheckBox.Checked;
1193         GikoSys.Setting.DeleteSyria := DeleteSyriaCheckBox.Checked;
1194         GikoSys.Setting.IgnoreKana := IgnoreKanaCheckBox.Checked;
1195         GikoSys.FAbon.IgnoreKana := GikoSys.Setting.IgnoreKana;
1196         // \8eg\97p\82·\82é\83X\83p\83\80\83t\83B\83\8b\83^
1197         if GikoSys.Setting.SpamFilterAlgorithm <> TGikoSpamFilterAlgorithm(
1198                 SpamFilterAlgorithmComboBox.ItemIndex ) then begin
1199                 GikoSys.Setting.SpamFilterAlgorithm := TGikoSpamFilterAlgorithm(
1200                         SpamFilterAlgorithmComboBox.ItemIndex );
1201                 FRepaintThread := True;
1202         end;
1203
1204         //Tab\8e©\93®\95Û\91
1205         GikoSys.Setting.TabAutoLoadSave := TabLoadSave.Checked;
1206         GikoSys.Setting.UseUndecided := UseUndecidedCheckBox.Checked;
1207         //Be2ch
1208         GikoSys.Setting.BeUserID := BeUserIDEdit.Text;
1209         GikoSys.Setting.BePassword := BeCodeEdit.Text;
1210                 GikoSys.Setting.BeAutoLogin := BeAutoLoginCheckBox.Checked;
1211         //\97\9a\97ð\82Ì\8dÅ\91å\95Û\91\90\94
1212         GikoSys.Setting.MaxRecordCount := Max(StrToInt64Def(MaxRecordCountEdit.Text,100),1);
1213     GikoSys.Setting.StoredTaskTray := StoredTaskTrayCB.Checked;
1214     GikoSys.Setting.LoopBrowserTabs := LoopBrowserTabsCB.Checked;
1215
1216     GikoSys.Setting.GestureIgnoreContext := IgnoreContextCheckBox.Checked;
1217
1218     // \83\8c\83X\83G\83f\83B\83^Unicode\93ü\97Í
1219     Gikosys.Setting.UseUnicode := UseUnicodeCB.Checked;
1220
1221 end;
1222
1223 procedure TOptionDialog.SettingApply;
1224 var
1225         i: Integer;
1226 begin
1227         GikoForm.TreeView.Items.BeginUpdate;
1228         GikoForm.FavoriteTreeView.Items.BeginUpdate;
1229         GikoForm.ListView.Items.BeginUpdate;
1230         try
1231                 GikoForm.TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1232                 GikoForm.TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1233                 GikoForm.TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1234                 GikoForm.TreeView.Color := GikoSys.Setting.CabinetBackColor;
1235
1236                 GikoForm.FavoriteTreeView.Font.Assign(GikoForm.TreeView.Font);
1237                 GikoForm.FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1238
1239                 GikoForm.ListView.Font.Name := GikoSys.Setting.ListFontName;
1240                 GikoForm.ListView.Font.Size := GikoSys.Setting.ListFontSize;
1241                 GikoForm.ListView.Font.Color := GikoSys.Setting.ListFontColor;
1242                 GikoForm.ListView.Font.Style := [];
1243                 if GikoSys.Setting.ListFontBold then
1244                         GikoForm.ListView.Font.Style := [fsbold];
1245                 if GikoSys.Setting.ListFontItalic then
1246                         GikoForm.ListView.Font.Style := GikoForm.ListView.Font.Style + [fsitalic];
1247
1248                 //GikoForm.ListView.Color := GikoSys.Setting.ListBackColor;
1249                 GikoForm.ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1250                 GikoForm.UseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1251                 GikoForm.OddColor := GikoSys.Setting.OddColor;
1252                 GikoSys.Setting.UnFocusedBold := (UnFocusedBoldCheckBox.Enabled) and
1253                                                                                         (UnFocusedBoldCheckBox.Checked);
1254
1255                 GikoForm.BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1256                 GikoForm.BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1257                 GikoForm.BrowserTab.Font.Style := [];
1258                 if GikoSys.Setting.BrowserTabFontBold then
1259                         GikoForm.BrowserTab.Font.Style := [fsBold];
1260                 if GikoSys.Setting.BrowserTabFontItalic then
1261                         GikoForm.BrowserTab.Font.Style := GikoForm.BrowserTab.Font.Style + [fsItalic];
1262 //              GikoForm.BrowserTab.Height := (GikoSys.Setting.BrowserTabFontSize * 2) + 1;
1263 //              GikoForm.BrowserBottomPanel.Height := GikoForm.BrowserTab.Height;
1264
1265                 for i := 0 to Screen.CustomFormCount - 1 do begin
1266                         if TObject(Screen.CustomForms[i]) is TEditorForm then begin
1267                                 TEditorForm(Screen.CustomForms[i]).SetFont;
1268                         end;
1269                 end;
1270
1271         finally
1272                 GikoForm.TreeView.Items.EndUpdate;
1273                 GikoForm.FavoriteTreeView.Items.EndUpdate;
1274                 GikoForm.ListView.Items.EndUpdate;
1275         end;
1276
1277         //\83A\83h\83\8c\83X\83o\81[
1278         for i := GikoForm.AddressComboBox.Items.Count - 1 downto 0 do begin
1279                 if GikoSys.Setting.AddressHistoryCount >= GikoForm.AddressComboBox.Items.Count then
1280                         Break;
1281                 GikoForm.AddressComboBox.Items.Delete(i);
1282         end;
1283         GikoForm.AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1284
1285         //\83X\83\8c\88ê\97\97\82Ì\83\8a\83t\83\8c\83b\83V\83\85
1286         if FRepaintList then begin
1287                 // SetActiveList\82ð\8eÀ\8ds
1288                 GikoForm.ActiveList := GikoForm.ActiveList;
1289         end;
1290
1291         // \83X\83\8c\83b\83h\82Ì\83\8a\83t\83\8c\83b\83V\83\85
1292         if FRepaintThread then begin
1293                 for i := GikoForm.BrowserTab.Tabs.Count - 1 downto 0 do begin
1294                         TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[i]).Repaint := true;
1295                 end;
1296                 GikoForm.BrowserTab.OnChange(nil);
1297         end;
1298 end;
1299
1300 procedure TOptionDialog.ReadProxyCheckClick(Sender: TObject);
1301 begin
1302         ReadProxyAddressEdit.Enabled := ReadProxyCheck.Checked;
1303         ReadPortEdit.Enabled := ReadProxyCheck.Checked;
1304         ReadProxyUserIDEdit.Enabled := ReadProxyCheck.Checked;
1305         ReadProxyPasswordEdit.Enabled := ReadProxyCheck.Checked;
1306
1307         ReadAddressLabel.Enabled := ReadProxyCheck.Checked;
1308         ReadPortLabel.Enabled := ReadProxyCheck.Checked;
1309         ReadUserIDLabel.Enabled := ReadProxyCheck.Checked;
1310         ReadPasswordLabel.Enabled := ReadProxyCheck.Checked;
1311 end;
1312
1313 procedure TOptionDialog.ReadPortEditExit(Sender: TObject);
1314 begin
1315         if not GikoSys.IsNumeric(ReadPortEdit.Text) then
1316                 ReadPortEdit.Text := '0';
1317 end;
1318
1319 procedure TOptionDialog.LogFolderButtonClick(Sender: TObject);
1320 var
1321         Root: WideString;
1322         Dir: string;
1323 begin
1324         Root := '';
1325         if SelectDirectory('\83\8d\83O\83t\83H\83\8b\83_\91I\91ð', Root, Dir) then begin
1326                 LogFolderEdit.Text := Dir;
1327         end;
1328 end;
1329
1330 function TOptionDialog.CheckFolder: Boolean;
1331 begin
1332         if Trim(LogFolderEdit.Text) = '' then
1333                 LogFolderEdit.Text := GikoSys.GetAppDir + 'Log';
1334
1335         if DirectoryExists(LogFolderEdit.Text) then begin
1336                 Result := True;
1337         end else begin
1338                 if MsgBox(Handle, '\83\8d\83O\83t\83H\83\8b\83_\82ª\91\8dÝ\82µ\82Ü\82¹\82ñ\81B\8dì\90¬\82µ\82Ü\82·\82©\81H', '\83M\83R\83i\83r', MB_YESNO or MB_ICONQUESTION) = IDYES        then begin
1339                         //\83t\83H\83\8b\83_\82ð\8dì\90¬
1340                         try
1341                                 GikoSys.ForceDirectoriesEx(LogFolderEdit.Text);
1342                                 Result := True
1343                         except
1344                                 MsgBox(Handle, '\83\8d\83O\83t\83H\83\8b\83_\82Ì\8ew\92è\82ª\95s\90³\82Å\82·\81B', '\83G\83\89\81[', MB_OK or MB_ICONSTOP);
1345                                 OptionTab.ActivePage := FolderSheet;
1346                                 LogFolderEdit.SetFocus;
1347                                 Result := False;
1348                         end;
1349                 end else
1350                         Result := False;
1351         end;
1352 end;
1353
1354 procedure TOptionDialog.FormClose(Sender: TObject; var Action: TCloseAction);
1355 begin
1356         if not FClose then
1357                 Action := caNone;
1358         FClose := True;
1359 end;
1360
1361 procedure TOptionDialog.SoundReferButtonClick(Sender: TObject);
1362 begin
1363         OpenDialog.Filter := '\83T\83E\83\93\83h (*.wav)|*.wav|\82·\82×\82Ä\82Ì\83t\83@\83C\83\8b (*.*)|*.*';
1364         sndPlaySound(nil, SND_ASYNC);
1365         if OpenDialog.Execute then begin
1366                 SoundFileEdit.Text := OpenDialog.FileName;
1367         // \83A\83v\83\8a\94z\89º\82Ì\83t\83@\83C\83\8b\82Ì\8fê\8d\87\91\8a\91Î\83p\83X\82É\95Ï\8a·\82·\82é\81B
1368         if (AnsiPos(GikoSys.Setting.GetAppDir,SoundFileEdit.Text) = 1) then begin
1369             // .\ \82ª\82Â\82©\82È\82¢\82Ì\82Å\81A.\\82ð\92Ç\89Á
1370             SoundFileEdit.Text := '.\' + ExtractRelativePath(
1371                                       GikoSys.Setting.GetAppDir,
1372                                       SoundFileEdit.Text);
1373
1374         end;
1375         end;
1376 end;
1377
1378 procedure TOptionDialog.SoundPlayButtonClick(Sender: TObject);
1379 var
1380     s : String;
1381 begin
1382     SetCurrentDir(GikoSys.Setting.GetAppDir);
1383     s := ExpandFileName(SoundFileEdit.Text);
1384         if not FileExists(s) then begin
1385                 MsgBox(Handle, '\91\8dÝ\82µ\82È\82¢\83t\83@\83C\83\8b\82Å\82·', '\83G\83\89\81[', MB_ICONSTOP or MB_OK);
1386                 SoundFileEdit.Text := '';
1387                 Exit;
1388         end;
1389         if not sndPlaySound(PChar(s), SND_ASYNC or SND_NOSTOP) then begin
1390                 sndPlaySound(nil, SND_ASYNC);
1391         end;
1392 end;
1393
1394 procedure TOptionDialog.SoundListViewChanging(Sender: TObject;
1395         Item: TListItem; Change: TItemChange; var AllowChange: Boolean);
1396 begin
1397         if Item.SubItems.Count > 0 then
1398                 SoundFileEdit.Text := Item.SubItems[0];
1399 end;
1400
1401 procedure TOptionDialog.SoundFileEditChange(Sender: TObject);
1402 var
1403         Item: TListItem;
1404 begin
1405         sndPlaySound(nil, SND_ASYNC);
1406         Item := SoundListView.Selected;
1407         if Item = nil then Exit;
1408
1409     SetCurrentDir(GikoSys.Setting.GetAppDir);
1410         if FileExists(ExpandFileName(SoundFileEdit.Text)) then
1411                 Item.SubItems[0] := SoundFileEdit.Text;
1412         if Trim(SoundFileEdit.Text) = '' then
1413                 Item.SubItems[0] := '';
1414 end;
1415
1416 procedure TOptionDialog.OptionTabChange(Sender: TObject);
1417 begin
1418         sndPlaySound(nil, SND_ASYNC);
1419
1420         if OptionTab.ActivePage = CSSTabSheet then
1421                 CSSPreview;
1422 end;
1423
1424 procedure TOptionDialog.AppFolderButtonClick(Sender: TObject);
1425 begin
1426         OpenDialog.Filter := '\8eÀ\8ds\83t\83@\83C\83\8b (*.exe)|*.exe|\82·\82×\82Ä\82Ì\83t\83@\83C\83\8b (*.*)|*.*';
1427         if OpenDialog.Execute then
1428                 AppFolderEdit.Text := OpenDialog.FileName;
1429 end;
1430
1431 procedure TOptionDialog.WriteProxyCheckClick(Sender: TObject);
1432 begin
1433         WriteProxyAddressEdit.Enabled := WriteProxyCheck.Checked;
1434         WritePortEdit.Enabled := WriteProxyCheck.Checked;
1435         WriteProxyUserIDEdit.Enabled := WriteProxyCheck.Checked;
1436         WriteProxyPasswordEdit.Enabled := WriteProxyCheck.Checked;
1437
1438         WriteAddressLabel.Enabled := WriteProxyCheck.Checked;
1439         WritePortLabel.Enabled := WriteProxyCheck.Checked;
1440         WriteUserIDLabel.Enabled := WriteProxyCheck.Checked;
1441         WritePasswordLabel.Enabled := WriteProxyCheck.Checked;
1442 end;
1443
1444 procedure TOptionDialog.WritePortEditExit(Sender: TObject);
1445 begin
1446         if not GikoSys.IsNumeric(WritePortEdit.Text) then
1447                 WritePortEdit.Text := '0';
1448 end;
1449
1450 procedure TOptionDialog.Tora3URLLabelClick(Sender: TObject);
1451 begin
1452         GikoSys.OpenBrowser(URL_TORA3, gbtAuto);
1453 end;
1454
1455 procedure TOptionDialog.HotKeyEnter(Sender: TObject);
1456 begin
1457         OkBotton.Default := False;
1458         CancelBotton.Cancel := False;
1459 end;
1460
1461 procedure TOptionDialog.HotKeyExit(Sender: TObject);
1462 begin
1463         OkBotton.Default := True;
1464         CancelBotton.Cancel := True;
1465 end;
1466
1467 procedure TOptionDialog.URLAppCheckBoxClick(Sender: TObject);
1468 begin
1469         AppFolderLabel.Enabled := URLAppCheckBox.Checked;
1470         AppFolderEdit.Enabled := URLAppCheckBox.Checked;
1471         AppFolderButton.Enabled := URLAppCheckBox.Checked;
1472 end;
1473
1474 procedure TOptionDialog.AddressHistoryCountEditExit(Sender: TObject);
1475 begin
1476         if not GikoSys.IsNumeric(AddressHistoryCountEdit.Text) then
1477                 AddressHistoryCountEdit.Text := '100';
1478 end;
1479
1480 procedure TOptionDialog.PreviewWaitEditExit(Sender: TObject);
1481 begin
1482         if not GikoSys.IsNumeric(PreviewWaitEdit.Text) then
1483                 PreviewWaitEdit.Text := '500';
1484         if StrToInt(PreviewWaitEdit.Text) < 500 then
1485                 PreviewWaitEdit.Text := '500';
1486         if StrToInt(PreviewWaitEdit.Text) > 9999 then
1487                 PreviewWaitEdit.Text := '9999';
1488 end;
1489
1490 procedure TOptionDialog.CSSCheckBoxClick(Sender: TObject);
1491 begin
1492         CSSListLabel.Enabled := CSSCheckBox.Checked;
1493         CSSListView.Enabled := CSSCheckBox.Checked;
1494 end;
1495
1496 procedure TOptionDialog.SetAbonpropertys;
1497 begin
1498         //\82 \82Ú\81`\82ñ
1499         GikoSys.FAbon.Deleterlo := RloCheckBox.Checked;
1500         GikoSys.FAbon.Replaceul := ReplaceulCheckBox.Checked;
1501         GikoSys.FAbon.AbonPopupRes := PopUpAbonCheckBox.Checked;
1502         GikoSys.FAbon.ReturnNGwordLineNum := ShowNGLineCheckBox.Checked;
1503         GikoSys.FAbon.SetNGResAnchor := AddResAnchorCheckBox.Checked;
1504                 GikoSys.FAbon.DeleteSyria := DeleteSyriaCheckBox.Checked;
1505 end;
1506 procedure TOptionDialog.CSSFontButtonClick(Sender: TObject);
1507 begin
1508
1509         FontDialog.Options := [fdAnsiOnly, fdEffects];
1510         FontDialog.Font.Assign(FCSSFont);
1511         if FontDialog.Execute then begin
1512                 FontDialog.Font.Style := FontDialog.Font.Style - [fsUnderline] - [fsStrikeout];
1513                 FCSSFont.Assign(FontDialog.Font);
1514                 //FCSSFont := FontDialog.Font;
1515         end;
1516
1517         CSSPreview;
1518
1519 end;
1520
1521 procedure TOptionDialog.CSSBackColorButtonClick(Sender: TObject);
1522 begin
1523
1524         ColorDialog.Color := FCSSBackColor;
1525         if ColorDialog.Execute then begin
1526                 FCSSBackColor := ColorDialog.Color;
1527         end;
1528
1529         CSSPreview;
1530
1531 end;
1532
1533 procedure TOptionDialog.CSSFontCheckBoxClick(Sender: TObject);
1534 begin
1535
1536         CSSFontButton.Enabled := CSSFontCheckBox.Checked;
1537         CSSPreview;
1538
1539 end;
1540
1541 procedure TOptionDialog.CSSBackColorCheckBoxClick(Sender: TObject);
1542 begin
1543
1544         CSSBackColorButton.Enabled := CSSBackColorCheckBox.Checked;
1545         CSSPreview;
1546
1547 end;
1548
1549 procedure TOptionDialog.CSSSetContent(Content: string);
1550 var
1551         doc : OleVariant;
1552 begin
1553         if CSSBrowser.Document <> nil then begin
1554                 doc := CSSBrowser.OleObject.Document;
1555                 doc.open;
1556         doc.Clear;
1557                 doc.charset := 'Shift_JIS';
1558                 doc.Write(Content);
1559                 doc.Close;
1560   end;
1561 end;
1562
1563 procedure TOptionDialog.CSSPreview;
1564 var
1565         Board: TBoard;
1566         ThreadItem: TThreadItem;
1567         html: string;
1568         Res: array [0..1] of TResRec;
1569         fileName: string;
1570 begin
1571
1572         fileName := GikoSys.Setting.CSSFileName;
1573
1574         GikoSys.Setting.CSSFileName := DEFAULT_CSS_FILENAME;
1575         if CSSListView.Items.Count > 0 then begin
1576                 try
1577                         if CSSListView.ItemIndex >= 0 then begin
1578                                 if CSSListView.Items[CSSListView.ItemIndex].Data <> nil then
1579                                         GikoSys.Setting.CSSFileName := string( CSSListView.Items[CSSListView.ItemIndex].data )
1580                                 else
1581                                         GikoSys.Setting.CSSFileName := CSSListView.Items[CSSListView.ItemIndex].Caption + '.css';
1582                                                 end;
1583                 except
1584                 end;
1585         end;
1586
1587         Board := TBoard.Create( nil, 'about://sample/' );
1588         ThreadItem := TThreadItem.Create( nil, Board, 'about://sample/test/read.cgi/sample/' );
1589
1590         try
1591                 Board.Title := '\83T\83\93\83v\83\8b\94Â';
1592                 ThreadItem.ParentBoard := Board;
1593                 ThreadItem.AllResCount := High( Res );
1594                 ThreadItem.NewResCount := 1;
1595                 ThreadItem.NewReceive := 2;
1596                 ThreadItem.Title := '\83T\83\93\83v\83\8b\83v\83\8c\83r\83\85\81[';
1597
1598                 Res[0].FName := '\96¼\96³\82µ\82³\82ñ';
1599                 Res[0].FMailTo := 'sage';
1600                 Res[0].FDateTime := 'ID:Sample';
1601                 Res[0].FBody := 'CSS \82Æ\83X\83L\83\93\82Ì\83T\83\93\83v\83\8b';
1602                 Res[1].FName := '\96¼\96³\82µ\82³\82ñ';
1603                 Res[1].FMailTo := 'age';
1604                 Res[1].FDateTime := 'ID:Sample';
1605                 Res[1].FBody := '\83I\83}\83G\83\82\83i\81[';
1606
1607
1608                 if FileExists( GikoSys.GetSkinHeaderFileName ) then begin
1609                         html :=
1610                                 HTMLCreater.LoadFromSkin( GikoSys.GetSkinHeaderFileName, ThreadItem, 0 ) +
1611                                 '<a name="top"></a>' +
1612                                 HTMLCreater.SkinedRes( HTMLCreater.LoadFromSkin( GikoSys.GetSkinResFileName, ThreadItem, 0 ), @Res[0], '1' ) +
1613                                 HTMLCreater.SkinedRes( HTMLCreater.LoadFromSkin( GikoSys.GetSkinNewResFileName, ThreadItem, 0 ), @Res[1], '2' ) +
1614                                 '<a name="bottom"></a>' +
1615                                 HTMLCreater.LoadFromSkin( GikoSys.GetSkinFooterFileName, ThreadItem, 0 );
1616
1617                         html := StringReplace( html, '</head>',
1618                                 '<style type="text/css">body {' + GetPreviewUserStyle + '}</style></head>', [rfReplaceAll] );
1619                 end else begin
1620                         html :=
1621                                 '<html><head><meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">' +
1622                                 '<title>' + ThreadItem.Title + '</title>' +
1623                                 '<link rel="stylesheet" href="' + GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName + '" type="text/css">' +
1624                                 '<style type="text/css">body {' + GetPreviewUserStyle + '}</style>' +
1625                                 '</head><body><div class="title">' + ThreadItem.Title + '</div>';
1626
1627                         html := html + CreatePreviewBody(Res) + '</body></html>';
1628                 end;
1629
1630                 try
1631                         CSSSetContent( html );
1632                 except
1633                 end;
1634
1635         finally
1636                 ThreadItem.Free;
1637                 Board.Free;
1638                 GikoSys.Setting.CSSFileName := fileName;
1639         end;
1640
1641 end;
1642 function TOptionDialog.CreatePreviewBody(Res: array of TResRec): string;
1643 var
1644         i : Integer;
1645 begin
1646         Result := '';
1647         for i := 0 to High( Res ) do
1648         begin
1649                 Result := Result +
1650                         '<div class="header"><span class="no">' + IntToStr( i + 1 ) + '</span>' +
1651                         '<span class="name_label"> \96¼\91O\81F </span>' +
1652                         '<a class="name_mail" href="mailto:' + Res[i].FMailTo + '">' +
1653                         '<b>' + Res[i].FName + '</b></a><span class="mail"> [' + Res[i].FMailTo + ']</span>' +
1654                         '<span class="date_label"> \93\8a\8de\93ú\81F</span>' +
1655                         '<span class="date"> ' + Res[i].FDateTime+ '</span></div>' +
1656                         '<div class="mes">' + Res[i].FBody + ' </div>';
1657         end;
1658 end;
1659
1660 function TOptionDialog.GetPreviewUserStyle(): string;
1661 var
1662         i : Integer;
1663
1664 begin
1665         Result := '';
1666         // \83t\83H\83\93\83g\82â\83T\83C\83Y\82Ì\90Ý\92è
1667         if CSSFontCheckBox.Checked then begin
1668                 i := ColorToRGB( FCSSFont.Color );
1669                 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
1670
1671                 Result := Result +
1672                         'font-family:"' + FCSSFont.Name + '";' +
1673                         'font-size:' + IntToStr( FCSSFont.Size ) + 'pt;' +
1674                         'color:#' + IntToHex( i, 6 ) + ';';
1675                 if fsBold in FCSSFont.Style then
1676                         Result := Result + 'font-weight:bold;'
1677                 else
1678                         Result := Result + 'font-weight:normal;';
1679                 if fsItalic in FCSSFont.Style then
1680                         Result := Result + 'font-style:italic;'
1681                 else
1682                         Result := Result + 'font-style:normal;';
1683         end;
1684         if CSSBackColorCheckBox.Checked then begin
1685                 i := ColorToRGB( FCSSBackColor );
1686                 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
1687
1688                 Result := Result +
1689                         'background-color:#' + IntToHex( i, 6 ) + ';';
1690         end;
1691
1692 end;
1693 procedure TOptionDialog.CSSListViewChange(Sender: TObject; Item: TListItem;
1694         Change: TItemChange);
1695 begin
1696
1697         if OptionTab.ActivePage = CSSTabSheet then
1698                 CSSPreview;
1699
1700 end;
1701
1702 procedure TOptionDialog.AddURLButtonClick(Sender: TObject);
1703 begin
1704         BoardURLComboBox.Items.Append(BoardURLComboBox.Text);
1705   BoardURLComboBox.ItemIndex := BoardURLComboBox.Items.Count - 1;
1706 end;
1707
1708 procedure TOptionDialog.RemoveURLButtonClick(Sender: TObject);
1709 begin
1710         BoardURLComboBox.DeleteSelected;
1711 end;
1712
1713 procedure TOptionDialog.OddResNumCheckBoxClick(Sender: TObject);
1714 begin
1715         OddResNumColorBox.Enabled := OddResNumCheckBox.Checked;
1716         UnFocusedBoldCheckBox.Enabled := OddResNumCheckBox.Checked;
1717 end;
1718
1719 procedure TOptionDialog.ResRangeHoldCheckBoxClick(Sender: TObject);
1720 begin
1721         ResRangeHoldComboBox.Enabled := ResRangeHoldCheckBox.Checked;
1722 end;
1723
1724 procedure TOptionDialog.CroutOptionClick(Sender: TObject);
1725 var
1726         KuroutOption: TKuroutOption;
1727 begin
1728         KuroutOption := TKuroutOption.Create(Self);
1729         try
1730                 KuroutOption.ShowModal;
1731         finally
1732                 KuroutOption.Release;
1733         end;
1734 end;
1735
1736 procedure TOptionDialog.MaxRecordCountEditExit(Sender: TObject);
1737 begin
1738         if not GikoSys.IsNumeric(MaxRecordCountEdit.Text) then
1739                 MaxRecordCountEdit.Text := '100'
1740         else if StrToIntDef(MaxRecordCountEdit.Text, 100) <= 0 then
1741         MaxRecordCountEdit.Text := '1';
1742 end;
1743
1744 procedure TOptionDialog.BoukenDelButtonClick(Sender: TObject);
1745 begin
1746     if ( BoukenComboBox.Items.IndexOf( BoukenComboBox.Text ) <> -1 ) then begin
1747         if MsgBox(Self.Handle, BoukenComboBox.Text + ' \82ð\8dí\8f\9c\82µ\82Ü\82·\81B'#13#10 +
1748             '\8dí\8f\9c\82·\82é\82Æ\95\9c\8c³\82Å\82«\82Ü\82¹\82ñ\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H', '\94E\96@\92\9f\81@\83h\83\81\83C\83\93\8dí\8f\9c', MB_YESNO or MB_ICONQUESTION) = IDYES  then begin
1749             GikoSys.DelBoukenCookie(BoukenComboBox.Text);
1750             GikoSys.Setting.WriteBoukenSettingFile;
1751             BoukenComboBox.Items.Delete(BoukenComboBox.ItemIndex);
1752             if ( BoukenComboBox.Items.Count = 0 ) then begin
1753                  BoukenComboBox.Text := '';
1754             end;
1755             BoukenComboBox.OnChange(nil);
1756         end
1757     end else begin
1758         BoukenComboBox.Text := '';
1759     end;
1760 end;
1761
1762 procedure TOptionDialog.BoukenComboBoxChange(Sender: TObject);
1763 begin
1764     BoukenEdit.Text := GikoSys.GetBoukenCookie('http://*' +BoukenComboBox.Text);
1765 end;
1766
1767 procedure TOptionDialog.BoukenModButtonClick(Sender: TObject);
1768 var
1769     DomainList : TStringList;
1770     i : Integer;
1771     s : String;
1772 begin
1773     if ( Length(BoukenComboBox.Text) > 0 ) then begin
1774         s := BoukenComboBox.Text;
1775         GikoSys.SetBoukenCookie(BoukenEdit.Text, s);
1776         GikoSys.Setting.WriteBoukenSettingFile;
1777         // \96`\8c¯\82Ì\8f\91\83h\83\81\83C\83\93\88ê\97\97\8eæ\93¾
1778         BoukenComboBox.Text := '';
1779         BoukenComboBox.Items.Clear;
1780         DomainList := TStringList.Create;
1781         GikoSys.GetBoukenDomain(DomainList);
1782         for i := 0 to DomainList.Count - 1 do begin
1783             BoukenComboBox.Items.Add( DomainList[i] ) ;
1784         end;
1785         DomainList.Free;
1786         BoukenComboBox.ItemIndex := 0;
1787         for i := 0 to BoukenComboBox.Items.Count - 1 do begin
1788             if ( BoukenComboBox.Items[i] = s) then begin
1789                 BoukenComboBox.ItemIndex := i;
1790                 Break;
1791             end;
1792         end;
1793         BoukenComboBox.OnChange(nil);
1794     end;
1795 end;
1796
1797 end.
1798