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.83 - (hide annotations) (download) (as text)
Mon Jun 26 15:22:43 2006 UTC (17 years, 9 months ago) by h677
Branch: MAIN
CVS Tags: v1_53_0_671, v1_53_0_664, v1_53_0_661, v1_53_0_663, v1_53_0_662, v1_53_0_665, v1_53_0_667, v1_53_0_666, v1_53_0_669, v1_53_0_668, v1_53_0_672, v1_53_0_670, root-of-Bb53, v1_53_1_673
Branch point for: Bb53
Changes since 1.82: +64 -50 lines
File MIME type: text/x-pascal
プレビューのHTML作成のメソッドの分割

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

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