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.84 - (hide annotations) (download) (as text)
Sun Aug 6 13:20:45 2006 UTC (17 years, 8 months ago) by h677
Branch: MAIN
CVS Tags: v1_54_0_674
Changes since 1.83: +5 -0 lines
File MIME type: text/x-pascal
最小化時にタスクトレイに格納する機能&オプション追加

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

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