6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
7 ComCtrls, StdCtrls, ExtCtrls, Dialogs, FileCtrl, MMSystem,
8 GikoSystem, GikoUtil, Buttons, UrlMon, Menus, ImgList, OleCtrls,
9 SHDocVw_TLB, BoardGroup;
12 TOptionDialog = class(TForm)
14 CancelBotton: TButton;
15 OptionTab: TPageControl;
16 ConnectSheet: TTabSheet;
17 Font1Sheet: TTabSheet;
19 FontDialog: TFontDialog;
20 ColorDialog: TColorDialog;
21 ReadProxyGroupBox: TGroupBox;
22 ReadAddressLabel: TLabel;
23 ReadPortLabel: TLabel;
24 ReadProxyCheck: TCheckBox;
25 ReadProxyAddressEdit: TEdit;
27 ReadProxyUserIDEdit: TEdit;
28 ReadProxyPasswordEdit: TEdit;
29 ReadUserIDLabel: TLabel;
30 ReadPasswordLabel: TLabel;
31 FolderSheet: TTabSheet;
32 FolderGroupBox: TGroupBox;
34 LogFolderButton: TButton;
37 ThreadSheet: TTabSheet;
38 SoundSheet: TTabSheet;
39 SoundEventGroupBox: TGroupBox;
40 SoundListView: TListView;
41 SoundReferButton: TButton;
43 OpenDialog: TOpenDialog;
44 WriteProxyGroupBox: TGroupBox;
45 WriteAddressLabel: TLabel;
46 WritePortLabel: TLabel;
47 WriteUserIDLabel: TLabel;
48 WritePasswordLabel: TLabel;
49 WriteProxyCheck: TCheckBox;
50 WriteProxyAddressEdit: TEdit;
52 WriteProxyUserIDEdit: TEdit;
53 WriteProxyPasswordEdit: TEdit;
54 BoardSheet: TTabSheet;
56 BoardURL2chEdit: TEdit;
58 UserIDSheet: TTabSheet;
64 SoundPlayButton: TBitBtn;
65 AutoLoginCheckBox: TCheckBox;
66 Tora3URLLabel: TLabel;
79 CabinetFontBotton: TButton;
80 CabinetColorBotton: TButton;
81 CabinetDefaultButton: TButton;
84 ListFontBotton: TButton;
85 ListColorBotton: TButton;
86 ListDefaultBotton: TButton;
87 HintFontButton: TButton;
88 HintBackButton: TButton;
89 HintDefaultButton: TButton;
92 EditorFontBotton: TButton;
93 EditorColorBotton: TButton;
94 EditorDefaultBotton: TButton;
95 BrowserTabMemo: TMemo;
96 BruwserTabFontButton: TButton;
97 BrowserTabDefaultButton: TButton;
100 GroupBox1: TGroupBox;
101 GroupBox2: TGroupBox;
102 URLAppCheckBox: TCheckBox;
103 AppFolderLabel: TLabel;
104 AppFolderEdit: TEdit;
105 AppFolderButton: TButton;
106 OpenMailerCheckBox: TCheckBox;
107 TabSheet1: TTabSheet;
108 PopupPositionRadioGroup: TRadioGroup;
109 TabAddRadioGroup: TRadioGroup;
110 TabSheet2: TTabSheet;
111 GroupBox7: TGroupBox;
112 URLDisplayCheckBox: TCheckBox;
115 TabStopAddressBarCheckBox: TCheckBox;
116 AddressHistoryCountEdit: TEdit;
117 LinkAddCheckBox: TCheckBox;
118 GroupBox8: TGroupBox;
119 PreviewVisibleCheckBox: TCheckBox;
120 PreviewSizeComboBox: TComboBox;
123 PreviewWaitEdit: TEdit;
125 ShowMailCheckBox: TCheckBox;
126 TabSheet3: TTabSheet;
127 GroupBox9: TGroupBox;
128 ThreadListIconCheckBox: TCheckBox;
129 GroupBox6: TGroupBox;
130 LogDeleteMessageCheckBox: TCheckBox;
131 GroupBox10: TGroupBox;
132 UnActivePopupCheckBox: TCheckBox;
133 GroupBox11: TGroupBox;
134 RecvBufferSize: TEdit;
136 ProxyProtocolCheckBox: TCheckBox;
137 ProtocolCheckBox: TCheckBox;
145 CSSTabSheet: TTabSheet;
147 GroupBox12: TGroupBox;
148 CSSCheckBox: TCheckBox;
149 CSSListLabel: TLabel;
150 CSSListView: TListView;
151 GroupBox13: TGroupBox;
152 PostTimeCheckBox: TCheckBox;
156 PostTimeLabel: TLabel;
158 PutPostTimeRadioButton: TRadioButton;
159 BackPostTimeRadioButton: TRadioButton;
160 ResPopupBoldCheckBox: TCheckBox;
161 NGwordSheet: TTabSheet;
162 GroupBox14: TGroupBox;
163 RloCheckBox: TCheckBox;
164 ReplaceulCheckBox: TCheckBox;
165 PopUpAbonCheckBox: TCheckBox;
166 CSSBrowser: TWebBrowser;
167 CSSFontCheckBox: TCheckBox;
168 CSSBackColorCheckBox: TCheckBox;
169 CSSFontButton: TButton;
170 CSSBackColorButton: TButton;
171 ShowNGLineCheckBox: TCheckBox;
172 AddResAnchorCheckBox: TCheckBox;
173 procedure FormCreate(Sender: TObject);
174 procedure FormDestroy(Sender: TObject);
175 procedure ApplyButtonClick(Sender: TObject);
176 procedure CabinetFontBottonClick(Sender: TObject);
177 procedure CabinetColorBottonClick(Sender: TObject);
178 procedure EditorFontBottonClick(Sender: TObject);
179 procedure OkBottonClick(Sender: TObject);
180 procedure ReadProxyCheckClick(Sender: TObject);
181 procedure ListFontBottonClick(Sender: TObject);
182 procedure ListColorBottonClick(Sender: TObject);
183 procedure EditorColorBottonClick(Sender: TObject);
184 procedure CabinetDefaultButtonClick(Sender: TObject);
185 procedure ReadPortEditExit(Sender: TObject);
186 procedure ListDefaultBottonClick(Sender: TObject);
187 procedure EditorDefaultBottonClick(Sender: TObject);
188 procedure HintFontButtonClick(Sender: TObject);
189 procedure HintBackButtonClick(Sender: TObject);
190 procedure HintDefaultButtonClick(Sender: TObject);
191 procedure LogFolderButtonClick(Sender: TObject);
192 procedure FormClose(Sender: TObject; var Action: TCloseAction);
193 procedure SoundReferButtonClick(Sender: TObject);
194 procedure SoundPlayButtonClick(Sender: TObject);
195 procedure SoundListViewChanging(Sender: TObject; Item: TListItem;
196 Change: TItemChange; var AllowChange: Boolean);
197 procedure SoundFileEditChange(Sender: TObject);
198 procedure OptionTabChange(Sender: TObject);
199 procedure AppFolderButtonClick(Sender: TObject);
200 procedure WriteProxyCheckClick(Sender: TObject);
201 procedure WritePortEditExit(Sender: TObject);
202 procedure Tora3URLLabelClick(Sender: TObject);
203 procedure HotKeyEnter(Sender: TObject);
204 procedure HotKeyExit(Sender: TObject);
205 procedure URLAppCheckBoxClick(Sender: TObject);
206 procedure BruwserTabFontButtonClick(Sender: TObject);
207 procedure BrowserTabDefaultButtonClick(Sender: TObject);
208 procedure AddressHistoryCountEditExit(Sender: TObject);
209 procedure PreviewWaitEditExit(Sender: TObject);
210 procedure RecvBufferSizeExit(Sender: TObject);
211 procedure CSSCheckBoxClick(Sender: TObject);
212 procedure PostTimeEditExit(Sender: TObject);
213 procedure PostTimeCheckBoxClick(Sender: TObject);
214 procedure CSSFontButtonClick(Sender: TObject);
215 procedure CSSBackColorButtonClick(Sender: TObject);
216 procedure CSSFontCheckBoxClick(Sender: TObject);
217 procedure CSSBackColorCheckBoxClick(Sender: TObject);
218 procedure CSSListViewChange(Sender: TObject; Item: TListItem;
219 Change: TItemChange);
224 FCSSBackColor: TColor;
225 function GetMemoText(font: TFont; text: string): string;
226 // function GetFontText(Font: TFont; Text: string): string;
228 procedure SaveSetting;
229 procedure SettingApply;
230 function CheckFolder: Boolean;
231 procedure SetAbonpropertys;
232 procedure CSSSetContent(Content: string);
233 procedure CSSPreview;
239 OptionDialog: TOptionDialog;
244 Giko, Editor, Setting, ActnList;
247 FONT_TEXT: string = '%s %d pt';
248 MEMO_CABINET: string = '
\83L
\83\83\83r
\83l
\83b
\83g';
249 MEMO_THREAD: string = '
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g';
250 MEMO_BROWSERPOPUP: string = '
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v';
251 MEMO_BROWSERTAB: string = '
\83u
\83\89\83E
\83U
\83^
\83u';
252 MEMO_EDITOR: string = '
\83G
\83f
\83B
\83^
\83e
\83L
\83X
\83g';
253 DEFAULT_FONT_NAME: string = '
\82l
\82r
\82o
\83S
\83V
\83b
\83N';
254 DEFAULT_FONT_SIZE: Integer = 9;
255 DEFAULT_TABFONT_NAME: string = '
\82l
\82r
\82o
\83S
\83V
\83b
\83N';
256 DEFAULT_TABFONT_SIZE: Integer = 9;
257 URL_TORA3: WideString = 'http://2ch.tora3.net/';
261 procedure TOptionDialog.FormCreate(Sender: TObject);
264 CSSBrowser.Navigate('about:blank');
267 OptionTab.ActivePage := ConnectSheet;
270 CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET);
271 ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD);
272 HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP);
273 BrowserTabMemo.Text := GetMemoText(BrowserTabMemo.Font, MEMO_BROWSERTAB);
274 EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR);
276 Tora3URLLabel.Cursor := 5;
277 lblSFont.Caption := '
\81\9a\8fd
\97v
\81\9a'#13#10#13#10
278 + '
\83X
\83\8c\83b
\83h
\95\
\8e¦
\83G
\83\8a\83A
\82Ì
\83t
\83H
\83\93\83g
\95Ï
\8dX
\82Í
\81A'#13#10
279 + '
\81uCSS
\82Æ
\83X
\83L
\83\93\81v
\83^
\83u
\82Å
\90Ý
\92è
\8fo
\97\88\82Ü
\82·';
280 CSSCheckBoxClick(Sender);
281 PostTimeCheckBoxClick(Sender);
283 if OptionTab.PageCount > GikoSys.Setting.OptionDialogTabIndex then begin
284 OptionTab.ActivePageIndex := GikoSys.Setting.OptionDialogTabIndex;
285 OptionTabChange( nil );
290 procedure TOptionDialog.FormDestroy(Sender: TObject);
292 sndPlaySound(nil, SND_ASYNC);
295 procedure TOptionDialog.OkBottonClick(Sender: TObject);
298 RecvBufferSizeExit(Sender);
299 ReadPortEditExit(Sender);
300 WritePortEditExit(Sender);
301 AddressHistoryCountEditExit(Sender);
302 PreviewWaitEditExit(Sender);
303 PostTimeEditExit(Sender);
305 if not CheckFolder then begin
314 procedure TOptionDialog.ApplyButtonClick(Sender: TObject);
316 RecvBufferSizeExit(Sender);
317 ReadPortEditExit(Sender);
318 WritePortEditExit(Sender);
319 AddressHistoryCountEditExit(Sender);
320 PreviewWaitEditExit(Sender);
321 PostTimeEditExit(Sender);
323 if not CheckFolder then begin
333 //function TOptionDialog.GetFontText(Font: TFont; Text: string): string;
335 // result := Format(Text, [Font.Name, Font.Size]);
338 function TOptionDialog.GetMemoText(font: TFont; text: string): string;
344 s := Format(FONT_TEXT, [Font.Name, Font.Size]) + #13#10;
348 //
\83L
\83\83\83r
\83l
\83b
\83g
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
349 procedure TOptionDialog.CabinetFontBottonClick(Sender: TObject);
351 FontDialog.Options := [fdAnsiOnly, fdEffects];
352 FontDialog.Font.Assign(CabinetMemo.Font);
353 if FontDialog.Execute then begin
354 FontDialog.Font.Style := FontDialog.Font.Style - [fsUnderline] - [fsStrikeout];
355 CabinetMemo.Font.Assign(FontDialog.Font);
356 CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET);
357 CabinetMemo.Font.Charset := SHIFTJIS_CHARSET;
361 //
\83L
\83\83\83r
\83l
\83b
\83g
\94w
\8ci
\90F
\83{
\83^
\83\93
362 procedure TOptionDialog.CabinetColorBottonClick(Sender: TObject);
364 ColorDialog.Color := CabinetMemo.Color;
365 if ColorDialog.Execute then begin
366 CabinetMemo.Color := ColorDialog.Color;
370 //
\83L
\83\83\83r
\83l
\83b
\83g
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
371 procedure TOptionDialog.CabinetDefaultButtonClick(Sender: TObject);
373 CabinetMemo.Font.Name := DEFAULT_FONT_NAME;
374 CabinetMemo.Font.Size := DEFAULT_FONT_SIZE;
375 CabinetMemo.Font.Color := clWindowText;
376 CabinetMemo.Font.Style := [];
377 CabinetMemo.Color := clWindow;
378 CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET);
381 //
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
382 procedure TOptionDialog.ListFontBottonClick(Sender: TObject);
384 FontDialog.Options := [fdAnsiOnly, fdEffects];
385 FontDialog.Font.Assign(ListMemo.Font);
386 if FontDialog.Execute then begin
387 ListMemo.Font.Assign(FontDialog.Font);
388 ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD);
389 ListMemo.Font.Charset := SHIFTJIS_CHARSET;
393 //
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g
\94w
\8ci
\90F
\83{
\83^
\83\93
394 procedure TOptionDialog.ListColorBottonClick(Sender: TObject);
396 ColorDialog.Color := ListMemo.Color;
397 if ColorDialog.Execute then begin
398 ListMemo.Color := ColorDialog.Color;
402 //
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
403 procedure TOptionDialog.ListDefaultBottonClick(Sender: TObject);
405 ListMemo.Font.Name := DEFAULT_FONT_NAME;
406 ListMemo.Font.Size := DEFAULT_FONT_SIZE;
407 ListMemo.Font.Color := clWindowText;
408 ListMemo.Font.Style := [];
409 ListMemo.Color := clWindow;
410 ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD);
413 //
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
414 procedure TOptionDialog.HintFontButtonClick(Sender: TObject);
416 FontDialog.Options := [fdAnsiOnly, fdEffects];
417 FontDialog.Font.Assign(HintMemo.Font);
418 if FontDialog.Execute then begin
419 HintMemo.Font.Assign(FontDialog.Font);
420 HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP);
421 HintMemo.Font.Charset := SHIFTJIS_CHARSET;
425 //
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v
\94w
\8ci
\90F
\83{
\83^
\83\93
426 procedure TOptionDialog.HintBackButtonClick(Sender: TObject);
428 ColorDialog.Color := HintMemo.Color;
429 if ColorDialog.Execute then begin
430 HintMemo.Color := ColorDialog.Color;
434 //
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
435 procedure TOptionDialog.HintDefaultButtonClick(Sender: TObject);
437 HintMemo.Font.Name := DEFAULT_FONT_NAME;
438 HintMemo.Font.Size := DEFAULT_FONT_SIZE;
439 HintMemo.Font.Color := clWindowText;
440 HintMemo.Font.Style := [];
441 HintMemo.Color := clInfoBk;
442 HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP);
445 //
\83u
\83\89\83E
\83U
\83^
\83u
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
446 procedure TOptionDialog.BruwserTabFontButtonClick(Sender: TObject);
448 FontDialog.Options := [fdAnsiOnly];
449 FontDialog.Font.Assign(BrowserTabMemo.Font);
450 if FontDialog.Execute then begin
451 BrowserTabMemo.Font.Assign(FontDialog.Font);
452 BrowserTabMemo.Text := GetMemoText(FontDialog.Font, MEMO_BROWSERTAB);
453 BrowserTabMemo.Font.Charset := SHIFTJIS_CHARSET;
457 //
\83u
\83\89\83E
\83U
\83^
\83u
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
458 procedure TOptionDialog.BrowserTabDefaultButtonClick(Sender: TObject);
460 BrowserTabMemo.Font.Name := DEFAULT_TABFONT_NAME;
461 BrowserTabMemo.Font.Size := DEFAULT_TABFONT_SIZE;
462 BrowserTabMemo.Font.Color := clWindowText;
463 BrowserTabMemo.Font.Style := [];
464 BrowserTabMemo.Color := clBtnFace;
465 BrowserTabMemo.Text := GetMemoText(BrowserTabMemo.Font, MEMO_BROWSERTAB);
468 //
\83G
\83f
\83B
\83^
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
469 procedure TOptionDialog.EditorFontBottonClick(Sender: TObject);
471 FontDialog.Options := [fdAnsiOnly, fdEffects];
472 FontDialog.Font.Assign(EditorMemo.Font);
473 if FontDialog.Execute then begin
474 EditorMemo.Font.Assign(FontDialog.Font);
475 EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR);
476 EditorMemo.Font.Charset := SHIFTJIS_CHARSET;
480 //
\83G
\83f
\83B
\83^
\94w
\8ci
\90F
\83{
\83^
\83\93
481 procedure TOptionDialog.EditorColorBottonClick(Sender: TObject);
483 ColorDialog.Color := EditorMemo.Font.Color;
484 if ColorDialog.Execute then begin
485 EditorMemo.Color := ColorDialog.Color;
489 //
\83G
\83f
\83B
\83^
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
490 procedure TOptionDialog.EditorDefaultBottonClick(Sender: TObject);
492 EditorMemo.Font.Name := DEFAULT_FONT_NAME;
493 EditorMemo.Font.Size := DEFAULT_FONT_SIZE;
494 EditorMemo.Font.Color := clWindowText;
495 EditorMemo.Font.Style := [];
496 EditorMemo.Color := clWindow;
497 EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR);
500 procedure TOptionDialog.SetValue;
506 FileList: TStringList;
508 //
\8eó
\90M
\83o
\83b
\83t
\83@
\83T
\83C
\83Y
509 RecvBufferSize.Text := IntToStr(Gikosys.Setting.RecvBufferSize);
511 ProtocolCheckBox.Checked := GikoSys.Setting.Protocol;
512 //
\83v
\83\8d\83L
\83V
\90Ú
\91±HTTP1.1
\8eg
\97p
513 ProxyProtocolCheckBox.Checked := Gikosys.Setting.ProxyProtocol;
515 //
\93Ç
\82Ý
\8d\9e\82Ý
\97p
\83v
\83\8d\83L
\83V
516 ReadProxyCheck.Checked := GikoSys.Setting.ReadProxy;
517 ReadProxyCheckClick(nil);
518 ReadProxyAddressEdit.Text := GikoSys.Setting.ReadProxyAddress;
519 ReadPortEdit.Text := IntToStr(GikoSys.Setting.ReadProxyPort);
520 ReadProxyUserIDEdit.Text := GikoSys.Setting.ReadProxyUserID;
521 ReadProxyPasswordEdit.Text := GikoSys.Setting.ReadProxyPassword;
522 //
\8f\91\82«
\8d\9e\82Ý
\97p
\83v
\83\8d\83L
\83V
523 WriteProxyCheck.Checked := GikoSys.Setting.WriteProxy;
524 WriteProxyCheckClick(nil);
525 WriteProxyAddressEdit.Text := GikoSys.Setting.WriteProxyAddress;
526 WritePortEdit.Text := IntToStr(GikoSys.Setting.WriteProxyPort);
527 WriteProxyUserIDEdit.Text := GikoSys.Setting.WriteProxyUserID;
528 WriteProxyPasswordEdit.Text := GikoSys.Setting.WriteProxyPassword;
529 //
\83L
\83\83\83r
\83l
\83b
\83g
\83t
\83H
\83\93\83g
530 CabinetMemo.Font.Name := GikoSys.Setting.CabinetFontName;
531 CabinetMemo.Font.Size := GikoSys.Setting.CabinetFontSize;
532 CabinetMemo.Font.Color := GikoSys.Setting.CabinetFontColor;
533 CabinetMemo.Color := GikoSys.Setting.CabinetBackColor;
534 //
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g
\83t
\83H
\83\93\83g
535 ListMemo.Font.Name := GikoSys.Setting.ListFontName;
536 ListMemo.Font.Size := GikoSys.Setting.ListFontSize;
537 ListMemo.Font.Color := GikoSys.Setting.ListFontColor;
538 ListMemo.Color := GikoSys.Setting.ListBackColor;
539 //
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v
\83t
\83H
\83\93\83g
540 HintMemo.Font.Name := GikoSys.Setting.HintFontName;
541 HintMemo.Font.Size := GikoSys.Setting.HintFontSize;
542 HintMemo.Font.Color := GikoSys.Setting.HintFontColor;
543 HintMemo.Color := GikoSys.Setting.HintBackColor;
544 //
\83u
\83\89\83E
\83U
\83^
\83u
\83t
\83H
\83\93\83g
545 BrowserTabMemo.Font.Name := GikoSys.Setting.BrowserTabFontName;
546 BrowserTabMemo.Font.Size := GikoSys.Setting.BrowserTabFontSize;
547 BrowserTabMemo.Font.Style := [];
548 if GikoSys.Setting.BrowserTabFontBold then
549 BrowserTabMemo.Font.Style := BrowserTabMemo.Font.Style + [fsBold];
550 if GikoSys.Setting.BrowserTabFontItalic then
551 BrowserTabMemo.Font.Style := BrowserTabMemo.Font.Style + [fsItalic];
552 //
\83G
\83f
\83B
\83^
\83\81\83\82\83t
\83H
\83\93\83g
553 EditorMemo.Font.Name := GikoSys.Setting.EditorFontName;
554 EditorMemo.Font.Size := GikoSys.Setting.EditorFontSize;
555 EditorMemo.Font.Color := GikoSys.Setting.EditorFontColor;
556 EditorMemo.Color := GikoSys.Setting.EditorBackColor;
558 CSSCheckBox.Checked := GikoSys.Setting.UseCSS;
559 FCSSFont := TFont.Create;
560 if (GikoSys.Setting.BrowserFontName <> '') or
561 (GikoSys.Setting.BrowserFontSize <> 0) or
562 (GikoSys.Setting.BrowserFontBold <> 0) or
563 (GikoSys.Setting.BrowserFontItalic <> 0) or
564 (GikoSys.Setting.BrowserFontColor <> -1 ) then begin
565 CSSFontCheckBox.Checked := True;
567 FCSSFont.Name := GikoSys.Setting.BrowserFontName;
568 FCSSFont.Size := GikoSys.Setting.BrowserFontSize;
569 FCSSFont.Style := [];
570 if GikoSys.Setting.BrowserFontBold = 1 then
571 FCSSFont.Style := FCSSFont.Style + [fsBold];
572 if GikoSys.Setting.BrowserFontItalic = 1 then
573 FCSSFont.Style := FCSSFont.Style + [fsItalic];
574 i := GikoSys.Setting.BrowserFontColor;
575 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
578 if GikoSys.Setting.BrowserBackColor <> -1 then begin
579 CSSBackColorCheckBox.Checked := True;
581 i := GikoSys.Setting.BrowserBackColor;
582 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
586 //
\83X
\83^
\83C
\83\8b\83V
\81[
\83g
\83t
\83@
\83C
\83\8b\96¼
\88ê
\97\97
587 FileList := TStringList.Create;
589 GikoSys.GetFileList(GikoSys.GetStyleSheetDir, '*.css', FileList, True, True);
591 Idx := Length(GikoSys.GetStyleSheetDir);
592 for i := 0 to FileList.Count - 1 do
593 FileList[i] := Copy(FileList[i], Idx + 1, Length(FileList[i]));
595 for i := 0 to FileList.Count - 1 do begin
596 //s := ExtractFileName(FileList[i]);
597 if LowerCase(FileList[i]) = 'default.css' then
598 Item := CSSListView.Items.Insert(0)
600 Item := CSSListView.Items.Add;
601 Item.Caption := ChangeFileExt(FileList[i], '');
602 if LowerCase(FileList[i]) = LowerCase(GikoSys.Setting.CSSFileName) then
603 Item.Selected := True;
608 //
\83X
\83L
\83\93\83t
\83@
\83C
\83\8b\96¼
\88ê
\97\97
609 FileList := TStringList.Create;
611 GikoSys.GetDirectoryList(GikoSys.GetSkinDir, '*', FileList, False);
613 Idx := Length(GikoSys.GetSkinDir);
615 for i := 0 to FileList.Count - 1 do begin
616 //s := ExtractFileName(FileList[i]);
617 Item := CSSListView.Items.Add;
618 Item.Data := PChar( FileList[i] );
619 Item.Caption := Copy( FileList[i], Idx + 1, Length(FileList[i]) );
620 if LowerCase(FileList[i]) = LowerCase(GikoSys.Setting.CSSFileName) then
621 Item.Selected := True;
624 // Item.Data
\82É
\83|
\83C
\83\93\83^
\93Ë
\82Á
\8d\9e\82ñ
\82Å
\82é
\82©
\82ç
\8aJ
\95ú
\82Å
\82«
\82È
\82¢
\82æ
\82§
\81`
628 if (CSSListView.ItemIndex = -1) and (CSSListView.Items.Count > 0) then
629 CSSListView.Items[0].Selected := True;
632 ShowMailCheckBox.Checked := GikoSys.Setting.ShowMail;
633 //
\83^
\83u
\92Ç
\89Á
\88Ê
\92u
634 TabAddRadioGroup.ItemIndex := Ord(GikoSys.Setting.BrowserTabAppend);
636 BoardURL2chEdit.Text := GikoSys.Setting.BoardURL2ch;
638 UserIDEdit.Text := GikoSys.Setting.UserID;
639 PasswordEdit.Text := GikoSys.Setting.Password;
640 AutoLoginCheckBox.Checked := GikoSys.Setting.AutoLogin;
641 //
\83\8d\83O
\83t
\83H
\83\8b\83_
642 if GikoSys.Setting.NewLogFolder = '' then
643 LogFolderEdit.Text := GikoSys.Setting.LogFolder
645 LogFolderEdit.Text := GikoSys.Setting.NewLogFolder;
647 for i := 0 to GikoSys.Setting.GetSoundCount - 1 do begin
648 Item := SoundListView.Items.Add;
649 Item.Caption := GikoSys.Setting.SoundViewName[i];
650 if FileExists(GikoSys.Setting.SoundFileName[i]) then
651 Item.SubItems.Add(GikoSys.Setting.SoundFileName[i])
653 Item.SubItems.Add('');
655 //URL
\83N
\83\8a\83b
\83N
\8e\9e\93®
\8dì
656 URLAppCheckBox.Checked := GikoSys.Setting.URLApp;
657 URLAppCheckBoxClick(nil);
658 AppFolderEdit.Text := GikoSys.Setting.URLAppFile;
660 //mailto
\83N
\83\8a\83b
\83N
\8e\9e\93®
\8dì
661 OpenMailerCheckBox.Checked := GikoSys.Setting.OpenMailer;
663 //
\83\8d\83O
\8dí
\8f\9c\8e\9e\83\81\83b
\83Z
\81[
\83W
664 LogDeleteMessageCheckBox.Checked := GikoSys.Setting.DeleteMsg;
666 //
\83|
\83b
\83v
\83A
\83b
\83v
\88Ê
\92u
667 case GikoSys.Setting.PopupPosition of
668 gppRightTop: PopupPositionRadioGroup.ItemIndex := 0;
669 gppRight: PopupPositionRadioGroup.ItemIndex := 1;
670 gppRightBottom: PopupPositionRadioGroup.ItemIndex := 2;
671 gppTop: PopupPositionRadioGroup.ItemIndex := 3;
672 gppCenter: PopupPositionRadioGroup.ItemIndex := 4;
673 gppBottom: PopupPositionRadioGroup.ItemIndex := 5;
674 gppLeftTop: PopupPositionRadioGroup.ItemIndex := 6;
675 gppLeft: PopupPositionRadioGroup.ItemIndex := 7;
676 gppLeftBottom: PopupPositionRadioGroup.ItemIndex := 8;
679 //
\94ñ
\83A
\83N
\83e
\83B
\83u
\8e\9e\83|
\83b
\83v
\83A
\83b
\83v
\95\
\8e¦
680 UnActivePopupCheckBox.Checked := GikoSys.Setting.UnActivePopup;
681 //
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\83{
\81[
\83\8b\83h
\95\
\8e¦
682 ResPopupBoldCheckBox.Checked := GikoSys.Setting.ResPopupHeaderBold;
684 //
\83A
\83h
\83\8c\83X
\83o
\81[
685 URLDisplayCheckBox.Checked := GikoSys.Setting.URLDisplay;
686 TabStopAddressBarCheckBox.Checked := GikoSys.Setting.AddressBarTabStop;
687 LinkAddCheckBox.Checked := GikoSys.Setting.LinkAddAddressBar;
688 AddressHistoryCountEdit.Text := IntToStr(GikoSys.Setting.AddressHistoryCount);
690 //HTML
\83v
\83\8c\83r
\83\85\81[
691 PreviewVisibleCheckBox.Checked := GikoSys.Setting.PreviewVisible;
692 PreviewWaitEdit.Text := IntToStr(GikoSys.Setting.PreviewWait);
693 PreviewSizeComboBox.ItemIndex := 2;
694 case GikoSys.Setting.PreviewSize of
695 gpsXLarge: PreviewSizeComboBox.ItemIndex := 4;
696 gpsLarge: PreviewSizeComboBox.ItemIndex := 3;
697 gpsMedium: PreviewSizeComboBox.ItemIndex := 2;
698 gpsSmall: PreviewSizeComboBox.ItemIndex := 1;
699 gpsXSmall: PreviewSizeComboBox.ItemIndex := 0;
702 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\8dX
\90V
\83A
\83C
\83R
\83\93
703 ThreadListIconCheckBox.Checked := GikoSys.Setting.ListIconVisible;
705 //
\8f\91\82«
\8d\9e\82Ý
\8e\9e\83}
\83V
\83\93\8e\9e\8aÔ
\8eg
\97p
\90Ý
\92è
706 PostTimeCheckBox.Checked := GikoSys.Setting.UseMachineTime;
707 PostTimeEdit.Text := IntToStr(GikoSys.Setting.TimeAdjustSec);
708 if GikoSys.Setting.TimeAdjust then
709 PutPostTimeRadioButton.Checked := True
711 BackPostTimeRadioButton.Checked := True;
713 RloCheckBox.Checked := GikoSys.Setting.AbonDeleterlo;
714 ReplaceulCheckBox.Checked := GikoSys.Setting.AbonReplaceul;
715 PopUpAbonCheckBox.Checked := GikoSys.Setting.PopUpAbon;
716 ShowNGLineCheckBox.Checked := GikoSys.Setting.ShowNGLinesNum;
717 AddResAnchorCheckBox.Checked := GikoSys.Setting.AddResAnchor;
721 procedure TOptionDialog.SaveSetting;
726 //
\8eó
\90M
\83o
\83b
\83t
\83@
\83T
\83C
\83Y
727 Gikosys.Setting.RecvBufferSize := StrToInt(RecvBufferSize.Text);
729 GikoSys.Setting.Protocol := ProtocolCheckBox.Checked;
730 //
\83v
\83\8d\83L
\83V
\90Ú
\91±HTTP1.1
\8eg
\97p
731 Gikosys.Setting.ProxyProtocol := ProxyProtocolCheckBox.Checked;
733 GikoSys.Setting.OptionDialogTabIndex := OptionTab.TabIndex;
735 GikoSys.Setting.ReadProxy := ReadProxyCheck.Checked;
736 GikoSys.Setting.ReadProxyAddress := ReadProxyAddressEdit.Text;
737 GikoSys.Setting.ReadProxyPort := StrToInt(ReadPortEdit.Text);
738 GikoSys.Setting.ReadProxyUserID := ReadProxyUserIDEdit.Text;
739 GikoSys.Setting.ReadProxyPassword := ReadProxyPasswordEdit.Text;
741 GikoSys.Setting.WriteProxy := WriteProxyCheck.Checked;
742 GikoSys.Setting.WriteProxyAddress := WriteProxyAddressEdit.Text;
743 GikoSys.Setting.WriteProxyPort := StrToInt(WritePortEdit.Text);
744 GikoSys.Setting.WriteProxyUserID := WriteProxyUserIDEdit.Text;
745 GikoSys.Setting.WriteProxyPassword := WriteProxyPasswordEdit.Text;
747 GikoSys.Setting.CabinetFontName := CabinetMemo.Font.Name;
748 GikoSys.Setting.CabinetFontSize := CabinetMemo.Font.Size;
749 GikoSys.Setting.CabinetFontColor := CabinetMemo.Font.Color;
750 GikoSys.Setting.CabinetBackColor := CabinetMemo.Color;
752 GikoSys.Setting.ListFontName := ListMemo.Font.Name;
753 GikoSys.Setting.ListFontSize := ListMemo.Font.Size;
754 GikoSys.Setting.ListFontColor := ListMemo.Font.Color;
755 GikoSys.Setting.ListBackColor := ListMemo.Color;
757 GikoSys.Setting.HintFontName := HintMemo.Font.Name;
758 GikoSys.Setting.HintFontSize := HintMemo.Font.Size;
759 GikoSys.Setting.HintFontColor := HintMemo.Font.Color;
760 GikoSys.Setting.HintBackColor := HintMemo.Color;
762 GikoSys.Setting.BrowserTabFontName := BrowserTabMemo.Font.Name;
763 GikoSys.Setting.BrowserTabFontSize := BrowserTabMemo.Font.Size;
765 GikoSys.Setting.EditorFontName := EditorMemo.Font.Name;
766 GikoSys.Setting.EditorFontSize := EditorMemo.Font.Size;
767 GikoSys.Setting.EditorFontColor := EditorMemo.Font.Color;
768 GikoSys.Setting.EditorBackColor := EditorMemo.Color;
770 GikoSys.Setting.UseCSS := CSSCheckBox.Checked;
771 //CSS
\83t
\83@
\83C
\83\8b\96¼
772 GikoSys.Setting.CSSFileName := 'default.css';
773 if CSSListView.Items.Count > 0 then begin
775 if CSSListView.Items[CSSListView.ItemIndex].Data <> nil then
776 GikoSys.Setting.CSSFileName := string( CSSListView.Items[CSSListView.ItemIndex].data )
778 GikoSys.Setting.CSSFileName := CSSListView.Items[CSSListView.ItemIndex].Caption + '.css';
782 // CSS
\82Ì
\83t
\83H
\83\93\83g
\8ew
\92è
783 if CSSFontCheckBox.Checked then begin
784 GikoSys.Setting.BrowserFontName := FCSSFont.Name;
785 GikoSys.Setting.BrowserFontSize := FCSSFont.Size;
786 if fsBold in FCSSFont.Style then
787 GikoSys.Setting.BrowserFontBold := 1
789 GikoSys.Setting.BrowserFontBold := -1;
790 if fsItalic in FCSSFont.Style then
791 GikoSys.Setting.BrowserFontItalic := 1
793 GikoSys.Setting.BrowserFontItalic := -1;
794 i := ColorToRGB( FCSSFont.Color );
795 GikoSys.Setting.BrowserFontColor := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
797 GikoSys.Setting.BrowserFontName := '';
798 GikoSys.Setting.BrowserFontSize := 0;
799 GikoSys.Setting.BrowserFontBold := 0;
800 GikoSys.Setting.BrowserFontItalic := 0;
801 GikoSys.Setting.BrowserFontColor := -1;
803 if CSSBackColorCheckBox.Checked then begin
804 i := ColorToRGB( FCSSBackColor );
805 GikoSys.Setting.BrowserBackColor := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
807 GikoSys.Setting.BrowserBackColor := -1;
811 GikoSys.Setting.ShowMail := ShowMailCheckBox.Checked;
813 GikoSys.Setting.BrowserTabAppend := TGikoTabAppend(TabAddRadioGroup.ItemIndex);
815 GikoSys.Setting.BoardURL2ch := BoardURL2chEdit.Text;
817 GikoSys.Setting.UserID := UserIDEdit.Text;
818 GikoSys.Setting.Password := PasswordEdit.Text;
819 GikoSys.Setting.AutoLogin := AutoLoginCheckBox.Checked;
821 GikoSys.Setting.URLApp := URLAppCheckBox.Checked;
822 GikoSys.Setting.URLAppFile := AppFolderEdit.Text;
824 GikoSys.Setting.OpenMailer := OpenMailerCheckBox.Checked;
825 GikoSys.Setting.DeleteMsg := LogDeleteMessageCheckBox.Checked;
827 //
\83|
\83b
\83v
\83A
\83b
\83v
\88Ê
\92u
828 case PopupPositionRadioGroup.ItemIndex of
829 0: GikoSys.Setting.PopupPosition := gppRightTop;
830 1: GikoSys.Setting.PopupPosition := gppRight;
831 2: GikoSys.Setting.PopupPosition := gppRightBottom;
832 3: GikoSys.Setting.PopupPosition := gppTop;
833 4: GikoSys.Setting.PopupPosition := gppCenter;
834 5: GikoSys.Setting.PopupPosition := gppBottom;
835 6: GikoSys.Setting.PopupPosition := gppLeftTop;
836 7: GikoSys.Setting.PopupPosition := gppLeft;
837 8: GikoSys.Setting.PopupPosition := gppLeftBottom;
840 //
\94ñ
\83A
\83N
\83e
\83B
\83u
\8e\9e\83|
\83b
\83v
\83A
\83b
\83v
\95\
\8e¦
841 GikoSys.Setting.UnActivePopup := UnActivePopupCheckBox.Checked;
842 //
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\83{
\81[
\83\8b\83h
\95\
\8e¦
843 GikoSys.Setting.ResPopupHeaderBold := ResPopupBoldCheckBox.Checked;
845 //
\83A
\83h
\83\8c\83X
\83o
\81[
846 GikoSys.Setting.URLDisplay := URLDisplayCheckBox.Checked;
847 GikoSys.Setting.AddressBarTabStop := TabStopAddressBarCheckBox.Checked;
848 GikoSys.Setting.LinkAddAddressBar := LinkAddCheckBox.Checked;
849 if GikoSys.IsNumeric(AddressHistoryCountEdit.Text) then
850 GikoSys.Setting.AddressHistoryCount := StrToInt(AddressHistoryCountEdit.Text)
852 GikoSys.Setting.AddressHistoryCount := 100;
854 //HTML
\83v
\83\8c\83r
\83\85\81[
855 GikoSys.Setting.PreviewVisible := PreviewVisibleCheckBox.Checked;
856 if GikoSys.IsNumeric(PreviewWaitEdit.Text) then
857 GikoSys.Setting.PreviewWait := StrToInt(PreviewWaitEdit.Text)
859 GikoSys.Setting.PreviewWait := 500;
860 case PreviewSizeComboBox.ItemIndex of
861 0: GikoSys.Setting.PreviewSize := gpsXSmall;
862 1: GikoSys.Setting.PreviewSize := gpsSmall;
863 2: GikoSys.Setting.PreviewSize := gpsMedium;
864 3: GikoSys.Setting.PreviewSize := gpsLarge;
865 4: GikoSys.Setting.PreviewSize := gpsXLarge;
868 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\8dX
\90V
\83A
\83C
\83R
\83\93
869 GikoSys.Setting.ListIconVisible := ThreadListIconCheckBox.Checked;
871 //
\8f\91\82«
\8d\9e\82Ý
\8e\9e\83}
\83V
\83\93\8e\9e\8aÔ
\8eg
\97p
\90Ý
\92è
872 GikoSys.Setting.UseMachineTime := PostTimeCheckBox.Checked;
873 if GikoSys.IsNumeric(PostTimeEdit.Text) then
874 GikoSys.Setting.TimeAdjustSec := StrToInt(PostTimeEdit.Text)
876 GikoSys.Setting.TimeAdjustSec := 0;
877 GikoSys.Setting.TimeAdjust := PutPostTimeRadioButton.Checked;
880 GikoSys.Setting.WriteSystemSettingFile;
881 // GikoForm.SetBrowserTabState;
883 if LogFolderEdit.Text <> '' then begin
884 GikoSys.Setting.NewLogFolder := LogFolderEdit.Text;
885 GikoSys.Setting.WriteFolderSettingFile;
888 for i := 0 to SoundListView.Items.Count - 1 do begin
889 if FileExists(SoundListView.Items[i].SubItems[0]) then
890 GikoSys.Setting.SoundFileName[i] := SoundListView.Items[i].SubItems[0]
892 GikoSys.Setting.SoundFileName[i] := '';
896 GikoSys.Setting.AbonDeleterlo := RloCheckBox.Checked;
897 GikoSys.Setting.AbonReplaceul := ReplaceulCheckBox.Checked;
898 GikoSys.Setting.PopUpAbon := PopUpAbonCheckBox.Checked;
899 GikoSys.Setting.ShowNGLinesNum := ShowNGLineCheckBox.Checked;
900 GikoSys.Setting.AddResAnchor := AddResAnchorCheckBox.Checked;
904 procedure TOptionDialog.SettingApply;
907 ThreadItem: TThreadItem;
909 GikoForm.TreeView.Items.BeginUpdate;
910 GikoForm.FavoriteTreeView.Items.BeginUpdate;
911 GikoForm.ListView.Items.BeginUpdate;
913 GikoForm.TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
914 GikoForm.TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
915 GikoForm.TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
916 GikoForm.TreeView.Color := GikoSys.Setting.CabinetBackColor;
918 GikoForm.FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
919 GikoForm.FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
920 GikoForm.FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
921 GikoForm.FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
923 GikoForm.ListView.Font.Name := GikoSys.Setting.ListFontName;
924 GikoForm.ListView.Font.Size := GikoSys.Setting.ListFontSize;
925 GikoForm.ListView.Font.Color := GikoSys.Setting.ListFontColor;
926 GikoForm.ListView.Color := GikoSys.Setting.ListBackColor;
928 GikoForm.BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
929 GikoForm.BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
930 // GikoForm.BrowserTab.Height := (GikoSys.Setting.BrowserTabFontSize * 2) + 1;
931 // GikoForm.BrowserBottomPanel.Height := GikoForm.BrowserTab.Height;
933 for i := 0 to Screen.CustomFormCount - 1 do begin
934 if TObject(Screen.CustomForms[i]) is TEditorForm then begin
935 TEditorForm(Screen.CustomForms[i]).SetFont;
940 GikoForm.TreeView.Items.EndUpdate;
941 GikoForm.FavoriteTreeView.Items.EndUpdate;
942 GikoForm.ListView.Items.EndUpdate;
945 //
\83A
\83h
\83\8c\83X
\83o
\81[
946 for i := GikoForm.AddressComboBox.Items.Count - 1 downto 0 do begin
947 if GikoSys.Setting.AddressHistoryCount >= GikoForm.AddressComboBox.Items.Count then
949 GikoForm.AddressComboBox.Items.Delete(i);
951 GikoForm.AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
953 //
\83X
\83\8c\83b
\83h
\82Ì
\83\8a\83t
\83\8c\83b
\83V
\83\85
954 ThreadItem := GikoForm.GetActiveContent;
955 if ThreadItem <> nil then
956 GikoForm.SetContent( ThreadItem );
959 procedure TOptionDialog.ReadProxyCheckClick(Sender: TObject);
961 ReadProxyAddressEdit.Enabled := ReadProxyCheck.Checked;
962 ReadPortEdit.Enabled := ReadProxyCheck.Checked;
963 ReadProxyUserIDEdit.Enabled := ReadProxyCheck.Checked;
964 ReadProxyPasswordEdit.Enabled := ReadProxyCheck.Checked;
966 ReadAddressLabel.Enabled := ReadProxyCheck.Checked;
967 ReadPortLabel.Enabled := ReadProxyCheck.Checked;
968 ReadUserIDLabel.Enabled := ReadProxyCheck.Checked;
969 ReadPasswordLabel.Enabled := ReadProxyCheck.Checked;
972 procedure TOptionDialog.ReadPortEditExit(Sender: TObject);
974 if not GikoSys.IsNumeric(ReadPortEdit.Text) then
975 ReadPortEdit.Text := '0';
978 procedure TOptionDialog.LogFolderButtonClick(Sender: TObject);
984 if SelectDirectory('
\83\8d\83O
\83t
\83H
\83\8b\83_
\91I
\91ð', Root, Dir) then begin
985 LogFolderEdit.Text := Dir;
989 function TOptionDialog.CheckFolder: Boolean;
991 if Trim(LogFolderEdit.Text) = '' then
992 LogFolderEdit.Text := ExtractFilePath(Application.ExeName) + 'Log';
994 if DirectoryExists(LogFolderEdit.Text) then begin
997 if MsgBox(Handle, '
\83\8d\83O
\83t
\83H
\83\8b\83_
\82ª
\91¶
\8dÝ
\82µ
\82Ü
\82¹
\82ñ
\81B
\8dì
\90¬
\82µ
\82Ü
\82·
\82©
\81H', '
\83M
\83R
\83i
\83r', MB_YESNO or MB_ICONQUESTION) = IDYES then begin
998 //
\83t
\83H
\83\8b\83_
\82ð
\8dì
\90¬
1000 GikoSys.ForceDirectoriesEx(LogFolderEdit.Text);
1003 MsgBox(Handle, '
\83\8d\83O
\83t
\83H
\83\8b\83_
\82Ì
\8ew
\92è
\82ª
\95s
\90³
\82Å
\82·
\81B', '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
1004 OptionTab.ActivePage := FolderSheet;
1005 LogFolderEdit.SetFocus;
1013 procedure TOptionDialog.FormClose(Sender: TObject; var Action: TCloseAction);
1020 procedure TOptionDialog.SoundReferButtonClick(Sender: TObject);
1022 OpenDialog.Filter := '
\83T
\83E
\83\93\83h (*.wav)|*.wav|
\82·
\82×
\82Ä
\82Ì
\83t
\83@
\83C
\83\8b (*.*)|*.*';
1023 sndPlaySound(nil, SND_ASYNC);
1024 if OpenDialog.Execute then begin
1025 SoundFileEdit.Text := OpenDialog.FileName;
1029 procedure TOptionDialog.SoundPlayButtonClick(Sender: TObject);
1031 if not FileExists(SoundFileEdit.Text) then begin
1032 MsgBox(Handle, '
\91¶
\8dÝ
\82µ
\82È
\82¢
\83t
\83@
\83C
\83\8b\82Å
\82·', '
\83G
\83\89\81[', MB_ICONSTOP or MB_OK);
1033 SoundFileEdit.Text := '';
1036 if not sndPlaySound(PChar(SoundFileEdit.Text), SND_ASYNC or SND_NOSTOP) then begin
1037 sndPlaySound(nil, SND_ASYNC);
1041 procedure TOptionDialog.SoundListViewChanging(Sender: TObject;
1042 Item: TListItem; Change: TItemChange; var AllowChange: Boolean);
1044 if Item.SubItems.Count > 0 then
1045 SoundFileEdit.Text := Item.SubItems[0];
1048 procedure TOptionDialog.SoundFileEditChange(Sender: TObject);
1052 sndPlaySound(nil, SND_ASYNC);
1053 Item := SoundListView.Selected;
1054 if Item = nil then Exit;
1056 if FileExists(SoundFileEdit.Text) then
1057 Item.SubItems[0] := SoundFileEdit.Text;
1058 if Trim(SoundFileEdit.Text) = '' then
1059 Item.SubItems[0] := '';
1062 procedure TOptionDialog.OptionTabChange(Sender: TObject);
1064 sndPlaySound(nil, SND_ASYNC);
1066 if OptionTab.ActivePage = CSSTabSheet then
1070 procedure TOptionDialog.AppFolderButtonClick(Sender: TObject);
1072 OpenDialog.Filter := '
\8eÀ
\8ds
\83t
\83@
\83C
\83\8b (*.exe)|*.exe|
\82·
\82×
\82Ä
\82Ì
\83t
\83@
\83C
\83\8b (*.*)|*.*';
1073 if OpenDialog.Execute then
1074 AppFolderEdit.Text := OpenDialog.FileName;
1077 procedure TOptionDialog.WriteProxyCheckClick(Sender: TObject);
1079 WriteProxyAddressEdit.Enabled := WriteProxyCheck.Checked;
1080 WritePortEdit.Enabled := WriteProxyCheck.Checked;
1081 WriteProxyUserIDEdit.Enabled := WriteProxyCheck.Checked;
1082 WriteProxyPasswordEdit.Enabled := WriteProxyCheck.Checked;
1084 WriteAddressLabel.Enabled := WriteProxyCheck.Checked;
1085 WritePortLabel.Enabled := WriteProxyCheck.Checked;
1086 WriteUserIDLabel.Enabled := WriteProxyCheck.Checked;
1087 WritePasswordLabel.Enabled := WriteProxyCheck.Checked;
1090 procedure TOptionDialog.WritePortEditExit(Sender: TObject);
1092 if not GikoSys.IsNumeric(WritePortEdit.Text) then
1093 WritePortEdit.Text := '0';
1096 procedure TOptionDialog.Tora3URLLabelClick(Sender: TObject);
1098 GikoSys.OpenBrowser(URL_TORA3, gbtAuto);
1101 procedure TOptionDialog.HotKeyEnter(Sender: TObject);
1103 OkBotton.Default := False;
1104 CancelBotton.Cancel := False;
1107 procedure TOptionDialog.HotKeyExit(Sender: TObject);
1109 OkBotton.Default := True;
1110 CancelBotton.Cancel := True;
1113 procedure TOptionDialog.URLAppCheckBoxClick(Sender: TObject);
1115 AppFolderLabel.Enabled := URLAppCheckBox.Checked;
1116 AppFolderEdit.Enabled := URLAppCheckBox.Checked;
1117 AppFolderButton.Enabled := URLAppCheckBox.Checked;
1120 procedure TOptionDialog.AddressHistoryCountEditExit(Sender: TObject);
1122 if not GikoSys.IsNumeric(AddressHistoryCountEdit.Text) then
1123 AddressHistoryCountEdit.Text := '100';
1126 procedure TOptionDialog.PreviewWaitEditExit(Sender: TObject);
1128 if not GikoSys.IsNumeric(PreviewWaitEdit.Text) then
1129 PreviewWaitEdit.Text := '500';
1130 if StrToInt(PreviewWaitEdit.Text) < 500 then
1131 PreviewWaitEdit.Text := '500';
1132 if StrToInt(PreviewWaitEdit.Text) > 9999 then
1133 PreviewWaitEdit.Text := '9999';
1136 procedure TOptionDialog.RecvBufferSizeExit(Sender: TObject);
1138 if not GikoSys.IsNumeric(RecvBufferSize.Text) then
1139 RecvBufferSize.Text := '4096';
1140 if StrToInt(RecvBufferSize.Text) < 256 then
1141 RecvBufferSize.Text := '4096';
1144 procedure TOptionDialog.CSSCheckBoxClick(Sender: TObject);
1146 CSSListLabel.Enabled := CSSCheckBox.Checked;
1147 CSSListView.Enabled := CSSCheckBox.Checked;
1150 procedure TOptionDialog.PostTimeEditExit(Sender: TObject);
1152 if not GikoSys.IsNumeric(PostTimeEdit.Text) then
1153 PostTimeEdit.Text := '0';
1156 procedure TOptionDialog.PostTimeCheckBoxClick(Sender: TObject);
1158 PostTimeLabel.Enabled := PostTimeCheckBox.Checked;
1159 PostTimeEdit.Enabled := PostTimeCheckBox.Checked;
1160 PutPostTimeRadioButton.Enabled := PostTimeCheckBox.Checked;
1161 BackPostTimeRadioButton.Enabled := PostTimeCheckBox.Checked;
1163 procedure TOptionDialog.SetAbonpropertys;
1166 GikoSys.FAbon.Deleterlo := RloCheckBox.Checked;
1167 GikoSys.FAbon.Replaceul := ReplaceulCheckBox.Checked;
1168 GikoSys.FAbon.AbonPopupRes := PopUpAbonCheckBox.Checked;
1169 GikoSys.FAbon.ReturnNGwordLineNum := ShowNGLineCheckBox.Checked;
1170 GikoSys.FAbon.SetNGResAnchor := AddResAnchorCheckBox.Checked;
1172 procedure TOptionDialog.CSSFontButtonClick(Sender: TObject);
1175 FontDialog.Options := [fdAnsiOnly, fdEffects];
1176 FontDialog.Font.Assign(FCSSFont);
1177 if FontDialog.Execute then begin
1178 FontDialog.Font.Style := FontDialog.Font.Style - [fsUnderline] - [fsStrikeout];
1179 FCSSFont := FontDialog.Font;
1186 procedure TOptionDialog.CSSBackColorButtonClick(Sender: TObject);
1189 ColorDialog.Color := FCSSBackColor;
1190 if ColorDialog.Execute then begin
1191 FCSSBackColor := ColorDialog.Color;
1198 procedure TOptionDialog.CSSFontCheckBoxClick(Sender: TObject);
1201 CSSFontButton.Enabled := CSSFontCheckBox.Checked;
1206 procedure TOptionDialog.CSSBackColorCheckBoxClick(Sender: TObject);
1209 CSSBackColorButton.Enabled := CSSBackColorCheckBox.Checked;
1214 procedure TOptionDialog.CSSSetContent(Content: string);
1218 if CSSBrowser.Document <> nil then begin
1219 doc := CSSBrowser.Document;
1222 doc.charset := 'Shift_JIS';
1228 procedure TOptionDialog.CSSPreview;
1231 ThreadItem: TThreadItem;
1234 Res: array [0..1] of TResRec;
1235 UserOptionalStyle: string;
1240 fileName := GikoSys.Setting.CSSFileName;
1242 GikoSys.Setting.CSSFileName := 'default.css';
1243 if CSSListView.Items.Count > 0 then begin
1245 if CSSListView.ItemIndex >= 0 then begin
1246 if CSSListView.Items[CSSListView.ItemIndex].Data <> nil then
1247 GikoSys.Setting.CSSFileName := string( CSSListView.Items[CSSListView.ItemIndex].data )
1249 GikoSys.Setting.CSSFileName := CSSListView.Items[CSSListView.ItemIndex].Caption + '.css';
1255 Board := TBoard.Create;
1256 ThreadItem := TThreadItem.Create;
1259 Board.URL := 'about://sample/';
1260 Board.Title := '
\83T
\83\93\83v
\83\8b\94Â';
1261 ThreadItem.ParentBoard := Board;
1262 ThreadItem.AllResCount := High( Res );
1263 ThreadItem.NewResCount := 1;
1264 ThreadItem.NewReceive := 2;
1266 sTitle := '
\83T
\83\93\83v
\83\8b\83v
\83\8c\83r
\83\85\81[';
1268 Res[0].FName := '
\96¼
\96³
\82µ
\82³
\82ñ';
1269 Res[0].FMailTo := 'sage';
1270 Res[0].FDateTime := 'ID:Sample';
1271 Res[0].FBody := 'CSS
\82Æ
\83X
\83L
\83\93\82Ì
\83T
\83\93\83v
\83\8b';
1272 Res[1].FName := '
\96¼
\96³
\82µ
\82³
\82ñ';
1273 Res[1].FMailTo := 'age';
1274 Res[1].FDateTime := 'ID:Sample';
1275 Res[1].FBody := '
\83I
\83}
\83G
\83\82\83i
\81[';
1277 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
1278 if CSSFontCheckBox.Checked then begin
1279 i := ColorToRGB( FCSSFont.Color );
1280 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
1282 UserOptionalStyle := UserOptionalStyle +
1283 'font-family:"' + FCSSFont.Name + '";' +
1284 'font-size:' + IntToStr( FCSSFont.Size ) + 'pt;' +
1285 'color:#' + IntToHex( i, 6 ) + ';';
1286 if fsBold in FCSSFont.Style then
1287 UserOptionalStyle := UserOptionalStyle + 'font-weight:bold;'
1289 UserOptionalStyle := UserOptionalStyle + 'font-weight:normal;';
1290 if fsItalic in FCSSFont.Style then
1291 UserOptionalStyle := UserOptionalStyle + 'font-style:italic;'
1293 UserOptionalStyle := UserOptionalStyle + 'font-style:normal;';
1295 if CSSBackColorCheckBox.Checked then begin
1296 i := ColorToRGB( FCSSBackColor );
1297 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
1299 UserOptionalStyle := UserOptionalStyle +
1300 'background-color:#' + IntToHex( i, 6 ) + ';';
1303 if FileExists( GikoSys.GetSkinHeaderFileName ) then begin
1305 GikoSys.LoadFromSkin( GikoSys.GetSkinHeaderFileName, ThreadItem, sTitle, 0 ) +
1306 '<a name="top"></a>' +
1307 GikoSys.SkinedRes( GikoSYs.LoadFromSkin( GikoSys.GetSkinResFileName, ThreadItem, sTitle, 0 ), Res[0], '1' ) +
1308 GikoSys.SkinedRes( GikoSYs.LoadFromSkin( GikoSys.GetSkinNewResFileName, ThreadItem, sTitle, 0 ), Res[1], '2' ) +
1309 '<a name="bottom"></a>' +
1310 GikoSys.LoadFromSkin( GikoSys.GetSkinFooterFileName, ThreadItem, sTitle, 0 );
1312 html := StringReplace( html, '</head>',
1313 '<style type="text/css">body {' + UserOptionalStyle + '}</style></head>', [rfReplaceAll] );
1317 '<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">' +
1318 '<title>' + sTitle + '</title>' +
1319 '<link rel="stylesheet" href="' + GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName + '" type="text/css">' +
1320 '<style type="text/css">body {' + UserOptionalStyle + '}</style>' +
1322 '<div class="title">' + sTitle + '</div>';
1324 for i := 0 to High( Res ) do
1327 '<div class="header"><span class="no">' + IntToStr( i + 1 ) + '</span>' +
1328 '<span class="name_label">
\96¼
\91O
\81F </span>' +
1329 '<a class="name_mail" href="mailto:' + Res[i].FMailTo + '">' +
1330 '<b>' + Res[i].FName + '</b></a><span class="mail"> [' + Res[i].FMailTo + ']</span>' +
1331 '<span class="date_label">
\93\8a\8de
\93ú
\81F</span>' +
1332 '<span class="date"> ' + Res[i].FDateTime+ '</span></div>' +
1333 '<div class="mes">' + Res[i].FBody + ' </div>';
1336 html := html + '</body></html>';
1340 CSSSetContent( html );
1347 GikoSys.Setting.CSSFileName := fileName;
1352 procedure TOptionDialog.CSSListViewChange(Sender: TObject; Item: TListItem;
1353 Change: TItemChange);
1356 if OptionTab.ActivePage = CSSTabSheet then