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 procedure FormCreate(Sender: TObject);
172 procedure FormDestroy(Sender: TObject);
173 procedure ApplyButtonClick(Sender: TObject);
174 procedure CabinetFontBottonClick(Sender: TObject);
175 procedure CabinetColorBottonClick(Sender: TObject);
176 procedure EditorFontBottonClick(Sender: TObject);
177 procedure OkBottonClick(Sender: TObject);
178 procedure ReadProxyCheckClick(Sender: TObject);
179 procedure ListFontBottonClick(Sender: TObject);
180 procedure ListColorBottonClick(Sender: TObject);
181 procedure EditorColorBottonClick(Sender: TObject);
182 procedure CabinetDefaultButtonClick(Sender: TObject);
183 procedure ReadPortEditExit(Sender: TObject);
184 procedure ListDefaultBottonClick(Sender: TObject);
185 procedure EditorDefaultBottonClick(Sender: TObject);
186 procedure HintFontButtonClick(Sender: TObject);
187 procedure HintBackButtonClick(Sender: TObject);
188 procedure HintDefaultButtonClick(Sender: TObject);
189 procedure LogFolderButtonClick(Sender: TObject);
190 procedure FormClose(Sender: TObject; var Action: TCloseAction);
191 procedure SoundReferButtonClick(Sender: TObject);
192 procedure SoundPlayButtonClick(Sender: TObject);
193 procedure SoundListViewChanging(Sender: TObject; Item: TListItem;
194 Change: TItemChange; var AllowChange: Boolean);
195 procedure SoundFileEditChange(Sender: TObject);
196 procedure OptionTabChange(Sender: TObject);
197 procedure AppFolderButtonClick(Sender: TObject);
198 procedure WriteProxyCheckClick(Sender: TObject);
199 procedure WritePortEditExit(Sender: TObject);
200 procedure Tora3URLLabelClick(Sender: TObject);
201 procedure HotKeyEnter(Sender: TObject);
202 procedure HotKeyExit(Sender: TObject);
203 procedure URLAppCheckBoxClick(Sender: TObject);
204 procedure BruwserTabFontButtonClick(Sender: TObject);
205 procedure BrowserTabDefaultButtonClick(Sender: TObject);
206 procedure AddressHistoryCountEditExit(Sender: TObject);
207 procedure PreviewWaitEditExit(Sender: TObject);
208 procedure RecvBufferSizeExit(Sender: TObject);
209 procedure CSSCheckBoxClick(Sender: TObject);
210 procedure PostTimeEditExit(Sender: TObject);
211 procedure PostTimeCheckBoxClick(Sender: TObject);
212 procedure CSSFontButtonClick(Sender: TObject);
213 procedure CSSBackColorButtonClick(Sender: TObject);
214 procedure CSSFontCheckBoxClick(Sender: TObject);
215 procedure CSSBackColorCheckBoxClick(Sender: TObject);
216 procedure CSSListViewChange(Sender: TObject; Item: TListItem;
217 Change: TItemChange);
222 FCSSBackColor: TColor;
223 function GetMemoText(font: TFont; text: string): string;
224 // function GetFontText(Font: TFont; Text: string): string;
226 procedure SaveSetting;
227 procedure SettingApply;
228 function CheckFolder: Boolean;
229 procedure SetAbonpropertys;
230 procedure CSSSetContent(Content: string);
231 procedure CSSPreview;
237 OptionDialog: TOptionDialog;
242 Giko, Editor, Setting, ActnList;
245 FONT_TEXT: string = '%s %d pt';
246 MEMO_CABINET: string = '
\83L
\83\83\83r
\83l
\83b
\83g';
247 MEMO_THREAD: string = '
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g';
248 MEMO_BROWSERPOPUP: string = '
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v';
249 MEMO_BROWSERTAB: string = '
\83u
\83\89\83E
\83U
\83^
\83u';
250 MEMO_EDITOR: string = '
\83G
\83f
\83B
\83^
\83e
\83L
\83X
\83g';
251 DEFAULT_FONT_NAME: string = '
\82l
\82r
\82o
\83S
\83V
\83b
\83N';
252 DEFAULT_FONT_SIZE: Integer = 9;
253 DEFAULT_TABFONT_NAME: string = '
\82l
\82r
\82o
\83S
\83V
\83b
\83N';
254 DEFAULT_TABFONT_SIZE: Integer = 9;
255 URL_TORA3: WideString = 'http://2ch.tora3.net/';
259 procedure TOptionDialog.FormCreate(Sender: TObject);
262 CSSBrowser.Navigate('about:blank');
265 OptionTab.ActivePage := ConnectSheet;
268 CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET);
269 ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD);
270 HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP);
271 BrowserTabMemo.Text := GetMemoText(BrowserTabMemo.Font, MEMO_BROWSERTAB);
272 EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR);
274 Tora3URLLabel.Cursor := 5;
275 lblSFont.Caption := '
\81\9a\8fd
\97v
\81\9a'#13#10#13#10
276 + '
\83X
\83\8c\83b
\83h
\95\
\8e¦
\83G
\83\8a\83A
\82Ì
\83t
\83H
\83\93\83g
\95Ï
\8dX
\82Í
\81A'#13#10
277 + '
\81uCSS
\82Æ
\83X
\83L
\83\93\81v
\83^
\83u
\82Å
\90Ý
\92è
\8fo
\97\88\82Ü
\82·';
278 CSSCheckBoxClick(Sender);
279 PostTimeCheckBoxClick(Sender);
281 if OptionTab.PageCount > GikoSys.Setting.OptionDialogTabIndex then begin
282 OptionTab.ActivePageIndex := GikoSys.Setting.OptionDialogTabIndex;
283 OptionTabChange( nil );
288 procedure TOptionDialog.FormDestroy(Sender: TObject);
290 sndPlaySound(nil, SND_ASYNC);
293 procedure TOptionDialog.OkBottonClick(Sender: TObject);
296 RecvBufferSizeExit(Sender);
297 ReadPortEditExit(Sender);
298 WritePortEditExit(Sender);
299 AddressHistoryCountEditExit(Sender);
300 PreviewWaitEditExit(Sender);
301 PostTimeEditExit(Sender);
303 if not CheckFolder then begin
312 procedure TOptionDialog.ApplyButtonClick(Sender: TObject);
314 RecvBufferSizeExit(Sender);
315 ReadPortEditExit(Sender);
316 WritePortEditExit(Sender);
317 AddressHistoryCountEditExit(Sender);
318 PreviewWaitEditExit(Sender);
319 PostTimeEditExit(Sender);
321 if not CheckFolder then begin
331 //function TOptionDialog.GetFontText(Font: TFont; Text: string): string;
333 // result := Format(Text, [Font.Name, Font.Size]);
336 function TOptionDialog.GetMemoText(font: TFont; text: string): string;
342 s := Format(FONT_TEXT, [Font.Name, Font.Size]) + #13#10;
346 //
\83L
\83\83\83r
\83l
\83b
\83g
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
347 procedure TOptionDialog.CabinetFontBottonClick(Sender: TObject);
349 FontDialog.Options := [fdAnsiOnly, fdEffects];
350 FontDialog.Font.Assign(CabinetMemo.Font);
351 if FontDialog.Execute then begin
352 FontDialog.Font.Style := FontDialog.Font.Style - [fsUnderline] - [fsStrikeout];
353 CabinetMemo.Font.Assign(FontDialog.Font);
354 CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET);
355 CabinetMemo.Font.Charset := SHIFTJIS_CHARSET;
359 //
\83L
\83\83\83r
\83l
\83b
\83g
\94w
\8ci
\90F
\83{
\83^
\83\93
360 procedure TOptionDialog.CabinetColorBottonClick(Sender: TObject);
362 ColorDialog.Color := CabinetMemo.Color;
363 if ColorDialog.Execute then begin
364 CabinetMemo.Color := ColorDialog.Color;
368 //
\83L
\83\83\83r
\83l
\83b
\83g
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
369 procedure TOptionDialog.CabinetDefaultButtonClick(Sender: TObject);
371 CabinetMemo.Font.Name := DEFAULT_FONT_NAME;
372 CabinetMemo.Font.Size := DEFAULT_FONT_SIZE;
373 CabinetMemo.Font.Color := clWindowText;
374 CabinetMemo.Font.Style := [];
375 CabinetMemo.Color := clWindow;
376 CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET);
379 //
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
380 procedure TOptionDialog.ListFontBottonClick(Sender: TObject);
382 FontDialog.Options := [fdAnsiOnly, fdEffects];
383 FontDialog.Font.Assign(ListMemo.Font);
384 if FontDialog.Execute then begin
385 ListMemo.Font.Assign(FontDialog.Font);
386 ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD);
387 ListMemo.Font.Charset := SHIFTJIS_CHARSET;
391 //
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g
\94w
\8ci
\90F
\83{
\83^
\83\93
392 procedure TOptionDialog.ListColorBottonClick(Sender: TObject);
394 ColorDialog.Color := ListMemo.Color;
395 if ColorDialog.Execute then begin
396 ListMemo.Color := ColorDialog.Color;
400 //
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
401 procedure TOptionDialog.ListDefaultBottonClick(Sender: TObject);
403 ListMemo.Font.Name := DEFAULT_FONT_NAME;
404 ListMemo.Font.Size := DEFAULT_FONT_SIZE;
405 ListMemo.Font.Color := clWindowText;
406 ListMemo.Font.Style := [];
407 ListMemo.Color := clWindow;
408 ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD);
411 //
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
412 procedure TOptionDialog.HintFontButtonClick(Sender: TObject);
414 FontDialog.Options := [fdAnsiOnly, fdEffects];
415 FontDialog.Font.Assign(HintMemo.Font);
416 if FontDialog.Execute then begin
417 HintMemo.Font.Assign(FontDialog.Font);
418 HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP);
419 HintMemo.Font.Charset := SHIFTJIS_CHARSET;
423 //
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v
\94w
\8ci
\90F
\83{
\83^
\83\93
424 procedure TOptionDialog.HintBackButtonClick(Sender: TObject);
426 ColorDialog.Color := HintMemo.Color;
427 if ColorDialog.Execute then begin
428 HintMemo.Color := ColorDialog.Color;
432 //
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
433 procedure TOptionDialog.HintDefaultButtonClick(Sender: TObject);
435 HintMemo.Font.Name := DEFAULT_FONT_NAME;
436 HintMemo.Font.Size := DEFAULT_FONT_SIZE;
437 HintMemo.Font.Color := clWindowText;
438 HintMemo.Font.Style := [];
439 HintMemo.Color := clInfoBk;
440 HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP);
443 //
\83u
\83\89\83E
\83U
\83^
\83u
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
444 procedure TOptionDialog.BruwserTabFontButtonClick(Sender: TObject);
446 FontDialog.Options := [fdAnsiOnly];
447 FontDialog.Font.Assign(BrowserTabMemo.Font);
448 if FontDialog.Execute then begin
449 BrowserTabMemo.Font.Assign(FontDialog.Font);
450 BrowserTabMemo.Text := GetMemoText(FontDialog.Font, MEMO_BROWSERTAB);
451 BrowserTabMemo.Font.Charset := SHIFTJIS_CHARSET;
455 //
\83u
\83\89\83E
\83U
\83^
\83u
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
456 procedure TOptionDialog.BrowserTabDefaultButtonClick(Sender: TObject);
458 BrowserTabMemo.Font.Name := DEFAULT_TABFONT_NAME;
459 BrowserTabMemo.Font.Size := DEFAULT_TABFONT_SIZE;
460 BrowserTabMemo.Font.Color := clWindowText;
461 BrowserTabMemo.Font.Style := [];
462 BrowserTabMemo.Color := clBtnFace;
463 BrowserTabMemo.Text := GetMemoText(BrowserTabMemo.Font, MEMO_BROWSERTAB);
466 //
\83G
\83f
\83B
\83^
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
467 procedure TOptionDialog.EditorFontBottonClick(Sender: TObject);
469 FontDialog.Options := [fdAnsiOnly, fdEffects];
470 FontDialog.Font.Assign(EditorMemo.Font);
471 if FontDialog.Execute then begin
472 EditorMemo.Font.Assign(FontDialog.Font);
473 EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR);
474 EditorMemo.Font.Charset := SHIFTJIS_CHARSET;
478 //
\83G
\83f
\83B
\83^
\94w
\8ci
\90F
\83{
\83^
\83\93
479 procedure TOptionDialog.EditorColorBottonClick(Sender: TObject);
481 ColorDialog.Color := EditorMemo.Font.Color;
482 if ColorDialog.Execute then begin
483 EditorMemo.Color := ColorDialog.Color;
487 //
\83G
\83f
\83B
\83^
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
488 procedure TOptionDialog.EditorDefaultBottonClick(Sender: TObject);
490 EditorMemo.Font.Name := DEFAULT_FONT_NAME;
491 EditorMemo.Font.Size := DEFAULT_FONT_SIZE;
492 EditorMemo.Font.Color := clWindowText;
493 EditorMemo.Font.Style := [];
494 EditorMemo.Color := clWindow;
495 EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR);
498 procedure TOptionDialog.SetValue;
504 FileList: TStringList;
506 //
\8eó
\90M
\83o
\83b
\83t
\83@
\83T
\83C
\83Y
507 RecvBufferSize.Text := IntToStr(Gikosys.Setting.RecvBufferSize);
509 ProtocolCheckBox.Checked := GikoSys.Setting.Protocol;
510 //
\83v
\83\8d\83L
\83V
\90Ú
\91±HTTP1.1
\8eg
\97p
511 ProxyProtocolCheckBox.Checked := Gikosys.Setting.ProxyProtocol;
513 //
\93Ç
\82Ý
\8d\9e\82Ý
\97p
\83v
\83\8d\83L
\83V
514 ReadProxyCheck.Checked := GikoSys.Setting.ReadProxy;
515 ReadProxyCheckClick(nil);
516 ReadProxyAddressEdit.Text := GikoSys.Setting.ReadProxyAddress;
517 ReadPortEdit.Text := IntToStr(GikoSys.Setting.ReadProxyPort);
518 ReadProxyUserIDEdit.Text := GikoSys.Setting.ReadProxyUserID;
519 ReadProxyPasswordEdit.Text := GikoSys.Setting.ReadProxyPassword;
520 //
\8f\91\82«
\8d\9e\82Ý
\97p
\83v
\83\8d\83L
\83V
521 WriteProxyCheck.Checked := GikoSys.Setting.WriteProxy;
522 WriteProxyCheckClick(nil);
523 WriteProxyAddressEdit.Text := GikoSys.Setting.WriteProxyAddress;
524 WritePortEdit.Text := IntToStr(GikoSys.Setting.WriteProxyPort);
525 WriteProxyUserIDEdit.Text := GikoSys.Setting.WriteProxyUserID;
526 WriteProxyPasswordEdit.Text := GikoSys.Setting.WriteProxyPassword;
527 //
\83L
\83\83\83r
\83l
\83b
\83g
\83t
\83H
\83\93\83g
528 CabinetMemo.Font.Name := GikoSys.Setting.CabinetFontName;
529 CabinetMemo.Font.Size := GikoSys.Setting.CabinetFontSize;
530 CabinetMemo.Font.Color := GikoSys.Setting.CabinetFontColor;
531 CabinetMemo.Color := GikoSys.Setting.CabinetBackColor;
532 //
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g
\83t
\83H
\83\93\83g
533 ListMemo.Font.Name := GikoSys.Setting.ListFontName;
534 ListMemo.Font.Size := GikoSys.Setting.ListFontSize;
535 ListMemo.Font.Color := GikoSys.Setting.ListFontColor;
536 ListMemo.Color := GikoSys.Setting.ListBackColor;
537 //
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v
\83t
\83H
\83\93\83g
538 HintMemo.Font.Name := GikoSys.Setting.HintFontName;
539 HintMemo.Font.Size := GikoSys.Setting.HintFontSize;
540 HintMemo.Font.Color := GikoSys.Setting.HintFontColor;
541 HintMemo.Color := GikoSys.Setting.HintBackColor;
542 //
\83u
\83\89\83E
\83U
\83^
\83u
\83t
\83H
\83\93\83g
543 BrowserTabMemo.Font.Name := GikoSys.Setting.BrowserTabFontName;
544 BrowserTabMemo.Font.Size := GikoSys.Setting.BrowserTabFontSize;
545 BrowserTabMemo.Font.Style := [];
546 if GikoSys.Setting.BrowserTabFontBold then
547 BrowserTabMemo.Font.Style := BrowserTabMemo.Font.Style + [fsBold];
548 if GikoSys.Setting.BrowserTabFontItalic then
549 BrowserTabMemo.Font.Style := BrowserTabMemo.Font.Style + [fsItalic];
550 //
\83G
\83f
\83B
\83^
\83\81\83\82\83t
\83H
\83\93\83g
551 EditorMemo.Font.Name := GikoSys.Setting.EditorFontName;
552 EditorMemo.Font.Size := GikoSys.Setting.EditorFontSize;
553 EditorMemo.Font.Color := GikoSys.Setting.EditorFontColor;
554 EditorMemo.Color := GikoSys.Setting.EditorBackColor;
556 CSSCheckBox.Checked := GikoSys.Setting.UseCSS;
557 FCSSFont := TFont.Create;
558 if (GikoSys.Setting.BrowserFontName <> '') or
559 (GikoSys.Setting.BrowserFontSize <> 0) or
560 (GikoSys.Setting.BrowserFontBold <> 0) or
561 (GikoSys.Setting.BrowserFontItalic <> 0) or
562 (GikoSys.Setting.BrowserFontColor <> -1 ) then begin
563 CSSFontCheckBox.Checked := True;
565 FCSSFont.Name := GikoSys.Setting.BrowserFontName;
566 FCSSFont.Size := GikoSys.Setting.BrowserFontSize;
567 FCSSFont.Style := [];
568 if GikoSys.Setting.BrowserFontBold = 1 then
569 FCSSFont.Style := FCSSFont.Style + [fsBold];
570 if GikoSys.Setting.BrowserFontItalic = 1 then
571 FCSSFont.Style := FCSSFont.Style + [fsItalic];
572 i := GikoSys.Setting.BrowserFontColor;
573 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
576 if GikoSys.Setting.BrowserBackColor <> -1 then begin
577 CSSBackColorCheckBox.Checked := True;
579 i := GikoSys.Setting.BrowserBackColor;
580 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
584 //
\83X
\83^
\83C
\83\8b\83V
\81[
\83g
\83t
\83@
\83C
\83\8b\96¼
\88ê
\97\97
585 FileList := TStringList.Create;
587 GikoSys.GetFileList(GikoSys.GetStyleSheetDir, '*.css', FileList, True, True);
589 Idx := Length(GikoSys.GetStyleSheetDir);
590 for i := 0 to FileList.Count - 1 do
591 FileList[i] := Copy(FileList[i], Idx + 1, Length(FileList[i]));
593 for i := 0 to FileList.Count - 1 do begin
594 //s := ExtractFileName(FileList[i]);
595 if LowerCase(FileList[i]) = 'default.css' then
596 Item := CSSListView.Items.Insert(0)
598 Item := CSSListView.Items.Add;
599 Item.Caption := ChangeFileExt(FileList[i], '');
600 if LowerCase(FileList[i]) = LowerCase(GikoSys.Setting.CSSFileName) then
601 Item.Selected := True;
606 //
\83X
\83L
\83\93\83t
\83@
\83C
\83\8b\96¼
\88ê
\97\97
607 FileList := TStringList.Create;
609 GikoSys.GetDirectoryList(GikoSys.GetSkinDir, '*', FileList, False);
611 Idx := Length(GikoSys.GetSkinDir);
613 for i := 0 to FileList.Count - 1 do begin
614 //s := ExtractFileName(FileList[i]);
615 Item := CSSListView.Items.Add;
616 Item.Data := PChar( FileList[i] );
617 Item.Caption := Copy( FileList[i], Idx + 1, Length(FileList[i]) );
618 if LowerCase(FileList[i]) = LowerCase(GikoSys.Setting.CSSFileName) then
619 Item.Selected := True;
622 // 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`
626 if (CSSListView.ItemIndex = -1) and (CSSListView.Items.Count > 0) then
627 CSSListView.Items[0].Selected := True;
630 ShowMailCheckBox.Checked := GikoSys.Setting.ShowMail;
631 //
\83^
\83u
\92Ç
\89Á
\88Ê
\92u
632 TabAddRadioGroup.ItemIndex := Ord(GikoSys.Setting.BrowserTabAppend);
634 BoardURL2chEdit.Text := GikoSys.Setting.BoardURL2ch;
636 UserIDEdit.Text := GikoSys.Setting.UserID;
637 PasswordEdit.Text := GikoSys.Setting.Password;
638 AutoLoginCheckBox.Checked := GikoSys.Setting.AutoLogin;
639 //
\83\8d\83O
\83t
\83H
\83\8b\83_
640 if GikoSys.Setting.NewLogFolder = '' then
641 LogFolderEdit.Text := GikoSys.Setting.LogFolder
643 LogFolderEdit.Text := GikoSys.Setting.NewLogFolder;
645 for i := 0 to GikoSys.Setting.GetSoundCount - 1 do begin
646 Item := SoundListView.Items.Add;
647 Item.Caption := GikoSys.Setting.SoundViewName[i];
648 if FileExists(GikoSys.Setting.SoundFileName[i]) then
649 Item.SubItems.Add(GikoSys.Setting.SoundFileName[i])
651 Item.SubItems.Add('');
653 //URL
\83N
\83\8a\83b
\83N
\8e\9e\93®
\8dì
654 URLAppCheckBox.Checked := GikoSys.Setting.URLApp;
655 URLAppCheckBoxClick(nil);
656 AppFolderEdit.Text := GikoSys.Setting.URLAppFile;
658 //mailto
\83N
\83\8a\83b
\83N
\8e\9e\93®
\8dì
659 OpenMailerCheckBox.Checked := GikoSys.Setting.OpenMailer;
661 //
\83\8d\83O
\8dí
\8f\9c\8e\9e\83\81\83b
\83Z
\81[
\83W
662 LogDeleteMessageCheckBox.Checked := GikoSys.Setting.DeleteMsg;
664 //
\83|
\83b
\83v
\83A
\83b
\83v
\88Ê
\92u
665 case GikoSys.Setting.PopupPosition of
666 gppRightTop: PopupPositionRadioGroup.ItemIndex := 0;
667 gppRight: PopupPositionRadioGroup.ItemIndex := 1;
668 gppRightBottom: PopupPositionRadioGroup.ItemIndex := 2;
669 gppTop: PopupPositionRadioGroup.ItemIndex := 3;
670 gppCenter: PopupPositionRadioGroup.ItemIndex := 4;
671 gppBottom: PopupPositionRadioGroup.ItemIndex := 5;
672 gppLeftTop: PopupPositionRadioGroup.ItemIndex := 6;
673 gppLeft: PopupPositionRadioGroup.ItemIndex := 7;
674 gppLeftBottom: PopupPositionRadioGroup.ItemIndex := 8;
677 //
\94ñ
\83A
\83N
\83e
\83B
\83u
\8e\9e\83|
\83b
\83v
\83A
\83b
\83v
\95\
\8e¦
678 UnActivePopupCheckBox.Checked := GikoSys.Setting.UnActivePopup;
679 //
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\83{
\81[
\83\8b\83h
\95\
\8e¦
680 ResPopupBoldCheckBox.Checked := GikoSys.Setting.ResPopupHeaderBold;
682 //
\83A
\83h
\83\8c\83X
\83o
\81[
683 URLDisplayCheckBox.Checked := GikoSys.Setting.URLDisplay;
684 TabStopAddressBarCheckBox.Checked := GikoSys.Setting.AddressBarTabStop;
685 LinkAddCheckBox.Checked := GikoSys.Setting.LinkAddAddressBar;
686 AddressHistoryCountEdit.Text := IntToStr(GikoSys.Setting.AddressHistoryCount);
688 //HTML
\83v
\83\8c\83r
\83\85\81[
689 PreviewVisibleCheckBox.Checked := GikoSys.Setting.PreviewVisible;
690 PreviewWaitEdit.Text := IntToStr(GikoSys.Setting.PreviewWait);
691 PreviewSizeComboBox.ItemIndex := 2;
692 case GikoSys.Setting.PreviewSize of
693 gpsXLarge: PreviewSizeComboBox.ItemIndex := 4;
694 gpsLarge: PreviewSizeComboBox.ItemIndex := 3;
695 gpsMedium: PreviewSizeComboBox.ItemIndex := 2;
696 gpsSmall: PreviewSizeComboBox.ItemIndex := 1;
697 gpsXSmall: PreviewSizeComboBox.ItemIndex := 0;
700 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\8dX
\90V
\83A
\83C
\83R
\83\93
701 ThreadListIconCheckBox.Checked := GikoSys.Setting.ListIconVisible;
703 //
\8f\91\82«
\8d\9e\82Ý
\8e\9e\83}
\83V
\83\93\8e\9e\8aÔ
\8eg
\97p
\90Ý
\92è
704 PostTimeCheckBox.Checked := GikoSys.Setting.UseMachineTime;
705 PostTimeEdit.Text := IntToStr(GikoSys.Setting.TimeAdjustSec);
706 if GikoSys.Setting.TimeAdjust then
707 PutPostTimeRadioButton.Checked := True
709 BackPostTimeRadioButton.Checked := True;
711 RloCheckBox.Checked := GikoSys.Setting.AbonDeleterlo;
712 ReplaceulCheckBox.Checked := GikoSys.Setting.AbonReplaceul;
713 PopUpAbonCheckBox.Checked := GikoSys.Setting.PopUpAbon;
717 procedure TOptionDialog.SaveSetting;
722 //
\8eó
\90M
\83o
\83b
\83t
\83@
\83T
\83C
\83Y
723 Gikosys.Setting.RecvBufferSize := StrToInt(RecvBufferSize.Text);
725 GikoSys.Setting.Protocol := ProtocolCheckBox.Checked;
726 //
\83v
\83\8d\83L
\83V
\90Ú
\91±HTTP1.1
\8eg
\97p
727 Gikosys.Setting.ProxyProtocol := ProxyProtocolCheckBox.Checked;
729 GikoSys.Setting.OptionDialogTabIndex := OptionTab.TabIndex;
731 GikoSys.Setting.ReadProxy := ReadProxyCheck.Checked;
732 GikoSys.Setting.ReadProxyAddress := ReadProxyAddressEdit.Text;
733 GikoSys.Setting.ReadProxyPort := StrToInt(ReadPortEdit.Text);
734 GikoSys.Setting.ReadProxyUserID := ReadProxyUserIDEdit.Text;
735 GikoSys.Setting.ReadProxyPassword := ReadProxyPasswordEdit.Text;
737 GikoSys.Setting.WriteProxy := WriteProxyCheck.Checked;
738 GikoSys.Setting.WriteProxyAddress := WriteProxyAddressEdit.Text;
739 GikoSys.Setting.WriteProxyPort := StrToInt(WritePortEdit.Text);
740 GikoSys.Setting.WriteProxyUserID := WriteProxyUserIDEdit.Text;
741 GikoSys.Setting.WriteProxyPassword := WriteProxyPasswordEdit.Text;
743 GikoSys.Setting.CabinetFontName := CabinetMemo.Font.Name;
744 GikoSys.Setting.CabinetFontSize := CabinetMemo.Font.Size;
745 GikoSys.Setting.CabinetFontColor := CabinetMemo.Font.Color;
746 GikoSys.Setting.CabinetBackColor := CabinetMemo.Color;
748 GikoSys.Setting.ListFontName := ListMemo.Font.Name;
749 GikoSys.Setting.ListFontSize := ListMemo.Font.Size;
750 GikoSys.Setting.ListFontColor := ListMemo.Font.Color;
751 GikoSys.Setting.ListBackColor := ListMemo.Color;
753 GikoSys.Setting.HintFontName := HintMemo.Font.Name;
754 GikoSys.Setting.HintFontSize := HintMemo.Font.Size;
755 GikoSys.Setting.HintFontColor := HintMemo.Font.Color;
756 GikoSys.Setting.HintBackColor := HintMemo.Color;
758 GikoSys.Setting.BrowserTabFontName := BrowserTabMemo.Font.Name;
759 GikoSys.Setting.BrowserTabFontSize := BrowserTabMemo.Font.Size;
761 GikoSys.Setting.EditorFontName := EditorMemo.Font.Name;
762 GikoSys.Setting.EditorFontSize := EditorMemo.Font.Size;
763 GikoSys.Setting.EditorFontColor := EditorMemo.Font.Color;
764 GikoSys.Setting.EditorBackColor := EditorMemo.Color;
766 GikoSys.Setting.UseCSS := CSSCheckBox.Checked;
767 //CSS
\83t
\83@
\83C
\83\8b\96¼
768 GikoSys.Setting.CSSFileName := 'default.css';
769 if CSSListView.Items.Count > 0 then begin
771 if CSSListView.Items[CSSListView.ItemIndex].Data <> nil then
772 GikoSys.Setting.CSSFileName := string( CSSListView.Items[CSSListView.ItemIndex].data )
774 GikoSys.Setting.CSSFileName := CSSListView.Items[CSSListView.ItemIndex].Caption + '.css';
778 // CSS
\82Ì
\83t
\83H
\83\93\83g
\8ew
\92è
779 if CSSFontCheckBox.Checked then begin
780 GikoSys.Setting.BrowserFontName := FCSSFont.Name;
781 GikoSys.Setting.BrowserFontSize := FCSSFont.Size;
782 if fsBold in FCSSFont.Style then
783 GikoSys.Setting.BrowserFontBold := 1
785 GikoSys.Setting.BrowserFontBold := -1;
786 if fsItalic in FCSSFont.Style then
787 GikoSys.Setting.BrowserFontItalic := 1
789 GikoSys.Setting.BrowserFontItalic := -1;
790 i := ColorToRGB( FCSSFont.Color );
791 GikoSys.Setting.BrowserFontColor := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
793 GikoSys.Setting.BrowserFontName := '';
794 GikoSys.Setting.BrowserFontSize := 0;
795 GikoSys.Setting.BrowserFontBold := 0;
796 GikoSys.Setting.BrowserFontItalic := 0;
797 GikoSys.Setting.BrowserFontColor := -1;
799 if CSSBackColorCheckBox.Checked then begin
800 i := ColorToRGB( FCSSBackColor );
801 GikoSys.Setting.BrowserBackColor := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
803 GikoSys.Setting.BrowserBackColor := -1;
807 GikoSys.Setting.ShowMail := ShowMailCheckBox.Checked;
809 GikoSys.Setting.BrowserTabAppend := TGikoTabAppend(TabAddRadioGroup.ItemIndex);
811 GikoSys.Setting.BoardURL2ch := BoardURL2chEdit.Text;
813 GikoSys.Setting.UserID := UserIDEdit.Text;
814 GikoSys.Setting.Password := PasswordEdit.Text;
815 GikoSys.Setting.AutoLogin := AutoLoginCheckBox.Checked;
817 GikoSys.Setting.URLApp := URLAppCheckBox.Checked;
818 GikoSys.Setting.URLAppFile := AppFolderEdit.Text;
820 GikoSys.Setting.OpenMailer := OpenMailerCheckBox.Checked;
821 GikoSys.Setting.DeleteMsg := LogDeleteMessageCheckBox.Checked;
823 //
\83|
\83b
\83v
\83A
\83b
\83v
\88Ê
\92u
824 case PopupPositionRadioGroup.ItemIndex of
825 0: GikoSys.Setting.PopupPosition := gppRightTop;
826 1: GikoSys.Setting.PopupPosition := gppRight;
827 2: GikoSys.Setting.PopupPosition := gppRightBottom;
828 3: GikoSys.Setting.PopupPosition := gppTop;
829 4: GikoSys.Setting.PopupPosition := gppCenter;
830 5: GikoSys.Setting.PopupPosition := gppBottom;
831 6: GikoSys.Setting.PopupPosition := gppLeftTop;
832 7: GikoSys.Setting.PopupPosition := gppLeft;
833 8: GikoSys.Setting.PopupPosition := gppLeftBottom;
836 //
\94ñ
\83A
\83N
\83e
\83B
\83u
\8e\9e\83|
\83b
\83v
\83A
\83b
\83v
\95\
\8e¦
837 GikoSys.Setting.UnActivePopup := UnActivePopupCheckBox.Checked;
838 //
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\83{
\81[
\83\8b\83h
\95\
\8e¦
839 GikoSys.Setting.ResPopupHeaderBold := ResPopupBoldCheckBox.Checked;
841 //
\83A
\83h
\83\8c\83X
\83o
\81[
842 GikoSys.Setting.URLDisplay := URLDisplayCheckBox.Checked;
843 GikoSys.Setting.AddressBarTabStop := TabStopAddressBarCheckBox.Checked;
844 GikoSys.Setting.LinkAddAddressBar := LinkAddCheckBox.Checked;
845 if GikoSys.IsNumeric(AddressHistoryCountEdit.Text) then
846 GikoSys.Setting.AddressHistoryCount := StrToInt(AddressHistoryCountEdit.Text)
848 GikoSys.Setting.AddressHistoryCount := 100;
850 //HTML
\83v
\83\8c\83r
\83\85\81[
851 GikoSys.Setting.PreviewVisible := PreviewVisibleCheckBox.Checked;
852 if GikoSys.IsNumeric(PreviewWaitEdit.Text) then
853 GikoSys.Setting.PreviewWait := StrToInt(PreviewWaitEdit.Text)
855 GikoSys.Setting.PreviewWait := 500;
856 case PreviewSizeComboBox.ItemIndex of
857 0: GikoSys.Setting.PreviewSize := gpsXSmall;
858 1: GikoSys.Setting.PreviewSize := gpsSmall;
859 2: GikoSys.Setting.PreviewSize := gpsMedium;
860 3: GikoSys.Setting.PreviewSize := gpsLarge;
861 4: GikoSys.Setting.PreviewSize := gpsXLarge;
864 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\8dX
\90V
\83A
\83C
\83R
\83\93
865 GikoSys.Setting.ListIconVisible := ThreadListIconCheckBox.Checked;
867 //
\8f\91\82«
\8d\9e\82Ý
\8e\9e\83}
\83V
\83\93\8e\9e\8aÔ
\8eg
\97p
\90Ý
\92è
868 GikoSys.Setting.UseMachineTime := PostTimeCheckBox.Checked;
869 if GikoSys.IsNumeric(PostTimeEdit.Text) then
870 GikoSys.Setting.TimeAdjustSec := StrToInt(PostTimeEdit.Text)
872 GikoSys.Setting.TimeAdjustSec := 0;
873 GikoSys.Setting.TimeAdjust := PutPostTimeRadioButton.Checked;
876 GikoSys.Setting.WriteSystemSettingFile;
877 // GikoForm.SetBrowserTabState;
879 if LogFolderEdit.Text <> '' then begin
880 GikoSys.Setting.NewLogFolder := LogFolderEdit.Text;
881 GikoSys.Setting.WriteFolderSettingFile;
884 for i := 0 to SoundListView.Items.Count - 1 do begin
885 if FileExists(SoundListView.Items[i].SubItems[0]) then
886 GikoSys.Setting.SoundFileName[i] := SoundListView.Items[i].SubItems[0]
888 GikoSys.Setting.SoundFileName[i] := '';
892 GikoSys.Setting.AbonDeleterlo := RloCheckBox.Checked;
893 GikoSys.Setting.AbonReplaceul := ReplaceulCheckBox.Checked;
894 GikoSys.Setting.PopUpAbon := PopUpAbonCheckBox.Checked;
897 procedure TOptionDialog.SettingApply;
900 ThreadItem: TThreadItem;
902 GikoForm.TreeView.Items.BeginUpdate;
903 GikoForm.FavoriteTreeView.Items.BeginUpdate;
904 GikoForm.ListView.Items.BeginUpdate;
906 GikoForm.TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
907 GikoForm.TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
908 GikoForm.TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
909 GikoForm.TreeView.Color := GikoSys.Setting.CabinetBackColor;
911 GikoForm.FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
912 GikoForm.FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
913 GikoForm.FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
914 GikoForm.FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
916 GikoForm.ListView.Font.Name := GikoSys.Setting.ListFontName;
917 GikoForm.ListView.Font.Size := GikoSys.Setting.ListFontSize;
918 GikoForm.ListView.Font.Color := GikoSys.Setting.ListFontColor;
919 GikoForm.ListView.Color := GikoSys.Setting.ListBackColor;
921 GikoForm.BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
922 GikoForm.BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
923 // GikoForm.BrowserTab.Height := (GikoSys.Setting.BrowserTabFontSize * 2) + 1;
924 // GikoForm.BrowserBottomPanel.Height := GikoForm.BrowserTab.Height;
926 for i := 0 to Screen.CustomFormCount - 1 do begin
927 if TObject(Screen.CustomForms[i]) is TEditorForm then begin
928 TEditorForm(Screen.CustomForms[i]).SetFont;
933 GikoForm.TreeView.Items.EndUpdate;
934 GikoForm.FavoriteTreeView.Items.EndUpdate;
935 GikoForm.ListView.Items.EndUpdate;
938 //
\83A
\83h
\83\8c\83X
\83o
\81[
939 for i := GikoForm.AddressComboBox.Items.Count - 1 downto 0 do begin
940 if GikoSys.Setting.AddressHistoryCount >= GikoForm.AddressComboBox.Items.Count then
942 GikoForm.AddressComboBox.Items.Delete(i);
944 GikoForm.AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
946 //
\83X
\83\8c\83b
\83h
\82Ì
\83\8a\83t
\83\8c\83b
\83V
\83\85
947 ThreadItem := GikoForm.GetActiveContent;
948 if ThreadItem <> nil then
949 GikoForm.SetContent( ThreadItem );
952 procedure TOptionDialog.ReadProxyCheckClick(Sender: TObject);
954 ReadProxyAddressEdit.Enabled := ReadProxyCheck.Checked;
955 ReadPortEdit.Enabled := ReadProxyCheck.Checked;
956 ReadProxyUserIDEdit.Enabled := ReadProxyCheck.Checked;
957 ReadProxyPasswordEdit.Enabled := ReadProxyCheck.Checked;
959 ReadAddressLabel.Enabled := ReadProxyCheck.Checked;
960 ReadPortLabel.Enabled := ReadProxyCheck.Checked;
961 ReadUserIDLabel.Enabled := ReadProxyCheck.Checked;
962 ReadPasswordLabel.Enabled := ReadProxyCheck.Checked;
965 procedure TOptionDialog.ReadPortEditExit(Sender: TObject);
967 if not GikoSys.IsNumeric(ReadPortEdit.Text) then
968 ReadPortEdit.Text := '0';
971 procedure TOptionDialog.LogFolderButtonClick(Sender: TObject);
977 if SelectDirectory('
\83\8d\83O
\83t
\83H
\83\8b\83_
\91I
\91ð', Root, Dir) then begin
978 LogFolderEdit.Text := Dir;
982 function TOptionDialog.CheckFolder: Boolean;
984 if Trim(LogFolderEdit.Text) = '' then
985 LogFolderEdit.Text := ExtractFilePath(Application.ExeName) + 'Log';
987 if DirectoryExists(LogFolderEdit.Text) then begin
990 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
991 //
\83t
\83H
\83\8b\83_
\82ð
\8dì
\90¬
993 GikoSys.ForceDirectoriesEx(LogFolderEdit.Text);
996 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);
997 OptionTab.ActivePage := FolderSheet;
998 LogFolderEdit.SetFocus;
1006 procedure TOptionDialog.FormClose(Sender: TObject; var Action: TCloseAction);
1013 procedure TOptionDialog.SoundReferButtonClick(Sender: TObject);
1015 OpenDialog.Filter := '
\83T
\83E
\83\93\83h (*.wav)|*.wav|
\82·
\82×
\82Ä
\82Ì
\83t
\83@
\83C
\83\8b (*.*)|*.*';
1016 sndPlaySound(nil, SND_ASYNC);
1017 if OpenDialog.Execute then begin
1018 SoundFileEdit.Text := OpenDialog.FileName;
1022 procedure TOptionDialog.SoundPlayButtonClick(Sender: TObject);
1024 if not FileExists(SoundFileEdit.Text) then begin
1025 MsgBox(Handle, '
\91¶
\8dÝ
\82µ
\82È
\82¢
\83t
\83@
\83C
\83\8b\82Å
\82·', '
\83G
\83\89\81[', MB_ICONSTOP or MB_OK);
1026 SoundFileEdit.Text := '';
1029 if not sndPlaySound(PChar(SoundFileEdit.Text), SND_ASYNC or SND_NOSTOP) then begin
1030 sndPlaySound(nil, SND_ASYNC);
1034 procedure TOptionDialog.SoundListViewChanging(Sender: TObject;
1035 Item: TListItem; Change: TItemChange; var AllowChange: Boolean);
1037 if Item.SubItems.Count > 0 then
1038 SoundFileEdit.Text := Item.SubItems[0];
1041 procedure TOptionDialog.SoundFileEditChange(Sender: TObject);
1045 sndPlaySound(nil, SND_ASYNC);
1046 Item := SoundListView.Selected;
1047 if Item = nil then Exit;
1049 if FileExists(SoundFileEdit.Text) then
1050 Item.SubItems[0] := SoundFileEdit.Text;
1051 if Trim(SoundFileEdit.Text) = '' then
1052 Item.SubItems[0] := '';
1055 procedure TOptionDialog.OptionTabChange(Sender: TObject);
1057 sndPlaySound(nil, SND_ASYNC);
1059 if OptionTab.ActivePage = CSSTabSheet then
1063 procedure TOptionDialog.AppFolderButtonClick(Sender: TObject);
1065 OpenDialog.Filter := '
\8eÀ
\8ds
\83t
\83@
\83C
\83\8b (*.exe)|*.exe|
\82·
\82×
\82Ä
\82Ì
\83t
\83@
\83C
\83\8b (*.*)|*.*';
1066 if OpenDialog.Execute then
1067 AppFolderEdit.Text := OpenDialog.FileName;
1070 procedure TOptionDialog.WriteProxyCheckClick(Sender: TObject);
1072 WriteProxyAddressEdit.Enabled := WriteProxyCheck.Checked;
1073 WritePortEdit.Enabled := WriteProxyCheck.Checked;
1074 WriteProxyUserIDEdit.Enabled := WriteProxyCheck.Checked;
1075 WriteProxyPasswordEdit.Enabled := WriteProxyCheck.Checked;
1077 WriteAddressLabel.Enabled := WriteProxyCheck.Checked;
1078 WritePortLabel.Enabled := WriteProxyCheck.Checked;
1079 WriteUserIDLabel.Enabled := WriteProxyCheck.Checked;
1080 WritePasswordLabel.Enabled := WriteProxyCheck.Checked;
1083 procedure TOptionDialog.WritePortEditExit(Sender: TObject);
1085 if not GikoSys.IsNumeric(WritePortEdit.Text) then
1086 WritePortEdit.Text := '0';
1089 procedure TOptionDialog.Tora3URLLabelClick(Sender: TObject);
1091 GikoSys.OpenBrowser(URL_TORA3, gbtAuto);
1094 procedure TOptionDialog.HotKeyEnter(Sender: TObject);
1096 OkBotton.Default := False;
1097 CancelBotton.Cancel := False;
1100 procedure TOptionDialog.HotKeyExit(Sender: TObject);
1102 OkBotton.Default := True;
1103 CancelBotton.Cancel := True;
1106 procedure TOptionDialog.URLAppCheckBoxClick(Sender: TObject);
1108 AppFolderLabel.Enabled := URLAppCheckBox.Checked;
1109 AppFolderEdit.Enabled := URLAppCheckBox.Checked;
1110 AppFolderButton.Enabled := URLAppCheckBox.Checked;
1113 procedure TOptionDialog.AddressHistoryCountEditExit(Sender: TObject);
1115 if not GikoSys.IsNumeric(AddressHistoryCountEdit.Text) then
1116 AddressHistoryCountEdit.Text := '100';
1119 procedure TOptionDialog.PreviewWaitEditExit(Sender: TObject);
1121 if not GikoSys.IsNumeric(PreviewWaitEdit.Text) then
1122 PreviewWaitEdit.Text := '500';
1123 if StrToInt(PreviewWaitEdit.Text) < 500 then
1124 PreviewWaitEdit.Text := '500';
1125 if StrToInt(PreviewWaitEdit.Text) > 9999 then
1126 PreviewWaitEdit.Text := '9999';
1129 procedure TOptionDialog.RecvBufferSizeExit(Sender: TObject);
1131 if not GikoSys.IsNumeric(RecvBufferSize.Text) then
1132 RecvBufferSize.Text := '4096';
1133 if StrToInt(RecvBufferSize.Text) < 256 then
1134 RecvBufferSize.Text := '4096';
1137 procedure TOptionDialog.CSSCheckBoxClick(Sender: TObject);
1139 CSSListLabel.Enabled := CSSCheckBox.Checked;
1140 CSSListView.Enabled := CSSCheckBox.Checked;
1143 procedure TOptionDialog.PostTimeEditExit(Sender: TObject);
1145 if not GikoSys.IsNumeric(PostTimeEdit.Text) then
1146 PostTimeEdit.Text := '0';
1149 procedure TOptionDialog.PostTimeCheckBoxClick(Sender: TObject);
1151 PostTimeLabel.Enabled := PostTimeCheckBox.Checked;
1152 PostTimeEdit.Enabled := PostTimeCheckBox.Checked;
1153 PutPostTimeRadioButton.Enabled := PostTimeCheckBox.Checked;
1154 BackPostTimeRadioButton.Enabled := PostTimeCheckBox.Checked;
1156 procedure TOptionDialog.SetAbonpropertys;
1159 GikoSys.FAbon.Deleterlo := RloCheckBox.Checked;
1160 GikoSys.FAbon.Replaceul := ReplaceulCheckBox.Checked;
1161 GikoSys.FAbon.AbonPopupRes := PopUpAbonCheckBox.Checked;
1164 procedure TOptionDialog.CSSFontButtonClick(Sender: TObject);
1167 FontDialog.Options := [fdAnsiOnly, fdEffects];
1168 FontDialog.Font.Assign(FCSSFont);
1169 if FontDialog.Execute then begin
1170 FontDialog.Font.Style := FontDialog.Font.Style - [fsUnderline] - [fsStrikeout];
1171 FCSSFont := FontDialog.Font;
1178 procedure TOptionDialog.CSSBackColorButtonClick(Sender: TObject);
1181 ColorDialog.Color := FCSSBackColor;
1182 if ColorDialog.Execute then begin
1183 FCSSBackColor := ColorDialog.Color;
1190 procedure TOptionDialog.CSSFontCheckBoxClick(Sender: TObject);
1193 CSSFontButton.Enabled := CSSFontCheckBox.Checked;
1198 procedure TOptionDialog.CSSBackColorCheckBoxClick(Sender: TObject);
1201 CSSBackColorButton.Enabled := CSSBackColorCheckBox.Checked;
1206 procedure TOptionDialog.CSSSetContent(Content: string);
1210 if CSSBrowser.Document <> nil then begin
1211 doc := CSSBrowser.Document;
1214 doc.charset := 'Shift_JIS';
1220 procedure TOptionDialog.CSSPreview;
1223 ThreadItem: TThreadItem;
1226 Res: array [0..1] of TResRec;
1227 UserOptionalStyle: string;
1232 fileName := GikoSys.Setting.CSSFileName;
1234 GikoSys.Setting.CSSFileName := 'default.css';
1235 if CSSListView.Items.Count > 0 then begin
1237 if CSSListView.ItemIndex >= 0 then begin
1238 if CSSListView.Items[CSSListView.ItemIndex].Data <> nil then
1239 GikoSys.Setting.CSSFileName := string( CSSListView.Items[CSSListView.ItemIndex].data )
1241 GikoSys.Setting.CSSFileName := CSSListView.Items[CSSListView.ItemIndex].Caption + '.css';
1247 Board := TBoard.Create;
1248 ThreadItem := TThreadItem.Create;
1251 Board.URL := 'about://sample/';
1252 Board.Title := '
\83T
\83\93\83v
\83\8b\94Â';
1253 ThreadItem.ParentBoard := Board;
1254 ThreadItem.AllResCount := High( Res );
1255 ThreadItem.NewResCount := 1;
1256 ThreadItem.NewReceive := 2;
1258 sTitle := '
\83T
\83\93\83v
\83\8b\83v
\83\8c\83r
\83\85\81[';
1260 Res[0].FName := '
\96¼
\96³
\82µ
\82³
\82ñ';
1261 Res[0].FMailTo := 'sage';
1262 Res[0].FDateTime := 'ID:Sample';
1263 Res[0].FBody := 'CSS
\82Æ
\83X
\83L
\83\93\82Ì
\83T
\83\93\83v
\83\8b';
1264 Res[1].FName := '
\96¼
\96³
\82µ
\82³
\82ñ';
1265 Res[1].FMailTo := 'age';
1266 Res[1].FDateTime := 'ID:Sample';
1267 Res[1].FBody := '
\83I
\83}
\83G
\83\82\83i
\81[';
1269 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
1270 if CSSFontCheckBox.Checked then begin
1271 i := ColorToRGB( FCSSFont.Color );
1272 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
1274 UserOptionalStyle := UserOptionalStyle +
1275 'font-family:"' + FCSSFont.Name + '";' +
1276 'font-size:' + IntToStr( FCSSFont.Size ) + 'pt;' +
1277 'color:#' + IntToHex( i, 6 ) + ';';
1278 if fsBold in FCSSFont.Style then
1279 UserOptionalStyle := UserOptionalStyle + 'font-weight:bold;'
1281 UserOptionalStyle := UserOptionalStyle + 'font-weight:normal;';
1282 if fsItalic in FCSSFont.Style then
1283 UserOptionalStyle := UserOptionalStyle + 'font-style:italic;'
1285 UserOptionalStyle := UserOptionalStyle + 'font-style:normal;';
1287 if CSSBackColorCheckBox.Checked then begin
1288 i := ColorToRGB( FCSSBackColor );
1289 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
1291 UserOptionalStyle := UserOptionalStyle +
1292 'background-color:#' + IntToHex( i, 6 ) + ';';
1295 if FileExists( GikoSys.GetSkinHeaderFileName ) then begin
1297 GikoSys.LoadFromSkin( GikoSys.GetSkinHeaderFileName, ThreadItem, sTitle, 0 ) +
1298 '<a name="top"></a>' +
1299 GikoSys.SkinedRes( GikoSYs.LoadFromSkin( GikoSys.GetSkinResFileName, ThreadItem, sTitle, 0 ), Res[0], '1' ) +
1300 GikoSys.SkinedRes( GikoSYs.LoadFromSkin( GikoSys.GetSkinNewResFileName, ThreadItem, sTitle, 0 ), Res[1], '2' ) +
1301 '<a name="bottom"></a>' +
1302 GikoSys.LoadFromSkin( GikoSys.GetSkinFooterFileName, ThreadItem, sTitle, 0 );
1304 html := StringReplace( html, '</head>',
1305 '<style type="text/css">body {' + UserOptionalStyle + '}</style></head>', [rfReplaceAll] );
1309 '<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">' +
1310 '<title>' + sTitle + '</title>' +
1311 '<link rel="stylesheet" href="' + GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName + '" type="text/css">' +
1312 '<style type="text/css">body {' + UserOptionalStyle + '}</style>' +
1314 '<div class="title">' + sTitle + '</div>';
1316 for i := 0 to High( Res ) do
1319 '<div class="header"><span class="no">' + IntToStr( i + 1 ) + '</span>' +
1320 '<span class="name_label">
\96¼
\91O
\81F </span>' +
1321 '<a class="name_mail" href="mailto:' + Res[i].FMailTo + '">' +
1322 '<b>' + Res[i].FName + '</b></a><span class="mail"> [' + Res[i].FMailTo + ']</span>' +
1323 '<span class="date_label">
\93\8a\8de
\93ú
\81F</span>' +
1324 '<span class="date"> ' + Res[i].FDateTime+ '</span></div>' +
1325 '<div class="mes">' + Res[i].FBody + ' </div>';
1328 html := html + '</body></html>';
1332 CSSSetContent( html );
1339 GikoSys.Setting.CSSFileName := fileName;
1344 procedure TOptionDialog.CSSListViewChange(Sender: TObject; Item: TListItem;
1345 Change: TItemChange);
1348 if OptionTab.ActivePage = CSSTabSheet then