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.3 - (hide annotations) (download) (as text)
Fri Oct 8 05:44:53 2004 UTC (19 years, 6 months ago) by yoffy
Branch: stable
Changes since 1.21.2.2: +23 -18 lines
File MIME type: text/x-pascal
b49 、ヒ・゙。シ・ク。」

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

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