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.91 - (hide annotations) (download) (as text)
Sun Jul 27 16:43:49 2008 UTC (15 years, 8 months ago) by h677
Branch: MAIN
CVS Tags: v1_59_0_771, v1_59_0_770, v1_59_0_773, v1_59_0_772, v1_59_0_775, v1_59_0_774, v1_59_0_777, v1_59_0_776, v1_59_0_778, v1_59_1_765, v1_59_0_767, v1_59_1_778, v1_59_0_768, v1_59_0_769, v1_60_0_780, v1_60_0_779, v1_59_2_785, v1_58_0_763, v1_58_0_762
Branch point for: Bb59, Bb58
Changes since 1.90: +8 -2 lines
File MIME type: text/x-pascal
サウンドファイルの相対ファイル対応

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

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