OSDN Git Service

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