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.21.2.2 - (hide annotations) (download) (as text)
Thu Sep 9 16:20:33 2004 UTC (19 years, 7 months ago) by yoffy
Branch: stable
Changes since 1.21.2.1: +382 -273 lines
File MIME type: text/x-pascal
・ミ・ソ48、ヒ・゙。シ・ク。」

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

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