Develop and Download Open Source Software

Browse CVS Repository

Annotation of /gikonavigoeson/gikonavi/Option.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.85 - (hide annotations) (download) (as text)
Mon Aug 7 16:50:15 2006 UTC (17 years, 8 months ago) by h677
Branch: MAIN
CVS Tags: v1_54_0_677, v1_54_0_676, v1_54_0_678, v1_54_0_684, v1_54_0_680, v1_54_0_681, v1_54_0_682, v1_54_0_683, v1_54_0_679, v1_54_0_675
Changes since 1.84: +6 -0 lines
File MIME type: text/x-pascal
ブラウザタブの移動(?)でループを許可するオプション追加

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

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26