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;
57 UserIDSheet: TTabSheet;
63 SoundPlayButton: TBitBtn;
64 AutoLoginCheckBox: TCheckBox;
65 Tora3URLLabel: TLabel;
78 CabinetFontBotton: TButton;
79 CabinetColorBotton: TButton;
80 CabinetDefaultButton: TButton;
83 ListFontBotton: TButton;
84 ListColorBotton: TButton;
85 ListDefaultBotton: TButton;
86 HintFontButton: TButton;
87 HintBackButton: TButton;
88 HintDefaultButton: TButton;
91 EditorFontBotton: TButton;
92 EditorColorBotton: TButton;
93 EditorDefaultBotton: TButton;
94 BrowserTabMemo: TMemo;
95 BruwserTabFontButton: TButton;
96 BrowserTabDefaultButton: TButton;
100 GroupBox2: TGroupBox;
101 URLAppCheckBox: TCheckBox;
102 AppFolderLabel: TLabel;
103 AppFolderEdit: TEdit;
104 AppFolderButton: TButton;
105 OpenMailerCheckBox: TCheckBox;
106 TabSheet1: TTabSheet;
107 PopupPositionRadioGroup: TRadioGroup;
108 TabAddRadioGroup: TRadioGroup;
109 TabSheet2: TTabSheet;
110 GroupBox7: TGroupBox;
111 URLDisplayCheckBox: TCheckBox;
114 TabStopAddressBarCheckBox: TCheckBox;
115 AddressHistoryCountEdit: TEdit;
116 LinkAddCheckBox: TCheckBox;
117 GroupBox8: TGroupBox;
118 PreviewVisibleCheckBox: TCheckBox;
119 PreviewSizeComboBox: TComboBox;
122 PreviewWaitEdit: TEdit;
124 ShowMailCheckBox: TCheckBox;
125 TabSheet3: TTabSheet;
126 GroupBox9: TGroupBox;
127 ThreadListIconCheckBox: TCheckBox;
128 GroupBox6: TGroupBox;
129 LogDeleteMessageCheckBox: TCheckBox;
130 GroupBox10: TGroupBox;
131 UnActivePopupCheckBox: TCheckBox;
132 GroupBox11: TGroupBox;
133 RecvBufferSize: TEdit;
135 ProxyProtocolCheckBox: TCheckBox;
136 ProtocolCheckBox: TCheckBox;
144 CSSTabSheet: TTabSheet;
146 GroupBox12: TGroupBox;
147 CSSCheckBox: TCheckBox;
148 CSSListLabel: TLabel;
149 CSSListView: TListView;
150 GroupBox13: TGroupBox;
151 PostTimeCheckBox: TCheckBox;
155 PostTimeLabel: TLabel;
157 PutPostTimeRadioButton: TRadioButton;
158 BackPostTimeRadioButton: TRadioButton;
159 ResPopupBoldCheckBox: TCheckBox;
160 NGwordSheet: TTabSheet;
161 GroupBox14: TGroupBox;
162 RloCheckBox: TCheckBox;
163 ReplaceulCheckBox: TCheckBox;
164 PopUpAbonCheckBox: TCheckBox;
165 CSSBrowser: TWebBrowser;
166 CSSFontCheckBox: TCheckBox;
167 CSSBackColorCheckBox: TCheckBox;
168 CSSFontButton: TButton;
169 CSSBackColorButton: TButton;
170 ShowNGLineCheckBox: TCheckBox;
171 AddResAnchorCheckBox: TCheckBox;
172 OnlyAHundredResCheckBox: TCheckBox;
173 BoardURLComboBox: TComboBox;
174 AddURLButton: TButton;
175 RemoveURLButton: TButton;
176 procedure FormCreate(Sender: TObject);
177 procedure FormDestroy(Sender: TObject);
178 procedure ApplyButtonClick(Sender: TObject);
179 procedure CabinetFontBottonClick(Sender: TObject);
180 procedure CabinetColorBottonClick(Sender: TObject);
181 procedure EditorFontBottonClick(Sender: TObject);
182 procedure OkBottonClick(Sender: TObject);
183 procedure ReadProxyCheckClick(Sender: TObject);
184 procedure ListFontBottonClick(Sender: TObject);
185 procedure ListColorBottonClick(Sender: TObject);
186 procedure EditorColorBottonClick(Sender: TObject);
187 procedure CabinetDefaultButtonClick(Sender: TObject);
188 procedure ReadPortEditExit(Sender: TObject);
189 procedure ListDefaultBottonClick(Sender: TObject);
190 procedure EditorDefaultBottonClick(Sender: TObject);
191 procedure HintFontButtonClick(Sender: TObject);
192 procedure HintBackButtonClick(Sender: TObject);
193 procedure HintDefaultButtonClick(Sender: TObject);
194 procedure LogFolderButtonClick(Sender: TObject);
195 procedure FormClose(Sender: TObject; var Action: TCloseAction);
196 procedure SoundReferButtonClick(Sender: TObject);
197 procedure SoundPlayButtonClick(Sender: TObject);
198 procedure SoundListViewChanging(Sender: TObject; Item: TListItem;
199 Change: TItemChange; var AllowChange: Boolean);
200 procedure SoundFileEditChange(Sender: TObject);
201 procedure OptionTabChange(Sender: TObject);
202 procedure AppFolderButtonClick(Sender: TObject);
203 procedure WriteProxyCheckClick(Sender: TObject);
204 procedure WritePortEditExit(Sender: TObject);
205 procedure Tora3URLLabelClick(Sender: TObject);
206 procedure HotKeyEnter(Sender: TObject);
207 procedure HotKeyExit(Sender: TObject);
208 procedure URLAppCheckBoxClick(Sender: TObject);
209 procedure BruwserTabFontButtonClick(Sender: TObject);
210 procedure BrowserTabDefaultButtonClick(Sender: TObject);
211 procedure AddressHistoryCountEditExit(Sender: TObject);
212 procedure PreviewWaitEditExit(Sender: TObject);
213 procedure RecvBufferSizeExit(Sender: TObject);
214 procedure CSSCheckBoxClick(Sender: TObject);
215 procedure PostTimeEditExit(Sender: TObject);
216 procedure PostTimeCheckBoxClick(Sender: TObject);
217 procedure CSSFontButtonClick(Sender: TObject);
218 procedure CSSBackColorButtonClick(Sender: TObject);
219 procedure CSSFontCheckBoxClick(Sender: TObject);
220 procedure CSSBackColorCheckBoxClick(Sender: TObject);
221 procedure CSSListViewChange(Sender: TObject; Item: TListItem;
222 Change: TItemChange);
223 procedure AddURLButtonClick(Sender: TObject);
224 procedure RemoveURLButtonClick(Sender: TObject);
229 FCSSBackColor: TColor;
230 function GetMemoText(font: TFont; text: string): string;
231 // function GetFontText(Font: TFont; Text: string): string;
233 procedure SaveSetting;
234 procedure SettingApply;
235 function CheckFolder: Boolean;
236 procedure SetAbonpropertys;
237 procedure CSSSetContent(Content: string);
238 procedure CSSPreview;
244 OptionDialog: TOptionDialog;
249 Giko, Editor, Setting, ActnList;
252 FONT_TEXT: string = '%s %d pt';
253 MEMO_CABINET: string = '
\83L
\83\83\83r
\83l
\83b
\83g';
254 MEMO_THREAD: string = '
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g';
255 MEMO_BROWSERPOPUP: string = '
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v';
256 MEMO_BROWSERTAB: string = '
\83u
\83\89\83E
\83U
\83^
\83u';
257 MEMO_EDITOR: string = '
\83G
\83f
\83B
\83^
\83e
\83L
\83X
\83g';
258 DEFAULT_FONT_NAME: string = '
\82l
\82r
\82o
\83S
\83V
\83b
\83N';
259 DEFAULT_FONT_SIZE: Integer = 9;
260 DEFAULT_TABFONT_NAME: string = '
\82l
\82r
\82o
\83S
\83V
\83b
\83N';
261 DEFAULT_TABFONT_SIZE: Integer = 9;
262 URL_TORA3: WideString = 'http://2ch.tora3.net/';
266 procedure TOptionDialog.FormCreate(Sender: TObject);
269 CSSBrowser.Navigate('about:blank');
272 OptionTab.ActivePage := ConnectSheet;
275 CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET);
276 ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD);
277 HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP);
278 BrowserTabMemo.Text := GetMemoText(BrowserTabMemo.Font, MEMO_BROWSERTAB);
279 EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR);
281 Tora3URLLabel.Cursor := 5;
282 lblSFont.Caption := '
\81\9a\8fd
\97v
\81\9a'#13#10#13#10
283 + '
\83X
\83\8c\83b
\83h
\95\
\8e¦
\83G
\83\8a\83A
\82Ì
\83t
\83H
\83\93\83g
\95Ï
\8dX
\82Í
\81A'#13#10
284 + '
\81uCSS
\82Æ
\83X
\83L
\83\93\81v
\83^
\83u
\82Å
\90Ý
\92è
\8fo
\97\88\82Ü
\82·';
285 CSSCheckBoxClick(Sender);
286 PostTimeCheckBoxClick(Sender);
288 if OptionTab.PageCount > GikoSys.Setting.OptionDialogTabIndex then begin
289 OptionTab.ActivePageIndex := GikoSys.Setting.OptionDialogTabIndex;
290 OptionTabChange( nil );
295 procedure TOptionDialog.FormDestroy(Sender: TObject);
297 sndPlaySound(nil, SND_ASYNC);
300 procedure TOptionDialog.OkBottonClick(Sender: TObject);
303 RecvBufferSizeExit(Sender);
304 ReadPortEditExit(Sender);
305 WritePortEditExit(Sender);
306 AddressHistoryCountEditExit(Sender);
307 PreviewWaitEditExit(Sender);
308 PostTimeEditExit(Sender);
310 if not CheckFolder then begin
319 procedure TOptionDialog.ApplyButtonClick(Sender: TObject);
321 RecvBufferSizeExit(Sender);
322 ReadPortEditExit(Sender);
323 WritePortEditExit(Sender);
324 AddressHistoryCountEditExit(Sender);
325 PreviewWaitEditExit(Sender);
326 PostTimeEditExit(Sender);
328 if not CheckFolder then begin
338 //function TOptionDialog.GetFontText(Font: TFont; Text: string): string;
340 // result := Format(Text, [Font.Name, Font.Size]);
343 function TOptionDialog.GetMemoText(font: TFont; text: string): string;
349 s := Format(FONT_TEXT, [Font.Name, Font.Size]) + #13#10;
353 //
\83L
\83\83\83r
\83l
\83b
\83g
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
354 procedure TOptionDialog.CabinetFontBottonClick(Sender: TObject);
356 FontDialog.Options := [fdAnsiOnly, fdEffects];
357 FontDialog.Font.Assign(CabinetMemo.Font);
358 if FontDialog.Execute then begin
359 FontDialog.Font.Style := FontDialog.Font.Style - [fsUnderline] - [fsStrikeout];
360 CabinetMemo.Font.Assign(FontDialog.Font);
361 CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET);
362 CabinetMemo.Font.Charset := SHIFTJIS_CHARSET;
366 //
\83L
\83\83\83r
\83l
\83b
\83g
\94w
\8ci
\90F
\83{
\83^
\83\93
367 procedure TOptionDialog.CabinetColorBottonClick(Sender: TObject);
369 ColorDialog.Color := CabinetMemo.Color;
370 if ColorDialog.Execute then begin
371 CabinetMemo.Color := ColorDialog.Color;
375 //
\83L
\83\83\83r
\83l
\83b
\83g
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
376 procedure TOptionDialog.CabinetDefaultButtonClick(Sender: TObject);
378 CabinetMemo.Font.Name := DEFAULT_FONT_NAME;
379 CabinetMemo.Font.Size := DEFAULT_FONT_SIZE;
380 CabinetMemo.Font.Color := clWindowText;
381 CabinetMemo.Font.Style := [];
382 CabinetMemo.Color := clWindow;
383 CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET);
386 //
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
387 procedure TOptionDialog.ListFontBottonClick(Sender: TObject);
389 FontDialog.Options := [fdAnsiOnly, fdEffects];
390 FontDialog.Font.Assign(ListMemo.Font);
391 if FontDialog.Execute then begin
392 ListMemo.Font.Assign(FontDialog.Font);
393 ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD);
394 ListMemo.Font.Charset := SHIFTJIS_CHARSET;
398 //
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g
\94w
\8ci
\90F
\83{
\83^
\83\93
399 procedure TOptionDialog.ListColorBottonClick(Sender: TObject);
401 ColorDialog.Color := ListMemo.Color;
402 if ColorDialog.Execute then begin
403 ListMemo.Color := ColorDialog.Color;
407 //
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
408 procedure TOptionDialog.ListDefaultBottonClick(Sender: TObject);
410 ListMemo.Font.Name := DEFAULT_FONT_NAME;
411 ListMemo.Font.Size := DEFAULT_FONT_SIZE;
412 ListMemo.Font.Color := clWindowText;
413 ListMemo.Font.Style := [];
414 ListMemo.Color := clWindow;
415 ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD);
418 //
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
419 procedure TOptionDialog.HintFontButtonClick(Sender: TObject);
421 FontDialog.Options := [fdAnsiOnly, fdEffects];
422 FontDialog.Font.Assign(HintMemo.Font);
423 if FontDialog.Execute then begin
424 HintMemo.Font.Assign(FontDialog.Font);
425 HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP);
426 HintMemo.Font.Charset := SHIFTJIS_CHARSET;
430 //
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v
\94w
\8ci
\90F
\83{
\83^
\83\93
431 procedure TOptionDialog.HintBackButtonClick(Sender: TObject);
433 ColorDialog.Color := HintMemo.Color;
434 if ColorDialog.Execute then begin
435 HintMemo.Color := ColorDialog.Color;
439 //
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
440 procedure TOptionDialog.HintDefaultButtonClick(Sender: TObject);
442 HintMemo.Font.Name := DEFAULT_FONT_NAME;
443 HintMemo.Font.Size := DEFAULT_FONT_SIZE;
444 HintMemo.Font.Color := clWindowText;
445 HintMemo.Font.Style := [];
446 HintMemo.Color := clInfoBk;
447 HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP);
450 //
\83u
\83\89\83E
\83U
\83^
\83u
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
451 procedure TOptionDialog.BruwserTabFontButtonClick(Sender: TObject);
453 FontDialog.Options := [fdAnsiOnly];
454 FontDialog.Font.Assign(BrowserTabMemo.Font);
455 if FontDialog.Execute then begin
456 BrowserTabMemo.Font.Assign(FontDialog.Font);
457 BrowserTabMemo.Text := GetMemoText(FontDialog.Font, MEMO_BROWSERTAB);
458 BrowserTabMemo.Font.Charset := SHIFTJIS_CHARSET;
462 //
\83u
\83\89\83E
\83U
\83^
\83u
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
463 procedure TOptionDialog.BrowserTabDefaultButtonClick(Sender: TObject);
465 BrowserTabMemo.Font.Name := DEFAULT_TABFONT_NAME;
466 BrowserTabMemo.Font.Size := DEFAULT_TABFONT_SIZE;
467 BrowserTabMemo.Font.Color := clWindowText;
468 BrowserTabMemo.Font.Style := [];
469 BrowserTabMemo.Color := clBtnFace;
470 BrowserTabMemo.Text := GetMemoText(BrowserTabMemo.Font, MEMO_BROWSERTAB);
473 //
\83G
\83f
\83B
\83^
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
474 procedure TOptionDialog.EditorFontBottonClick(Sender: TObject);
476 FontDialog.Options := [fdAnsiOnly, fdEffects];
477 FontDialog.Font.Assign(EditorMemo.Font);
478 if FontDialog.Execute then begin
479 EditorMemo.Font.Assign(FontDialog.Font);
480 EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR);
481 EditorMemo.Font.Charset := SHIFTJIS_CHARSET;
485 //
\83G
\83f
\83B
\83^
\94w
\8ci
\90F
\83{
\83^
\83\93
486 procedure TOptionDialog.EditorColorBottonClick(Sender: TObject);
488 ColorDialog.Color := EditorMemo.Font.Color;
489 if ColorDialog.Execute then begin
490 EditorMemo.Color := ColorDialog.Color;
494 //
\83G
\83f
\83B
\83^
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
495 procedure TOptionDialog.EditorDefaultBottonClick(Sender: TObject);
497 EditorMemo.Font.Name := DEFAULT_FONT_NAME;
498 EditorMemo.Font.Size := DEFAULT_FONT_SIZE;
499 EditorMemo.Font.Color := clWindowText;
500 EditorMemo.Font.Style := [];
501 EditorMemo.Color := clWindow;
502 EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR);
505 procedure TOptionDialog.SetValue;
511 FileList: TStringList;
513 //
\8eó
\90M
\83o
\83b
\83t
\83@
\83T
\83C
\83Y
514 RecvBufferSize.Text := IntToStr(Gikosys.Setting.RecvBufferSize);
516 ProtocolCheckBox.Checked := GikoSys.Setting.Protocol;
517 //
\83v
\83\8d\83L
\83V
\90Ú
\91±HTTP1.1
\8eg
\97p
518 ProxyProtocolCheckBox.Checked := Gikosys.Setting.ProxyProtocol;
520 //
\93Ç
\82Ý
\8d\9e\82Ý
\97p
\83v
\83\8d\83L
\83V
521 ReadProxyCheck.Checked := GikoSys.Setting.ReadProxy;
522 ReadProxyCheckClick(nil);
523 ReadProxyAddressEdit.Text := GikoSys.Setting.ReadProxyAddress;
524 ReadPortEdit.Text := IntToStr(GikoSys.Setting.ReadProxyPort);
525 ReadProxyUserIDEdit.Text := GikoSys.Setting.ReadProxyUserID;
526 ReadProxyPasswordEdit.Text := GikoSys.Setting.ReadProxyPassword;
527 //
\8f\91\82«
\8d\9e\82Ý
\97p
\83v
\83\8d\83L
\83V
528 WriteProxyCheck.Checked := GikoSys.Setting.WriteProxy;
529 WriteProxyCheckClick(nil);
530 WriteProxyAddressEdit.Text := GikoSys.Setting.WriteProxyAddress;
531 WritePortEdit.Text := IntToStr(GikoSys.Setting.WriteProxyPort);
532 WriteProxyUserIDEdit.Text := GikoSys.Setting.WriteProxyUserID;
533 WriteProxyPasswordEdit.Text := GikoSys.Setting.WriteProxyPassword;
534 //
\83L
\83\83\83r
\83l
\83b
\83g
\83t
\83H
\83\93\83g
535 CabinetMemo.Font.Name := GikoSys.Setting.CabinetFontName;
536 CabinetMemo.Font.Size := GikoSys.Setting.CabinetFontSize;
537 CabinetMemo.Font.Color := GikoSys.Setting.CabinetFontColor;
538 CabinetMemo.Color := GikoSys.Setting.CabinetBackColor;
539 //
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g
\83t
\83H
\83\93\83g
540 ListMemo.Font.Name := GikoSys.Setting.ListFontName;
541 ListMemo.Font.Size := GikoSys.Setting.ListFontSize;
542 ListMemo.Font.Color := GikoSys.Setting.ListFontColor;
543 ListMemo.Color := GikoSys.Setting.ListBackColor;
544 //
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v
\83t
\83H
\83\93\83g
545 HintMemo.Font.Name := GikoSys.Setting.HintFontName;
546 HintMemo.Font.Size := GikoSys.Setting.HintFontSize;
547 HintMemo.Font.Color := GikoSys.Setting.HintFontColor;
548 HintMemo.Color := GikoSys.Setting.HintBackColor;
549 //
\83u
\83\89\83E
\83U
\83^
\83u
\83t
\83H
\83\93\83g
550 BrowserTabMemo.Font.Name := GikoSys.Setting.BrowserTabFontName;
551 BrowserTabMemo.Font.Size := GikoSys.Setting.BrowserTabFontSize;
552 BrowserTabMemo.Font.Style := [];
553 if GikoSys.Setting.BrowserTabFontBold then
554 BrowserTabMemo.Font.Style := BrowserTabMemo.Font.Style + [fsBold];
555 if GikoSys.Setting.BrowserTabFontItalic then
556 BrowserTabMemo.Font.Style := BrowserTabMemo.Font.Style + [fsItalic];
557 //
\83G
\83f
\83B
\83^
\83\81\83\82\83t
\83H
\83\93\83g
558 EditorMemo.Font.Name := GikoSys.Setting.EditorFontName;
559 EditorMemo.Font.Size := GikoSys.Setting.EditorFontSize;
560 EditorMemo.Font.Color := GikoSys.Setting.EditorFontColor;
561 EditorMemo.Color := GikoSys.Setting.EditorBackColor;
563 CSSCheckBox.Checked := GikoSys.Setting.UseCSS;
564 FCSSFont := TFont.Create;
565 if (GikoSys.Setting.BrowserFontName <> '') or
566 (GikoSys.Setting.BrowserFontSize <> 0) or
567 (GikoSys.Setting.BrowserFontBold <> 0) or
568 (GikoSys.Setting.BrowserFontItalic <> 0) or
569 (GikoSys.Setting.BrowserFontColor <> -1 ) then begin
570 CSSFontCheckBox.Checked := True;
572 FCSSFont.Name := GikoSys.Setting.BrowserFontName;
573 FCSSFont.Size := GikoSys.Setting.BrowserFontSize;
574 FCSSFont.Style := [];
575 if GikoSys.Setting.BrowserFontBold = 1 then
576 FCSSFont.Style := FCSSFont.Style + [fsBold];
577 if GikoSys.Setting.BrowserFontItalic = 1 then
578 FCSSFont.Style := FCSSFont.Style + [fsItalic];
579 i := GikoSys.Setting.BrowserFontColor;
580 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
583 if GikoSys.Setting.BrowserBackColor <> -1 then begin
584 CSSBackColorCheckBox.Checked := True;
586 i := GikoSys.Setting.BrowserBackColor;
587 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
591 //
\83X
\83^
\83C
\83\8b\83V
\81[
\83g
\83t
\83@
\83C
\83\8b\96¼
\88ê
\97\97
592 FileList := TStringList.Create;
594 GikoSys.GetFileList(GikoSys.GetStyleSheetDir, '*.css', FileList, True, True);
596 Idx := Length(GikoSys.GetStyleSheetDir);
597 for i := 0 to FileList.Count - 1 do
598 FileList[i] := Copy(FileList[i], Idx + 1, Length(FileList[i]));
600 for i := 0 to FileList.Count - 1 do begin
601 //s := ExtractFileName(FileList[i]);
602 if LowerCase(FileList[i]) = 'default.css' then
603 Item := CSSListView.Items.Insert(0)
605 Item := CSSListView.Items.Add;
606 Item.Caption := ChangeFileExt(FileList[i], '');
607 if LowerCase(FileList[i]) = LowerCase(GikoSys.Setting.CSSFileName) then
608 Item.Selected := True;
613 //
\83X
\83L
\83\93\83t
\83@
\83C
\83\8b\96¼
\88ê
\97\97
614 FileList := TStringList.Create;
616 GikoSys.GetDirectoryList(GikoSys.GetSkinDir, '*', FileList, False);
618 Idx := Length(GikoSys.GetSkinDir);
620 for i := 0 to FileList.Count - 1 do begin
621 //s := ExtractFileName(FileList[i]);
622 Item := CSSListView.Items.Add;
623 Item.Data := PChar( FileList[i] );
624 Item.Caption := Copy( FileList[i], Idx + 1, Length(FileList[i]) );
625 if LowerCase(FileList[i]) = LowerCase(GikoSys.Setting.CSSFileName) then
626 Item.Selected := True;
629 // 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`
633 if (CSSListView.ItemIndex = -1) and (CSSListView.Items.Count > 0) then
634 CSSListView.Items[0].Selected := True;
637 ShowMailCheckBox.Checked := GikoSys.Setting.ShowMail;
638 OnlyAHundredResCheckBox.Checked := GikoSYs.Setting.OnlyAHundredRes;
639 //
\83^
\83u
\92Ç
\89Á
\88Ê
\92u
640 TabAddRadioGroup.ItemIndex := Ord(GikoSys.Setting.BrowserTabAppend);
642 //BoardURL2chEdit.Text := GikoSys.Setting.BoardURL2ch;
643 BoardURLComboBox.Clear;
644 BoardURLComboBox.Items.AddStrings(GikoSys.Setting.BoardURLs);
646 BoardURLComboBox.ItemIndex := GikoSys.Setting.BoardURLSelected - 1;
648 BoardURLComboBox.ItemIndex := 0;
651 UserIDEdit.Text := GikoSys.Setting.UserID;
652 PasswordEdit.Text := GikoSys.Setting.Password;
653 AutoLoginCheckBox.Checked := GikoSys.Setting.AutoLogin;
654 //
\83\8d\83O
\83t
\83H
\83\8b\83_
655 if GikoSys.Setting.NewLogFolder = '' then
656 LogFolderEdit.Text := GikoSys.Setting.LogFolder
658 LogFolderEdit.Text := GikoSys.Setting.NewLogFolder;
660 for i := 0 to GikoSys.Setting.GetSoundCount - 1 do begin
661 Item := SoundListView.Items.Add;
662 Item.Caption := GikoSys.Setting.SoundViewName[i];
663 if FileExists(GikoSys.Setting.SoundFileName[i]) then
664 Item.SubItems.Add(GikoSys.Setting.SoundFileName[i])
666 Item.SubItems.Add('');
668 //URL
\83N
\83\8a\83b
\83N
\8e\9e\93®
\8dì
669 URLAppCheckBox.Checked := GikoSys.Setting.URLApp;
670 URLAppCheckBoxClick(nil);
671 AppFolderEdit.Text := GikoSys.Setting.URLAppFile;
673 //mailto
\83N
\83\8a\83b
\83N
\8e\9e\93®
\8dì
674 OpenMailerCheckBox.Checked := GikoSys.Setting.OpenMailer;
676 //
\83\8d\83O
\8dí
\8f\9c\8e\9e\83\81\83b
\83Z
\81[
\83W
677 LogDeleteMessageCheckBox.Checked := GikoSys.Setting.DeleteMsg;
679 //
\83|
\83b
\83v
\83A
\83b
\83v
\88Ê
\92u
680 case GikoSys.Setting.PopupPosition of
681 gppRightTop: PopupPositionRadioGroup.ItemIndex := 0;
682 gppRight: PopupPositionRadioGroup.ItemIndex := 1;
683 gppRightBottom: PopupPositionRadioGroup.ItemIndex := 2;
684 gppTop: PopupPositionRadioGroup.ItemIndex := 3;
685 gppCenter: PopupPositionRadioGroup.ItemIndex := 4;
686 gppBottom: PopupPositionRadioGroup.ItemIndex := 5;
687 gppLeftTop: PopupPositionRadioGroup.ItemIndex := 6;
688 gppLeft: PopupPositionRadioGroup.ItemIndex := 7;
689 gppLeftBottom: PopupPositionRadioGroup.ItemIndex := 8;
692 //
\94ñ
\83A
\83N
\83e
\83B
\83u
\8e\9e\83|
\83b
\83v
\83A
\83b
\83v
\95\
\8e¦
693 UnActivePopupCheckBox.Checked := GikoSys.Setting.UnActivePopup;
694 //
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\83{
\81[
\83\8b\83h
\95\
\8e¦
695 ResPopupBoldCheckBox.Checked := GikoSys.Setting.ResPopupHeaderBold;
697 //
\83A
\83h
\83\8c\83X
\83o
\81[
698 URLDisplayCheckBox.Checked := GikoSys.Setting.URLDisplay;
699 TabStopAddressBarCheckBox.Checked := GikoSys.Setting.AddressBarTabStop;
700 LinkAddCheckBox.Checked := GikoSys.Setting.LinkAddAddressBar;
701 AddressHistoryCountEdit.Text := IntToStr(GikoSys.Setting.AddressHistoryCount);
703 //HTML
\83v
\83\8c\83r
\83\85\81[
704 PreviewVisibleCheckBox.Checked := GikoSys.Setting.PreviewVisible;
705 PreviewWaitEdit.Text := IntToStr(GikoSys.Setting.PreviewWait);
706 PreviewSizeComboBox.ItemIndex := 2;
707 case GikoSys.Setting.PreviewSize of
708 gpsXLarge: PreviewSizeComboBox.ItemIndex := 4;
709 gpsLarge: PreviewSizeComboBox.ItemIndex := 3;
710 gpsMedium: PreviewSizeComboBox.ItemIndex := 2;
711 gpsSmall: PreviewSizeComboBox.ItemIndex := 1;
712 gpsXSmall: PreviewSizeComboBox.ItemIndex := 0;
715 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\8dX
\90V
\83A
\83C
\83R
\83\93
716 ThreadListIconCheckBox.Checked := GikoSys.Setting.ListIconVisible;
718 //
\8f\91\82«
\8d\9e\82Ý
\8e\9e\83}
\83V
\83\93\8e\9e\8aÔ
\8eg
\97p
\90Ý
\92è
719 PostTimeCheckBox.Checked := GikoSys.Setting.UseMachineTime;
720 PostTimeEdit.Text := IntToStr(GikoSys.Setting.TimeAdjustSec);
721 if GikoSys.Setting.TimeAdjust then
722 PutPostTimeRadioButton.Checked := True
724 BackPostTimeRadioButton.Checked := True;
726 RloCheckBox.Checked := GikoSys.Setting.AbonDeleterlo;
727 ReplaceulCheckBox.Checked := GikoSys.Setting.AbonReplaceul;
728 PopUpAbonCheckBox.Checked := GikoSys.Setting.PopUpAbon;
729 ShowNGLineCheckBox.Checked := GikoSys.Setting.ShowNGLinesNum;
730 AddResAnchorCheckBox.Checked := GikoSys.Setting.AddResAnchor;
734 procedure TOptionDialog.SaveSetting;
739 //
\8eó
\90M
\83o
\83b
\83t
\83@
\83T
\83C
\83Y
740 Gikosys.Setting.RecvBufferSize := StrToInt(RecvBufferSize.Text);
742 GikoSys.Setting.Protocol := ProtocolCheckBox.Checked;
743 //
\83v
\83\8d\83L
\83V
\90Ú
\91±HTTP1.1
\8eg
\97p
744 Gikosys.Setting.ProxyProtocol := ProxyProtocolCheckBox.Checked;
746 GikoSys.Setting.OptionDialogTabIndex := OptionTab.TabIndex;
748 GikoSys.Setting.ReadProxy := ReadProxyCheck.Checked;
749 GikoSys.Setting.ReadProxyAddress := ReadProxyAddressEdit.Text;
750 GikoSys.Setting.ReadProxyPort := StrToInt(ReadPortEdit.Text);
751 GikoSys.Setting.ReadProxyUserID := ReadProxyUserIDEdit.Text;
752 GikoSys.Setting.ReadProxyPassword := ReadProxyPasswordEdit.Text;
754 GikoSys.Setting.WriteProxy := WriteProxyCheck.Checked;
755 GikoSys.Setting.WriteProxyAddress := WriteProxyAddressEdit.Text;
756 GikoSys.Setting.WriteProxyPort := StrToInt(WritePortEdit.Text);
757 GikoSys.Setting.WriteProxyUserID := WriteProxyUserIDEdit.Text;
758 GikoSys.Setting.WriteProxyPassword := WriteProxyPasswordEdit.Text;
760 GikoSys.Setting.CabinetFontName := CabinetMemo.Font.Name;
761 GikoSys.Setting.CabinetFontSize := CabinetMemo.Font.Size;
762 GikoSys.Setting.CabinetFontColor := CabinetMemo.Font.Color;
763 GikoSys.Setting.CabinetBackColor := CabinetMemo.Color;
765 GikoSys.Setting.ListFontName := ListMemo.Font.Name;
766 GikoSys.Setting.ListFontSize := ListMemo.Font.Size;
767 GikoSys.Setting.ListFontColor := ListMemo.Font.Color;
768 GikoSys.Setting.ListBackColor := ListMemo.Color;
770 GikoSys.Setting.HintFontName := HintMemo.Font.Name;
771 GikoSys.Setting.HintFontSize := HintMemo.Font.Size;
772 GikoSys.Setting.HintFontColor := HintMemo.Font.Color;
773 GikoSys.Setting.HintBackColor := HintMemo.Color;
775 GikoSys.Setting.BrowserTabFontName := BrowserTabMemo.Font.Name;
776 GikoSys.Setting.BrowserTabFontSize := BrowserTabMemo.Font.Size;
778 GikoSys.Setting.EditorFontName := EditorMemo.Font.Name;
779 GikoSys.Setting.EditorFontSize := EditorMemo.Font.Size;
780 GikoSys.Setting.EditorFontColor := EditorMemo.Font.Color;
781 GikoSys.Setting.EditorBackColor := EditorMemo.Color;
783 GikoSys.Setting.UseCSS := CSSCheckBox.Checked;
784 //CSS
\83t
\83@
\83C
\83\8b\96¼
785 GikoSys.Setting.CSSFileName := 'default.css';
786 if CSSListView.Items.Count > 0 then begin
788 if CSSListView.Items[CSSListView.ItemIndex].Data <> nil then
789 GikoSys.Setting.CSSFileName := string( CSSListView.Items[CSSListView.ItemIndex].data )
791 GikoSys.Setting.CSSFileName := CSSListView.Items[CSSListView.ItemIndex].Caption + '.css';
795 // CSS
\82Ì
\83t
\83H
\83\93\83g
\8ew
\92è
796 if CSSFontCheckBox.Checked then begin
797 GikoSys.Setting.BrowserFontName := FCSSFont.Name;
798 GikoSys.Setting.BrowserFontSize := FCSSFont.Size;
799 if fsBold in FCSSFont.Style then
800 GikoSys.Setting.BrowserFontBold := 1
802 GikoSys.Setting.BrowserFontBold := -1;
803 if fsItalic in FCSSFont.Style then
804 GikoSys.Setting.BrowserFontItalic := 1
806 GikoSys.Setting.BrowserFontItalic := -1;
807 i := ColorToRGB( FCSSFont.Color );
808 GikoSys.Setting.BrowserFontColor := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
810 GikoSys.Setting.BrowserFontName := '';
811 GikoSys.Setting.BrowserFontSize := 0;
812 GikoSys.Setting.BrowserFontBold := 0;
813 GikoSys.Setting.BrowserFontItalic := 0;
814 GikoSys.Setting.BrowserFontColor := -1;
816 if CSSBackColorCheckBox.Checked then begin
817 i := ColorToRGB( FCSSBackColor );
818 GikoSys.Setting.BrowserBackColor := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
820 GikoSys.Setting.BrowserBackColor := -1;
824 GikoSys.Setting.ShowMail := ShowMailCheckBox.Checked;
825 //
\8dÅ
\90V100
\83\8c\83X
\95\
\8e¦
826 GikoSYs.Setting.OnlyAHundredRes := OnlyAHundredResCheckBox.Checked;
828 GikoSys.Setting.BrowserTabAppend := TGikoTabAppend(TabAddRadioGroup.ItemIndex);
830 // GikoSys.Setting.BoardURL2ch := BoardURL2chEdit.Text;
831 GikoSys.Setting.BoardURLs.Clear;
832 GikoSys.Setting.BoardURLs.AddStrings(BoardURLComboBox.Items);
833 GikoSys.Setting.BoardURLSelected := BoardURLComboBox.ItemIndex + 1;
834 GikoSys.Setting.UserID := UserIDEdit.Text;
835 GikoSys.Setting.Password := PasswordEdit.Text;
836 GikoSys.Setting.AutoLogin := AutoLoginCheckBox.Checked;
838 GikoSys.Setting.URLApp := URLAppCheckBox.Checked;
839 GikoSys.Setting.URLAppFile := AppFolderEdit.Text;
841 GikoSys.Setting.OpenMailer := OpenMailerCheckBox.Checked;
842 GikoSys.Setting.DeleteMsg := LogDeleteMessageCheckBox.Checked;
844 //
\83|
\83b
\83v
\83A
\83b
\83v
\88Ê
\92u
845 case PopupPositionRadioGroup.ItemIndex of
846 0: GikoSys.Setting.PopupPosition := gppRightTop;
847 1: GikoSys.Setting.PopupPosition := gppRight;
848 2: GikoSys.Setting.PopupPosition := gppRightBottom;
849 3: GikoSys.Setting.PopupPosition := gppTop;
850 4: GikoSys.Setting.PopupPosition := gppCenter;
851 5: GikoSys.Setting.PopupPosition := gppBottom;
852 6: GikoSys.Setting.PopupPosition := gppLeftTop;
853 7: GikoSys.Setting.PopupPosition := gppLeft;
854 8: GikoSys.Setting.PopupPosition := gppLeftBottom;
857 //
\94ñ
\83A
\83N
\83e
\83B
\83u
\8e\9e\83|
\83b
\83v
\83A
\83b
\83v
\95\
\8e¦
858 GikoSys.Setting.UnActivePopup := UnActivePopupCheckBox.Checked;
859 //
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\83{
\81[
\83\8b\83h
\95\
\8e¦
860 GikoSys.Setting.ResPopupHeaderBold := ResPopupBoldCheckBox.Checked;
862 //
\83A
\83h
\83\8c\83X
\83o
\81[
863 GikoSys.Setting.URLDisplay := URLDisplayCheckBox.Checked;
864 GikoSys.Setting.AddressBarTabStop := TabStopAddressBarCheckBox.Checked;
865 GikoSys.Setting.LinkAddAddressBar := LinkAddCheckBox.Checked;
866 if GikoSys.IsNumeric(AddressHistoryCountEdit.Text) then
867 GikoSys.Setting.AddressHistoryCount := StrToInt(AddressHistoryCountEdit.Text)
869 GikoSys.Setting.AddressHistoryCount := 100;
871 //HTML
\83v
\83\8c\83r
\83\85\81[
872 GikoSys.Setting.PreviewVisible := PreviewVisibleCheckBox.Checked;
873 if GikoSys.IsNumeric(PreviewWaitEdit.Text) then
874 GikoSys.Setting.PreviewWait := StrToInt(PreviewWaitEdit.Text)
876 GikoSys.Setting.PreviewWait := 500;
877 case PreviewSizeComboBox.ItemIndex of
878 0: GikoSys.Setting.PreviewSize := gpsXSmall;
879 1: GikoSys.Setting.PreviewSize := gpsSmall;
880 2: GikoSys.Setting.PreviewSize := gpsMedium;
881 3: GikoSys.Setting.PreviewSize := gpsLarge;
882 4: GikoSys.Setting.PreviewSize := gpsXLarge;
885 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\8dX
\90V
\83A
\83C
\83R
\83\93
886 GikoSys.Setting.ListIconVisible := ThreadListIconCheckBox.Checked;
888 //
\8f\91\82«
\8d\9e\82Ý
\8e\9e\83}
\83V
\83\93\8e\9e\8aÔ
\8eg
\97p
\90Ý
\92è
889 GikoSys.Setting.UseMachineTime := PostTimeCheckBox.Checked;
890 if GikoSys.IsNumeric(PostTimeEdit.Text) then
891 GikoSys.Setting.TimeAdjustSec := StrToInt(PostTimeEdit.Text)
893 GikoSys.Setting.TimeAdjustSec := 0;
894 GikoSys.Setting.TimeAdjust := PutPostTimeRadioButton.Checked;
897 GikoSys.Setting.WriteSystemSettingFile;
898 GikoSys.Setting.WriteBoardURLSettingFile;
899 // GikoForm.SetBrowserTabState;
901 if LogFolderEdit.Text <> '' then begin
902 GikoSys.Setting.NewLogFolder := LogFolderEdit.Text;
903 GikoSys.Setting.WriteFolderSettingFile;
906 for i := 0 to SoundListView.Items.Count - 1 do begin
907 if FileExists(SoundListView.Items[i].SubItems[0]) then
908 GikoSys.Setting.SoundFileName[i] := SoundListView.Items[i].SubItems[0]
910 GikoSys.Setting.SoundFileName[i] := '';
914 GikoSys.Setting.AbonDeleterlo := RloCheckBox.Checked;
915 GikoSys.Setting.AbonReplaceul := ReplaceulCheckBox.Checked;
916 GikoSys.Setting.PopUpAbon := PopUpAbonCheckBox.Checked;
917 GikoSys.Setting.ShowNGLinesNum := ShowNGLineCheckBox.Checked;
918 GikoSys.Setting.AddResAnchor := AddResAnchorCheckBox.Checked;
922 procedure TOptionDialog.SettingApply;
925 ThreadItem: TThreadItem;
927 GikoForm.TreeView.Items.BeginUpdate;
928 GikoForm.FavoriteTreeView.Items.BeginUpdate;
929 GikoForm.ListView.Items.BeginUpdate;
931 GikoForm.TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
932 GikoForm.TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
933 GikoForm.TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
934 GikoForm.TreeView.Color := GikoSys.Setting.CabinetBackColor;
936 GikoForm.FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
937 GikoForm.FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
938 GikoForm.FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
939 GikoForm.FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
941 GikoForm.ListView.Font.Name := GikoSys.Setting.ListFontName;
942 GikoForm.ListView.Font.Size := GikoSys.Setting.ListFontSize;
943 GikoForm.ListView.Font.Color := GikoSys.Setting.ListFontColor;
944 GikoForm.ListView.Color := GikoSys.Setting.ListBackColor;
946 GikoForm.BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
947 GikoForm.BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
948 // GikoForm.BrowserTab.Height := (GikoSys.Setting.BrowserTabFontSize * 2) + 1;
949 // GikoForm.BrowserBottomPanel.Height := GikoForm.BrowserTab.Height;
951 for i := 0 to Screen.CustomFormCount - 1 do begin
952 if TObject(Screen.CustomForms[i]) is TEditorForm then begin
953 TEditorForm(Screen.CustomForms[i]).SetFont;
958 GikoForm.TreeView.Items.EndUpdate;
959 GikoForm.FavoriteTreeView.Items.EndUpdate;
960 GikoForm.ListView.Items.EndUpdate;
963 //
\83A
\83h
\83\8c\83X
\83o
\81[
964 for i := GikoForm.AddressComboBox.Items.Count - 1 downto 0 do begin
965 if GikoSys.Setting.AddressHistoryCount >= GikoForm.AddressComboBox.Items.Count then
967 GikoForm.AddressComboBox.Items.Delete(i);
969 GikoForm.AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
971 //
\83X
\83\8c\83b
\83h
\82Ì
\83\8a\83t
\83\8c\83b
\83V
\83\85
972 ThreadItem := GikoForm.GetActiveContent;
973 if ThreadItem <> nil then
974 GikoForm.SetContent( ThreadItem );
977 procedure TOptionDialog.ReadProxyCheckClick(Sender: TObject);
979 ReadProxyAddressEdit.Enabled := ReadProxyCheck.Checked;
980 ReadPortEdit.Enabled := ReadProxyCheck.Checked;
981 ReadProxyUserIDEdit.Enabled := ReadProxyCheck.Checked;
982 ReadProxyPasswordEdit.Enabled := ReadProxyCheck.Checked;
984 ReadAddressLabel.Enabled := ReadProxyCheck.Checked;
985 ReadPortLabel.Enabled := ReadProxyCheck.Checked;
986 ReadUserIDLabel.Enabled := ReadProxyCheck.Checked;
987 ReadPasswordLabel.Enabled := ReadProxyCheck.Checked;
990 procedure TOptionDialog.ReadPortEditExit(Sender: TObject);
992 if not GikoSys.IsNumeric(ReadPortEdit.Text) then
993 ReadPortEdit.Text := '0';
996 procedure TOptionDialog.LogFolderButtonClick(Sender: TObject);
1002 if SelectDirectory('
\83\8d\83O
\83t
\83H
\83\8b\83_
\91I
\91ð', Root, Dir) then begin
1003 LogFolderEdit.Text := Dir;
1007 function TOptionDialog.CheckFolder: Boolean;
1009 if Trim(LogFolderEdit.Text) = '' then
1010 LogFolderEdit.Text := ExtractFilePath(Application.ExeName) + 'Log';
1012 if DirectoryExists(LogFolderEdit.Text) then begin
1015 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
1016 //
\83t
\83H
\83\8b\83_
\82ð
\8dì
\90¬
1018 GikoSys.ForceDirectoriesEx(LogFolderEdit.Text);
1021 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);
1022 OptionTab.ActivePage := FolderSheet;
1023 LogFolderEdit.SetFocus;
1031 procedure TOptionDialog.FormClose(Sender: TObject; var Action: TCloseAction);
1038 procedure TOptionDialog.SoundReferButtonClick(Sender: TObject);
1040 OpenDialog.Filter := '
\83T
\83E
\83\93\83h (*.wav)|*.wav|
\82·
\82×
\82Ä
\82Ì
\83t
\83@
\83C
\83\8b (*.*)|*.*';
1041 sndPlaySound(nil, SND_ASYNC);
1042 if OpenDialog.Execute then begin
1043 SoundFileEdit.Text := OpenDialog.FileName;
1047 procedure TOptionDialog.SoundPlayButtonClick(Sender: TObject);
1049 if not FileExists(SoundFileEdit.Text) then begin
1050 MsgBox(Handle, '
\91¶
\8dÝ
\82µ
\82È
\82¢
\83t
\83@
\83C
\83\8b\82Å
\82·', '
\83G
\83\89\81[', MB_ICONSTOP or MB_OK);
1051 SoundFileEdit.Text := '';
1054 if not sndPlaySound(PChar(SoundFileEdit.Text), SND_ASYNC or SND_NOSTOP) then begin
1055 sndPlaySound(nil, SND_ASYNC);
1059 procedure TOptionDialog.SoundListViewChanging(Sender: TObject;
1060 Item: TListItem; Change: TItemChange; var AllowChange: Boolean);
1062 if Item.SubItems.Count > 0 then
1063 SoundFileEdit.Text := Item.SubItems[0];
1066 procedure TOptionDialog.SoundFileEditChange(Sender: TObject);
1070 sndPlaySound(nil, SND_ASYNC);
1071 Item := SoundListView.Selected;
1072 if Item = nil then Exit;
1074 if FileExists(SoundFileEdit.Text) then
1075 Item.SubItems[0] := SoundFileEdit.Text;
1076 if Trim(SoundFileEdit.Text) = '' then
1077 Item.SubItems[0] := '';
1080 procedure TOptionDialog.OptionTabChange(Sender: TObject);
1082 sndPlaySound(nil, SND_ASYNC);
1084 if OptionTab.ActivePage = CSSTabSheet then
1088 procedure TOptionDialog.AppFolderButtonClick(Sender: TObject);
1090 OpenDialog.Filter := '
\8eÀ
\8ds
\83t
\83@
\83C
\83\8b (*.exe)|*.exe|
\82·
\82×
\82Ä
\82Ì
\83t
\83@
\83C
\83\8b (*.*)|*.*';
1091 if OpenDialog.Execute then
1092 AppFolderEdit.Text := OpenDialog.FileName;
1095 procedure TOptionDialog.WriteProxyCheckClick(Sender: TObject);
1097 WriteProxyAddressEdit.Enabled := WriteProxyCheck.Checked;
1098 WritePortEdit.Enabled := WriteProxyCheck.Checked;
1099 WriteProxyUserIDEdit.Enabled := WriteProxyCheck.Checked;
1100 WriteProxyPasswordEdit.Enabled := WriteProxyCheck.Checked;
1102 WriteAddressLabel.Enabled := WriteProxyCheck.Checked;
1103 WritePortLabel.Enabled := WriteProxyCheck.Checked;
1104 WriteUserIDLabel.Enabled := WriteProxyCheck.Checked;
1105 WritePasswordLabel.Enabled := WriteProxyCheck.Checked;
1108 procedure TOptionDialog.WritePortEditExit(Sender: TObject);
1110 if not GikoSys.IsNumeric(WritePortEdit.Text) then
1111 WritePortEdit.Text := '0';
1114 procedure TOptionDialog.Tora3URLLabelClick(Sender: TObject);
1116 GikoSys.OpenBrowser(URL_TORA3, gbtAuto);
1119 procedure TOptionDialog.HotKeyEnter(Sender: TObject);
1121 OkBotton.Default := False;
1122 CancelBotton.Cancel := False;
1125 procedure TOptionDialog.HotKeyExit(Sender: TObject);
1127 OkBotton.Default := True;
1128 CancelBotton.Cancel := True;
1131 procedure TOptionDialog.URLAppCheckBoxClick(Sender: TObject);
1133 AppFolderLabel.Enabled := URLAppCheckBox.Checked;
1134 AppFolderEdit.Enabled := URLAppCheckBox.Checked;
1135 AppFolderButton.Enabled := URLAppCheckBox.Checked;
1138 procedure TOptionDialog.AddressHistoryCountEditExit(Sender: TObject);
1140 if not GikoSys.IsNumeric(AddressHistoryCountEdit.Text) then
1141 AddressHistoryCountEdit.Text := '100';
1144 procedure TOptionDialog.PreviewWaitEditExit(Sender: TObject);
1146 if not GikoSys.IsNumeric(PreviewWaitEdit.Text) then
1147 PreviewWaitEdit.Text := '500';
1148 if StrToInt(PreviewWaitEdit.Text) < 500 then
1149 PreviewWaitEdit.Text := '500';
1150 if StrToInt(PreviewWaitEdit.Text) > 9999 then
1151 PreviewWaitEdit.Text := '9999';
1154 procedure TOptionDialog.RecvBufferSizeExit(Sender: TObject);
1156 if not GikoSys.IsNumeric(RecvBufferSize.Text) then
1157 RecvBufferSize.Text := '4096';
1158 if StrToInt(RecvBufferSize.Text) < 256 then
1159 RecvBufferSize.Text := '4096';
1162 procedure TOptionDialog.CSSCheckBoxClick(Sender: TObject);
1164 CSSListLabel.Enabled := CSSCheckBox.Checked;
1165 CSSListView.Enabled := CSSCheckBox.Checked;
1168 procedure TOptionDialog.PostTimeEditExit(Sender: TObject);
1170 if not GikoSys.IsNumeric(PostTimeEdit.Text) then
1171 PostTimeEdit.Text := '0';
1174 procedure TOptionDialog.PostTimeCheckBoxClick(Sender: TObject);
1176 PostTimeLabel.Enabled := PostTimeCheckBox.Checked;
1177 PostTimeEdit.Enabled := PostTimeCheckBox.Checked;
1178 PutPostTimeRadioButton.Enabled := PostTimeCheckBox.Checked;
1179 BackPostTimeRadioButton.Enabled := PostTimeCheckBox.Checked;
1181 procedure TOptionDialog.SetAbonpropertys;
1184 GikoSys.FAbon.Deleterlo := RloCheckBox.Checked;
1185 GikoSys.FAbon.Replaceul := ReplaceulCheckBox.Checked;
1186 GikoSys.FAbon.AbonPopupRes := PopUpAbonCheckBox.Checked;
1187 GikoSys.FAbon.ReturnNGwordLineNum := ShowNGLineCheckBox.Checked;
1188 GikoSys.FAbon.SetNGResAnchor := AddResAnchorCheckBox.Checked;
1190 procedure TOptionDialog.CSSFontButtonClick(Sender: TObject);
1193 FontDialog.Options := [fdAnsiOnly, fdEffects];
1194 FontDialog.Font.Assign(FCSSFont);
1195 if FontDialog.Execute then begin
1196 FontDialog.Font.Style := FontDialog.Font.Style - [fsUnderline] - [fsStrikeout];
1197 FCSSFont := FontDialog.Font;
1204 procedure TOptionDialog.CSSBackColorButtonClick(Sender: TObject);
1207 ColorDialog.Color := FCSSBackColor;
1208 if ColorDialog.Execute then begin
1209 FCSSBackColor := ColorDialog.Color;
1216 procedure TOptionDialog.CSSFontCheckBoxClick(Sender: TObject);
1219 CSSFontButton.Enabled := CSSFontCheckBox.Checked;
1224 procedure TOptionDialog.CSSBackColorCheckBoxClick(Sender: TObject);
1227 CSSBackColorButton.Enabled := CSSBackColorCheckBox.Checked;
1232 procedure TOptionDialog.CSSSetContent(Content: string);
1236 if CSSBrowser.Document <> nil then begin
1237 doc := CSSBrowser.Document;
1240 doc.charset := 'Shift_JIS';
1246 procedure TOptionDialog.CSSPreview;
1249 ThreadItem: TThreadItem;
1252 Res: array [0..1] of TResRec;
1253 UserOptionalStyle: string;
1258 fileName := GikoSys.Setting.CSSFileName;
1260 GikoSys.Setting.CSSFileName := 'default.css';
1261 if CSSListView.Items.Count > 0 then begin
1263 if CSSListView.ItemIndex >= 0 then begin
1264 if CSSListView.Items[CSSListView.ItemIndex].Data <> nil then
1265 GikoSys.Setting.CSSFileName := string( CSSListView.Items[CSSListView.ItemIndex].data )
1267 GikoSys.Setting.CSSFileName := CSSListView.Items[CSSListView.ItemIndex].Caption + '.css';
1273 Board := TBoard.Create;
1274 ThreadItem := TThreadItem.Create;
1277 Board.URL := 'about://sample/';
1278 Board.Title := '
\83T
\83\93\83v
\83\8b\94Â';
1279 ThreadItem.ParentBoard := Board;
1280 ThreadItem.AllResCount := High( Res );
1281 ThreadItem.NewResCount := 1;
1282 ThreadItem.NewReceive := 2;
1284 sTitle := '
\83T
\83\93\83v
\83\8b\83v
\83\8c\83r
\83\85\81[';
1286 Res[0].FName := '
\96¼
\96³
\82µ
\82³
\82ñ';
1287 Res[0].FMailTo := 'sage';
1288 Res[0].FDateTime := 'ID:Sample';
1289 Res[0].FBody := 'CSS
\82Æ
\83X
\83L
\83\93\82Ì
\83T
\83\93\83v
\83\8b';
1290 Res[1].FName := '
\96¼
\96³
\82µ
\82³
\82ñ';
1291 Res[1].FMailTo := 'age';
1292 Res[1].FDateTime := 'ID:Sample';
1293 Res[1].FBody := '
\83I
\83}
\83G
\83\82\83i
\81[';
1295 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
1296 if CSSFontCheckBox.Checked then begin
1297 i := ColorToRGB( FCSSFont.Color );
1298 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
1300 UserOptionalStyle := UserOptionalStyle +
1301 'font-family:"' + FCSSFont.Name + '";' +
1302 'font-size:' + IntToStr( FCSSFont.Size ) + 'pt;' +
1303 'color:#' + IntToHex( i, 6 ) + ';';
1304 if fsBold in FCSSFont.Style then
1305 UserOptionalStyle := UserOptionalStyle + 'font-weight:bold;'
1307 UserOptionalStyle := UserOptionalStyle + 'font-weight:normal;';
1308 if fsItalic in FCSSFont.Style then
1309 UserOptionalStyle := UserOptionalStyle + 'font-style:italic;'
1311 UserOptionalStyle := UserOptionalStyle + 'font-style:normal;';
1313 if CSSBackColorCheckBox.Checked then begin
1314 i := ColorToRGB( FCSSBackColor );
1315 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
1317 UserOptionalStyle := UserOptionalStyle +
1318 'background-color:#' + IntToHex( i, 6 ) + ';';
1321 if FileExists( GikoSys.GetSkinHeaderFileName ) then begin
1323 GikoSys.LoadFromSkin( GikoSys.GetSkinHeaderFileName, ThreadItem, sTitle, 0 ) +
1324 '<a name="top"></a>' +
1325 GikoSys.SkinedRes( GikoSYs.LoadFromSkin( GikoSys.GetSkinResFileName, ThreadItem, sTitle, 0 ), Res[0], '1' ) +
1326 GikoSys.SkinedRes( GikoSYs.LoadFromSkin( GikoSys.GetSkinNewResFileName, ThreadItem, sTitle, 0 ), Res[1], '2' ) +
1327 '<a name="bottom"></a>' +
1328 GikoSys.LoadFromSkin( GikoSys.GetSkinFooterFileName, ThreadItem, sTitle, 0 );
1330 html := StringReplace( html, '</head>',
1331 '<style type="text/css">body {' + UserOptionalStyle + '}</style></head>', [rfReplaceAll] );
1335 '<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">' +
1336 '<title>' + sTitle + '</title>' +
1337 '<link rel="stylesheet" href="' + GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName + '" type="text/css">' +
1338 '<style type="text/css">body {' + UserOptionalStyle + '}</style>' +
1340 '<div class="title">' + sTitle + '</div>';
1342 for i := 0 to High( Res ) do
1345 '<div class="header"><span class="no">' + IntToStr( i + 1 ) + '</span>' +
1346 '<span class="name_label">
\96¼
\91O
\81F </span>' +
1347 '<a class="name_mail" href="mailto:' + Res[i].FMailTo + '">' +
1348 '<b>' + Res[i].FName + '</b></a><span class="mail"> [' + Res[i].FMailTo + ']</span>' +
1349 '<span class="date_label">
\93\8a\8de
\93ú
\81F</span>' +
1350 '<span class="date"> ' + Res[i].FDateTime+ '</span></div>' +
1351 '<div class="mes">' + Res[i].FBody + ' </div>';
1354 html := html + '</body></html>';
1358 CSSSetContent( html );
1365 GikoSys.Setting.CSSFileName := fileName;
1370 procedure TOptionDialog.CSSListViewChange(Sender: TObject; Item: TListItem;
1371 Change: TItemChange);
1374 if OptionTab.ActivePage = CSSTabSheet then
1379 procedure TOptionDialog.AddURLButtonClick(Sender: TObject);
1381 BoardURLComboBox.Items.Append(BoardURLComboBox.Text);
1384 procedure TOptionDialog.RemoveURLButtonClick(Sender: TObject);
1386 BoardURLComboBox.DeleteSelected;