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.82 - (hide annotations) (download) (as text)
Tue Dec 20 15:20:11 2005 UTC (18 years, 4 months ago) by h677
Branch: MAIN
CVS Tags: v1_51_1_639, b51, v1_52_1_658, v1_52_0_646, v1_52_0_644, v1_52_0_643, v1_51_0_634, v1_51_0_635, v1_51_0_636, v1_51_0_637, v1_51_0_633, v1_52_0_647, v1_51_0_638, v1_52_0_648, v1_52_0_645, v1_52_0_651, v1_52_0_650, v1_52_0_652, v1_52_0_642, v1_52_0_654, v1_51_1_640, root-of-Bb51, v1_52_1_657, v1_52_0_660, v1_52_0_655, v1_52_0_656, v1_52_0_649, v1_51_1_641
Branch point for: Bb52, Bb51
Changes since 1.81: +7 -2 lines
File MIME type: text/x-pascal
スレッド一覧DL後のソートをオプション化

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

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