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.56 - (hide annotations) (download) (as text)
Fri Aug 13 11:40:21 2004 UTC (19 years, 8 months ago) by genyakun
Branch: MAIN
Changes since 1.55: +1 -0 lines
File MIME type: text/x-pascal
詳細設定ホ゛タンを追加

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

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