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

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