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.75.2.1 - (hide annotations) (download) (as text)
Sat Jul 2 11:42:55 2005 UTC (18 years, 9 months ago) by h677
Branch: Bb50
CVS Tags: v1_50_2_606, v1_50_0_595, v1_50_0_598, v1_50_0_593, v1_50_0_596, v1_50_0_603, v1_50_0_604, v1_50_0_606, b50, v1_50_0_600, v1_50_2_604, v1_50_0_594, v1_50_0_602, v1_50_0_601, v1_50_0_605, v1_50_0_599
Changes since 1.75: +10 -2 lines
File MIME type: text/x-pascal
レス増減強調を使っていて、スレ一覧にフォーカスが無いときの
ItemがGrayになるときに太字にするかどうかをオプションにした

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

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