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.73.2.2 - (hide annotations) (download) (as text)
Sun Jun 5 14:28:30 2005 UTC (18 years, 10 months ago) by h677
Branch: remodeling
CVS Tags: v1_50_0_581, v1_50_0_580, v1_50_0_587, v1_50_0_586, v1_50_0_585, v1_50_0_582, v1_50_0_588, v1_50_0_584, v1_50_0_579
Changes since 1.73.2.1: +21 -2 lines
File MIME type: text/x-pascal
アドレスバーのURL数の上限と履歴のスレッド数の上限を分けた

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

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