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;
68 CabinetFontBotton: TButton;
69 CabinetColorBotton: TButton;
70 CabinetDefaultButton: TButton;
73 ListFontBotton: TButton;
74 ListColorBotton: TButton;
75 ListDefaultBotton: TButton;
76 HintFontButton: TButton;
77 HintBackButton: TButton;
78 HintDefaultButton: TButton;
81 EditorFontBotton: TButton;
82 EditorColorBotton: TButton;
83 EditorDefaultBotton: TButton;
84 BrowserTabMemo: TMemo;
85 BruwserTabFontButton: TButton;
86 BrowserTabDefaultButton: TButton;
91 URLAppCheckBox: TCheckBox;
92 AppFolderLabel: TLabel;
94 AppFolderButton: TButton;
95 OpenMailerCheckBox: TCheckBox;
97 PopupPositionRadioGroup: TRadioGroup;
98 TabAddRadioGroup: TRadioGroup;
100 GroupBox7: TGroupBox;
101 URLDisplayCheckBox: TCheckBox;
104 TabStopAddressBarCheckBox: TCheckBox;
105 AddressHistoryCountEdit: TEdit;
106 LinkAddCheckBox: TCheckBox;
107 GroupBox8: TGroupBox;
108 PreviewVisibleCheckBox: TCheckBox;
109 PreviewSizeComboBox: TComboBox;
112 PreviewWaitEdit: TEdit;
114 ShowMailCheckBox: TCheckBox;
115 TabSheet3: TTabSheet;
116 GroupBox9: TGroupBox;
117 ThreadListIconCheckBox: TCheckBox;
118 NonAcquiredCountCheckBox: TCheckBox;
119 GroupBox6: TGroupBox;
120 LogDeleteMessageCheckBox: TCheckBox;
121 GroupBox10: TGroupBox;
122 UnActivePopupCheckBox: TCheckBox;
123 GroupBox11: TGroupBox;
124 RecvBufferSize: TEdit;
126 ProxyProtocolCheckBox: TCheckBox;
127 ProtocolCheckBox: TCheckBox;
135 CSSTabSheet: TTabSheet;
137 GroupBox12: TGroupBox;
138 CSSCheckBox: TCheckBox;
139 CSSListLabel: TLabel;
140 CSSListView: TListView;
141 GroupBox13: TGroupBox;
142 PostTimeCheckBox: TCheckBox;
146 PostTimeLabel: TLabel;
148 PutPostTimeRadioButton: TRadioButton;
149 BackPostTimeRadioButton: TRadioButton;
150 ResPopupBoldCheckBox: TCheckBox;
151 NGwordSheet: TTabSheet;
152 GroupBox14: TGroupBox;
153 RloCheckBox: TCheckBox;
154 ReplaceulCheckBox: TCheckBox;
155 PopUpAbonCheckBox: TCheckBox;
156 CSSBrowser: TWebBrowser;
157 CSSFontCheckBox: TCheckBox;
158 CSSBackColorCheckBox: TCheckBox;
159 CSSFontButton: TButton;
160 CSSBackColorButton: TButton;
161 ShowNGLineCheckBox: TCheckBox;
162 AddResAnchorCheckBox: TCheckBox;
163 ResRangeHoldCheckBox: TCheckBox;
164 BoardURLComboBox: TComboBox;
165 AddURLButton: TButton;
166 RemoveURLButton: TButton;
167 GroupBox15: TGroupBox;
168 ShowDialogForEndCheckBox: TCheckBox;
169 OddResNumCheckBox: TCheckBox;
170 OddResNumColorBox: TColorBox;
171 ForcedLoginCheckBox: TCheckBox;
172 ForcedLoginLabel: TLabel;
173 GroupBox16: TGroupBox;
174 CreationTimeLogsCheckBox: TCheckBox;
175 FutureThreadCheckBox: TCheckBox;
176 DeleteSyriaCheckBox: TCheckBox;
177 TabSheet4: TTabSheet;
178 SambaGroupBox: TGroupBox;
179 UseSambaCheckBox: TCheckBox;
181 ResAnchorGroupBox: TGroupBox;
182 ResAnchorCheckBox: TCheckBox;
183 AllTabCloseCheckBox: TCheckBox;
184 GroupBox5: TGroupBox;
185 BrowserMaxLabel: TLabel;
186 BrowserMaxCombo: TComboBox;
187 GroupBox17: TGroupBox;
188 SelectIntervalLabel: TLabel;
189 SelectIntervalEdit: TEdit;
192 TabAutoSaveLoad: TGroupBox;
193 TabLoadSave: TCheckBox;
194 ResRangeHoldComboBox: TComboBox;
195 GroupBox18: TGroupBox;
196 DatOchiSortCombo: TComboBox;
197 procedure FormCreate(Sender: TObject);
198 procedure FormDestroy(Sender: TObject);
199 procedure ApplyButtonClick(Sender: TObject);
200 procedure CabinetFontBottonClick(Sender: TObject);
201 procedure CabinetColorBottonClick(Sender: TObject);
202 procedure EditorFontBottonClick(Sender: TObject);
203 procedure OkBottonClick(Sender: TObject);
204 procedure ReadProxyCheckClick(Sender: TObject);
205 procedure ListFontBottonClick(Sender: TObject);
206 procedure ListColorBottonClick(Sender: TObject);
207 procedure EditorColorBottonClick(Sender: TObject);
208 procedure CabinetDefaultButtonClick(Sender: TObject);
209 procedure ReadPortEditExit(Sender: TObject);
210 procedure ListDefaultBottonClick(Sender: TObject);
211 procedure EditorDefaultBottonClick(Sender: TObject);
212 procedure HintFontButtonClick(Sender: TObject);
213 procedure HintBackButtonClick(Sender: TObject);
214 procedure HintDefaultButtonClick(Sender: TObject);
215 procedure LogFolderButtonClick(Sender: TObject);
216 procedure FormClose(Sender: TObject; var Action: TCloseAction);
217 procedure SoundReferButtonClick(Sender: TObject);
218 procedure SoundPlayButtonClick(Sender: TObject);
219 procedure SoundListViewChanging(Sender: TObject; Item: TListItem;
220 Change: TItemChange; var AllowChange: Boolean);
221 procedure SoundFileEditChange(Sender: TObject);
222 procedure OptionTabChange(Sender: TObject);
223 procedure AppFolderButtonClick(Sender: TObject);
224 procedure WriteProxyCheckClick(Sender: TObject);
225 procedure WritePortEditExit(Sender: TObject);
226 procedure Tora3URLLabelClick(Sender: TObject);
227 procedure HotKeyEnter(Sender: TObject);
228 procedure HotKeyExit(Sender: TObject);
229 procedure URLAppCheckBoxClick(Sender: TObject);
230 procedure BruwserTabFontButtonClick(Sender: TObject);
231 procedure BrowserTabDefaultButtonClick(Sender: TObject);
232 procedure AddressHistoryCountEditExit(Sender: TObject);
233 procedure PreviewWaitEditExit(Sender: TObject);
234 procedure RecvBufferSizeExit(Sender: TObject);
235 procedure CSSCheckBoxClick(Sender: TObject);
236 procedure PostTimeEditExit(Sender: TObject);
237 procedure PostTimeCheckBoxClick(Sender: TObject);
238 procedure CSSFontButtonClick(Sender: TObject);
239 procedure CSSBackColorButtonClick(Sender: TObject);
240 procedure CSSFontCheckBoxClick(Sender: TObject);
241 procedure CSSBackColorCheckBoxClick(Sender: TObject);
242 procedure CSSListViewChange(Sender: TObject; Item: TListItem;
243 Change: TItemChange);
244 procedure AddURLButtonClick(Sender: TObject);
245 procedure RemoveURLButtonClick(Sender: TObject);
246 procedure OddResNumCheckBoxClick(Sender: TObject);
247 procedure ResRangeHoldCheckBoxClick(Sender: TObject);
251 FRepaintList: Boolean;
252 FRepaintThread: Boolean;
254 FCSSBackColor: TColor;
255 FCSSStrings: TStringList;
256 function GetMemoText(font: TFont; text: string): string;
257 // function GetFontText(Font: TFont; Text: string): string;
259 // procedure SaveSetting;
260 procedure SettingApply;
261 function CheckFolder: Boolean;
262 procedure SetAbonpropertys;
263 procedure CSSSetContent(Content: string);
264 procedure CSSPreview;
267 TabAddRadio: Integer;
268 procedure SaveSetting;
269 property TabAddPro: TRadioGroup read TabAddRadioGroup write TabAddRadioGroup;
270 property TabAutoLoadSave: TCheckBox read TabLoadSave write TabLoadSave;
274 OptionDialog: TOptionDialog;
279 Giko, Editor, Setting, ActnList;
282 FONT_TEXT: string = '%s %d pt';
283 MEMO_CABINET: string = '
\83L
\83\83\83r
\83l
\83b
\83g';
284 MEMO_THREAD: string = '
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g';
285 MEMO_BROWSERPOPUP: string = '
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v';
286 MEMO_BROWSERTAB: string = '
\83u
\83\89\83E
\83U
\83^
\83u';
287 MEMO_EDITOR: string = '
\83G
\83f
\83B
\83^
\83e
\83L
\83X
\83g';
288 DEFAULT_FONT_NAME: string = '
\82l
\82r
\82o
\83S
\83V
\83b
\83N';
289 DEFAULT_FONT_SIZE: Integer = 9;
290 DEFAULT_TABFONT_NAME: string = '
\82l
\82r
\82o
\83S
\83V
\83b
\83N';
291 DEFAULT_TABFONT_SIZE: Integer = 9;
292 URL_TORA3: WideString = 'http://2ch.tora3.net/';
296 procedure TOptionDialog.FormCreate(Sender: TObject);
299 CSSBrowser.Navigate('about:blank');
302 OptionTab.ActivePage := ConnectSheet;
305 CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET);
306 ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD);
307 HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP);
308 BrowserTabMemo.Text := GetMemoText(BrowserTabMemo.Font, MEMO_BROWSERTAB);
309 EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR);
311 Tora3URLLabel.Cursor := 5;
312 lblSFont.Caption := '
\81\9a\8fd
\97v
\81\9a'#13#10#13#10
313 + '
\83X
\83\8c\83b
\83h
\95\
\8e¦
\83G
\83\8a\83A
\82Ì
\83t
\83H
\83\93\83g
\95Ï
\8dX
\82Í
\81A'#13#10
314 + '
\81uCSS
\82Æ
\83X
\83L
\83\93\81v
\83^
\83u
\82Å
\90Ý
\92è
\8fo
\97\88\82Ü
\82·';
316 ForcedLoginLabel.Caption := '-
\83`
\83F
\83b
\83N
\82ð
\93ü
\82ê
\82é
\82Ì
\82Í
\83Z
\83L
\83\85\83\8a\83e
\83B
\8fã
\8dD
\82Ü
\82µ
\82
\82 \82è
\82Ü
\82¹
\82ñ
\81B' + #13#10
317 + '
\81@
\82â
\82Þ
\82ð
\93¾
\82È
\82¢
\8e\9e\82¾
\82¯
\82É
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
318 CSSCheckBoxClick(Sender);
319 PostTimeCheckBoxClick(Sender);
320 BrowserMaxLabel.Caption :=
321 '
\83u
\83\89\83E
\83U
\82ª
\8dÅ
\8f¬
\89»
\82³
\82ê
\82Ä
\82¢
\82é
\82Æ
\82«
\82É
\88È
\89º
\82Ì
\91\80\8dì
\82Å
\83u
\83\89\83E
\83U
\82ð
\8dÅ
\91å
\89»
\82µ
\82Ü
\82·
\81B'#13#10 +
322 '
\82Ü
\82½
\81A
\83z
\83C
\81[
\83\8b\83N
\83\8a\83b
\83N
\82É
\82æ
\82è
\8dÅ
\91å
\89»
\82ð
\83L
\83\83\83\93\83Z
\83\8b\82·
\82é
\82±
\82Æ
\82ª
\8fo
\97\88\82Ü
\82·
\81B';
324 if OptionTab.PageCount > GikoSys.Setting.OptionDialogTabIndex then begin
325 OptionTab.ActivePageIndex := GikoSys.Setting.OptionDialogTabIndex;
326 OptionTabChange( nil );
331 procedure TOptionDialog.FormDestroy(Sender: TObject);
333 CSSListView.OnChange := nil;
334 if FCSSStrings <> nil then
336 if FCSSFont <> nil then
338 sndPlaySound(nil, SND_ASYNC);
342 procedure TOptionDialog.OkBottonClick(Sender: TObject);
345 RecvBufferSizeExit(Sender);
346 ReadPortEditExit(Sender);
347 WritePortEditExit(Sender);
348 AddressHistoryCountEditExit(Sender);
349 PreviewWaitEditExit(Sender);
350 PostTimeEditExit(Sender);
352 if not CheckFolder then begin
362 procedure TOptionDialog.ApplyButtonClick(Sender: TObject);
364 RecvBufferSizeExit(Sender);
365 ReadPortEditExit(Sender);
366 WritePortEditExit(Sender);
367 AddressHistoryCountEditExit(Sender);
368 PreviewWaitEditExit(Sender);
369 PostTimeEditExit(Sender);
371 if not CheckFolder then begin
381 //function TOptionDialog.GetFontText(Font: TFont; Text: string): string;
383 // result := Format(Text, [Font.Name, Font.Size]);
386 function TOptionDialog.GetMemoText(font: TFont; text: string): string;
392 s := Format(FONT_TEXT, [Font.Name, Font.Size]) + #13#10;
396 //
\83L
\83\83\83r
\83l
\83b
\83g
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
397 procedure TOptionDialog.CabinetFontBottonClick(Sender: TObject);
399 FontDialog.Options := [fdAnsiOnly, fdEffects];
400 FontDialog.Font.Assign(CabinetMemo.Font);
401 if FontDialog.Execute then begin
402 FontDialog.Font.Style := FontDialog.Font.Style - [fsUnderline] - [fsStrikeout];
403 CabinetMemo.Font.Assign(FontDialog.Font);
404 CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET);
405 CabinetMemo.Font.Charset := SHIFTJIS_CHARSET;
409 //
\83L
\83\83\83r
\83l
\83b
\83g
\94w
\8ci
\90F
\83{
\83^
\83\93
410 procedure TOptionDialog.CabinetColorBottonClick(Sender: TObject);
412 ColorDialog.Color := CabinetMemo.Color;
413 if ColorDialog.Execute then begin
414 CabinetMemo.Color := ColorDialog.Color;
418 //
\83L
\83\83\83r
\83l
\83b
\83g
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
419 procedure TOptionDialog.CabinetDefaultButtonClick(Sender: TObject);
421 CabinetMemo.Font.Name := DEFAULT_FONT_NAME;
422 CabinetMemo.Font.Size := DEFAULT_FONT_SIZE;
423 CabinetMemo.Font.Color := clWindowText;
424 CabinetMemo.Font.Style := [];
425 CabinetMemo.Color := clWindow;
426 CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET);
429 //
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
430 procedure TOptionDialog.ListFontBottonClick(Sender: TObject);
432 FontDialog.Options := [fdAnsiOnly, fdEffects];
433 FontDialog.Font.Assign(ListMemo.Font);
434 if FontDialog.Execute then begin
435 ListMemo.Font.Assign(FontDialog.Font);
436 ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD);
437 ListMemo.Font.Charset := SHIFTJIS_CHARSET;
441 //
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g
\94w
\8ci
\90F
\83{
\83^
\83\93
442 procedure TOptionDialog.ListColorBottonClick(Sender: TObject);
444 ColorDialog.Color := ListMemo.Color;
445 if ColorDialog.Execute then begin
446 ListMemo.Color := ColorDialog.Color;
450 //
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
451 procedure TOptionDialog.ListDefaultBottonClick(Sender: TObject);
453 ListMemo.Font.Name := DEFAULT_FONT_NAME;
454 ListMemo.Font.Size := DEFAULT_FONT_SIZE;
455 ListMemo.Font.Color := clWindowText;
456 ListMemo.Font.Style := [];
457 ListMemo.Color := clWindow;
458 ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD);
461 //
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
462 procedure TOptionDialog.HintFontButtonClick(Sender: TObject);
464 FontDialog.Options := [fdAnsiOnly, fdEffects];
465 FontDialog.Font.Assign(HintMemo.Font);
466 if FontDialog.Execute then begin
467 HintMemo.Font.Assign(FontDialog.Font);
468 HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP);
469 HintMemo.Font.Charset := SHIFTJIS_CHARSET;
473 //
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v
\94w
\8ci
\90F
\83{
\83^
\83\93
474 procedure TOptionDialog.HintBackButtonClick(Sender: TObject);
476 ColorDialog.Color := HintMemo.Color;
477 if ColorDialog.Execute then begin
478 HintMemo.Color := ColorDialog.Color;
482 //
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
483 procedure TOptionDialog.HintDefaultButtonClick(Sender: TObject);
485 HintMemo.Font.Name := DEFAULT_FONT_NAME;
486 HintMemo.Font.Size := DEFAULT_FONT_SIZE;
487 HintMemo.Font.Color := clWindowText;
488 HintMemo.Font.Style := [];
489 HintMemo.Color := clInfoBk;
490 HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP);
493 //
\83u
\83\89\83E
\83U
\83^
\83u
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
494 procedure TOptionDialog.BruwserTabFontButtonClick(Sender: TObject);
496 FontDialog.Options := [fdAnsiOnly];
497 FontDialog.Font.Assign(BrowserTabMemo.Font);
498 if FontDialog.Execute then begin
499 BrowserTabMemo.Font.Assign(FontDialog.Font);
500 BrowserTabMemo.Text := GetMemoText(FontDialog.Font, MEMO_BROWSERTAB);
501 BrowserTabMemo.Font.Charset := SHIFTJIS_CHARSET;
505 //
\83u
\83\89\83E
\83U
\83^
\83u
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
506 procedure TOptionDialog.BrowserTabDefaultButtonClick(Sender: TObject);
508 BrowserTabMemo.Font.Name := DEFAULT_TABFONT_NAME;
509 BrowserTabMemo.Font.Size := DEFAULT_TABFONT_SIZE;
510 BrowserTabMemo.Font.Color := clWindowText;
511 BrowserTabMemo.Font.Style := [];
512 BrowserTabMemo.Color := clBtnFace;
513 BrowserTabMemo.Text := GetMemoText(BrowserTabMemo.Font, MEMO_BROWSERTAB);
516 //
\83G
\83f
\83B
\83^
\83t
\83H
\83\93\83g
\83{
\83^
\83\93
517 procedure TOptionDialog.EditorFontBottonClick(Sender: TObject);
519 FontDialog.Options := [fdAnsiOnly, fdEffects];
520 FontDialog.Font.Assign(EditorMemo.Font);
521 if FontDialog.Execute then begin
522 EditorMemo.Font.Assign(FontDialog.Font);
523 EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR);
524 EditorMemo.Font.Charset := SHIFTJIS_CHARSET;
528 //
\83G
\83f
\83B
\83^
\94w
\8ci
\90F
\83{
\83^
\83\93
529 procedure TOptionDialog.EditorColorBottonClick(Sender: TObject);
531 ColorDialog.Color := EditorMemo.Font.Color;
532 if ColorDialog.Execute then begin
533 EditorMemo.Color := ColorDialog.Color;
537 //
\83G
\83f
\83B
\83^
\83f
\83t
\83H
\83\8b\83g
\83{
\83^
\83\93
538 procedure TOptionDialog.EditorDefaultBottonClick(Sender: TObject);
540 EditorMemo.Font.Name := DEFAULT_FONT_NAME;
541 EditorMemo.Font.Size := DEFAULT_FONT_SIZE;
542 EditorMemo.Font.Color := clWindowText;
543 EditorMemo.Font.Style := [];
544 EditorMemo.Color := clWindow;
545 EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR);
548 procedure TOptionDialog.SetValue;
554 FileList: TStringList;
556 //
\8eó
\90M
\83o
\83b
\83t
\83@
\83T
\83C
\83Y
557 RecvBufferSize.Text := IntToStr(Gikosys.Setting.RecvBufferSize);
559 ProtocolCheckBox.Checked := GikoSys.Setting.Protocol;
560 //
\83v
\83\8d\83L
\83V
\90Ú
\91±HTTP1.1
\8eg
\97p
561 ProxyProtocolCheckBox.Checked := Gikosys.Setting.ProxyProtocol;
563 //
\93Ç
\82Ý
\8d\9e\82Ý
\97p
\83v
\83\8d\83L
\83V
564 ReadProxyCheck.Checked := GikoSys.Setting.ReadProxy;
565 ReadProxyCheckClick(nil);
566 ReadProxyAddressEdit.Text := GikoSys.Setting.ReadProxyAddress;
567 ReadPortEdit.Text := IntToStr(GikoSys.Setting.ReadProxyPort);
568 ReadProxyUserIDEdit.Text := GikoSys.Setting.ReadProxyUserID;
569 ReadProxyPasswordEdit.Text := GikoSys.Setting.ReadProxyPassword;
570 //
\8f\91\82«
\8d\9e\82Ý
\97p
\83v
\83\8d\83L
\83V
571 WriteProxyCheck.Checked := GikoSys.Setting.WriteProxy;
572 WriteProxyCheckClick(nil);
573 WriteProxyAddressEdit.Text := GikoSys.Setting.WriteProxyAddress;
574 WritePortEdit.Text := IntToStr(GikoSys.Setting.WriteProxyPort);
575 WriteProxyUserIDEdit.Text := GikoSys.Setting.WriteProxyUserID;
576 WriteProxyPasswordEdit.Text := GikoSys.Setting.WriteProxyPassword;
577 //
\83L
\83\83\83r
\83l
\83b
\83g
\83t
\83H
\83\93\83g
578 CabinetMemo.Font.Name := GikoSys.Setting.CabinetFontName;
579 CabinetMemo.Font.Size := GikoSys.Setting.CabinetFontSize;
580 CabinetMemo.Font.Color := GikoSys.Setting.CabinetFontColor;
581 CabinetMemo.Color := GikoSys.Setting.CabinetBackColor;
582 //
\83X
\83\8c\83b
\83h
\83\8a\83X
\83g
\83t
\83H
\83\93\83g
583 ListMemo.Font.Name := GikoSys.Setting.ListFontName;
584 ListMemo.Font.Size := GikoSys.Setting.ListFontSize;
585 ListMemo.Font.Color := GikoSys.Setting.ListFontColor;
586 ListMemo.Color := GikoSys.Setting.ListBackColor;
587 //
\83\8c\83X
\90\94\91\9d\8c¸
\83X
\83\8c\8b
\92²
\95\
\8e¦
\83`
\83F
\83b
\83N
\83{
\83b
\83N
\83X
\81\95\83J
\83\89\81[
\83_
\83C
\83A
\83\8d\83O
588 OddResNumCheckBox.Checked := GikoSys.Setting.UseOddColorOddResNum;
589 OddResNumColorBox.Selected := GikoSys.Setting.OddColor;
590 OddResNumColorBox.Enabled := OddResNumCheckBox.Checked;
592 //
\83u
\83\89\83E
\83U
\83|
\83b
\83v
\83A
\83b
\83v
\83t
\83H
\83\93\83g
593 HintMemo.Font.Name := GikoSys.Setting.HintFontName;
594 HintMemo.Font.Size := GikoSys.Setting.HintFontSize;
595 HintMemo.Font.Color := GikoSys.Setting.HintFontColor;
596 HintMemo.Color := GikoSys.Setting.HintBackColor;
597 //
\83u
\83\89\83E
\83U
\83^
\83u
\83t
\83H
\83\93\83g
598 BrowserTabMemo.Font.Name := GikoSys.Setting.BrowserTabFontName;
599 BrowserTabMemo.Font.Size := GikoSys.Setting.BrowserTabFontSize;
600 BrowserTabMemo.Font.Style := [];
601 if GikoSys.Setting.BrowserTabFontBold then
602 BrowserTabMemo.Font.Style := BrowserTabMemo.Font.Style + [fsBold];
603 if GikoSys.Setting.BrowserTabFontItalic then
604 BrowserTabMemo.Font.Style := BrowserTabMemo.Font.Style + [fsItalic];
605 //
\83G
\83f
\83B
\83^
\83\81\83\82\83t
\83H
\83\93\83g
606 EditorMemo.Font.Name := GikoSys.Setting.EditorFontName;
607 EditorMemo.Font.Size := GikoSys.Setting.EditorFontSize;
608 EditorMemo.Font.Color := GikoSys.Setting.EditorFontColor;
609 EditorMemo.Color := GikoSys.Setting.EditorBackColor;
611 CSSCheckBox.Checked := GikoSys.Setting.UseCSS;
612 if FCSSFont <> nil then
614 FCSSFont := TFont.Create;
615 if (GikoSys.Setting.BrowserFontName <> '') or
616 (GikoSys.Setting.BrowserFontSize <> 0) or
617 (GikoSys.Setting.BrowserFontBold <> 0) or
618 (GikoSys.Setting.BrowserFontItalic <> 0) or
619 (GikoSys.Setting.BrowserFontColor <> -1 ) then begin
620 CSSFontCheckBox.Checked := True;
621 FCSSFont.Name := GikoSys.Setting.BrowserFontName;
622 FCSSFont.Size := GikoSys.Setting.BrowserFontSize;
623 FCSSFont.Style := [];
624 if GikoSys.Setting.BrowserFontBold = 1 then
625 FCSSFont.Style := FCSSFont.Style + [fsBold];
626 if GikoSys.Setting.BrowserFontItalic = 1 then
627 FCSSFont.Style := FCSSFont.Style + [fsItalic];
628 i := GikoSys.Setting.BrowserFontColor;
629 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
632 if GikoSys.Setting.BrowserBackColor <> -1 then begin
633 CSSBackColorCheckBox.Checked := True;
635 i := GikoSys.Setting.BrowserBackColor;
636 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
640 //
\83X
\83^
\83C
\83\8b\83V
\81[
\83g
\83t
\83@
\83C
\83\8b\96¼
\88ê
\97\97
641 FileList := TStringList.Create;
643 GikoSys.GetFileList(GikoSys.GetStyleSheetDir, '*.css', FileList, True, True);
645 Idx := Length(GikoSys.GetStyleSheetDir);
646 for i := 0 to FileList.Count - 1 do
647 FileList[i] := Copy(FileList[i], Idx + 1, Length(FileList[i]));
649 for i := 0 to FileList.Count - 1 do begin
650 //s := ExtractFileName(FileList[i]);
651 if LowerCase(FileList[i]) = 'default.css' then
652 Item := CSSListView.Items.Insert(0)
654 Item := CSSListView.Items.Add;
655 Item.Caption := ChangeFileExt(FileList[i], '');
656 if LowerCase(FileList[i]) = LowerCase(GikoSys.Setting.CSSFileName) then
657 Item.Selected := True;
662 //
\83X
\83L
\83\93\83t
\83@
\83C
\83\8b\96¼
\88ê
\97\97
663 //FileList := TStringList.Create;
664 if FCSSStrings <> nil then
666 FCSSStrings := TStringList.Create;
668 //GikoSys.GetDirectoryList(GikoSys.GetSkinDir, '*', FileList, False);
669 GikoSys.GetDirectoryList(GikoSys.GetSkinDir, '*', FCSSStrings, False);
671 Idx := Length(GikoSys.GetSkinDir);
674 //for i := 0 to FileList.Count - 1 do begin
675 for i := 0 to FCSSStrings.Count - 1 do begin
676 //s := ExtractFileName(FileList[i]);
677 Item := CSSListView.Items.Add;
678 {Item.Data := PChar( FileList[i] );
679 Item.Caption := Copy( FileList[i], Idx + 1, Length(FileList[i]) );
680 if LowerCase(FileList[i]) = LowerCase(GikoSys.Setting.CSSFileName) then
681 Item.Selected := True;
683 Item.Data := PChar( FCSSStrings[i] );
684 Item.Caption := Copy( FCSSStrings[i], Idx + 1, Length(FCSSStrings[i]) );
685 if LowerCase(FCSSStrings[i]) = LowerCase(GikoSys.Setting.CSSFileName) then
686 Item.Selected := True;
689 // 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`
693 if (CSSListView.ItemIndex = -1) and (CSSListView.Items.Count > 0) then
694 CSSListView.Items[0].Selected := True;
697 ShowMailCheckBox.Checked := GikoSys.Setting.ShowMail;
699 //
\8bN
\93®
\8e\9e\83\8c\83X
\95\
\8e¦
\94Í
\88Í
\82Ì
\8cÅ
\92è
700 ResRangeHoldCheckBox.Checked := GikoSys.Setting.ResRangeHold;
701 case GikoSys.Setting.ResRange of
702 Ord( grrAll ): ResRangeHoldComboBox.ItemIndex := 0;
703 Ord( grrKoko ): ResRangeHoldComboBox.ItemIndex := 2;
704 Ord( grrNew ): ResRangeHoldComboBox.ItemIndex := 3;
705 100: ResRangeHoldComboBox.ItemIndex := 1;
707 ResRangeHoldComboBox.Enabled := GikoSys.Setting.ResRangeHold;
708 //
\83^
\83u
\92Ç
\89Á
\88Ê
\92u
709 TabAddRadioGroup.ItemIndex := Ord(GikoSys.Setting.BrowserTabAppend);
711 //BoardURL2chEdit.Text := GikoSys.Setting.BoardURL2ch;
712 BoardURLComboBox.Clear;
713 BoardURLComboBox.Items.AddStrings(GikoSys.Setting.BoardURLs);
715 BoardURLComboBox.ItemIndex := GikoSys.Setting.BoardURLSelected - 1;
717 BoardURLComboBox.ItemIndex := 0;
720 UserIDEdit.Text := GikoSys.Setting.UserID;
721 PasswordEdit.Text := GikoSys.Setting.Password;
722 AutoLoginCheckBox.Checked := GikoSys.Setting.AutoLogin;
723 ForcedLoginCheckBox.Checked := GikoSys.Setting.ForcedLogin;
724 //
\83\8d\83O
\83t
\83H
\83\8b\83_
725 if GikoSys.Setting.NewLogFolder = '' then
726 LogFolderEdit.Text := GikoSys.Setting.LogFolder
728 LogFolderEdit.Text := GikoSys.Setting.NewLogFolder;
730 for i := 0 to GikoSys.Setting.GetSoundCount - 1 do begin
731 Item := SoundListView.Items.Add;
732 Item.Caption := GikoSys.Setting.SoundViewName[i];
733 if FileExists(GikoSys.Setting.SoundFileName[i]) then
734 Item.SubItems.Add(GikoSys.Setting.SoundFileName[i])
736 Item.SubItems.Add('');
738 //URL
\83N
\83\8a\83b
\83N
\8e\9e\93®
\8dì
739 URLAppCheckBox.Checked := GikoSys.Setting.URLApp;
740 URLAppCheckBoxClick(nil);
741 AppFolderEdit.Text := GikoSys.Setting.URLAppFile;
743 //mailto
\83N
\83\8a\83b
\83N
\8e\9e\93®
\8dì
744 OpenMailerCheckBox.Checked := GikoSys.Setting.OpenMailer;
746 //
\83\8d\83O
\8dí
\8f\9c\8e\9e\83\81\83b
\83Z
\81[
\83W
747 LogDeleteMessageCheckBox.Checked := GikoSys.Setting.DeleteMsg;
749 //
\8fI
\97¹
\8e\9e\8am
\94F
\83_
\83C
\83A
\83\8d\83O
750 ShowDialogForEndCheckBox.Checked := GikoSys.Setting.ShowDialogForEnd;
752 AllTabCloseCheckBox.Checked := GikoSys.Setting.ShowDialogForAllTabClose;
754 UseSambaCheckBox.Checked := GikoSys.Setting.UseSamba;
755 ResAnchorCheckBox.Checked := GikoSys.Setting.ResAnchorJamp;
756 //
\83u
\83\89\83E
\83U
\8dÅ
\91å
\89»
757 BrowserMaxCombo.ItemIndex := Ord( GikoSys.Setting.BrowserAutoMaximize );
758 //
\83|
\83b
\83v
\83A
\83b
\83v
\88Ê
\92u
759 case GikoSys.Setting.PopupPosition of
760 gppRightTop: PopupPositionRadioGroup.ItemIndex := 0;
761 gppRight: PopupPositionRadioGroup.ItemIndex := 1;
762 gppRightBottom: PopupPositionRadioGroup.ItemIndex := 2;
763 gppTop: PopupPositionRadioGroup.ItemIndex := 3;
764 gppCenter: PopupPositionRadioGroup.ItemIndex := 4;
765 gppBottom: PopupPositionRadioGroup.ItemIndex := 5;
766 gppLeftTop: PopupPositionRadioGroup.ItemIndex := 6;
767 gppLeft: PopupPositionRadioGroup.ItemIndex := 7;
768 gppLeftBottom: PopupPositionRadioGroup.ItemIndex := 8;
771 //
\94ñ
\83A
\83N
\83e
\83B
\83u
\8e\9e\83|
\83b
\83v
\83A
\83b
\83v
\95\
\8e¦
772 UnActivePopupCheckBox.Checked := GikoSys.Setting.UnActivePopup;
773 //
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\83{
\81[
\83\8b\83h
\95\
\8e¦
774 ResPopupBoldCheckBox.Checked := GikoSys.Setting.ResPopupHeaderBold;
776 //
\83A
\83h
\83\8c\83X
\83o
\81[
777 URLDisplayCheckBox.Checked := GikoSys.Setting.URLDisplay;
778 TabStopAddressBarCheckBox.Checked := GikoSys.Setting.AddressBarTabStop;
779 LinkAddCheckBox.Checked := GikoSys.Setting.LinkAddAddressBar;
780 AddressHistoryCountEdit.Text := IntToStr(GikoSys.Setting.AddressHistoryCount);
782 //HTML
\83v
\83\8c\83r
\83\85\81[
783 PreviewVisibleCheckBox.Checked := GikoSys.Setting.PreviewVisible;
784 PreviewWaitEdit.Text := IntToStr(GikoSys.Setting.PreviewWait);
785 PreviewSizeComboBox.ItemIndex := 2;
786 case GikoSys.Setting.PreviewSize of
787 gpsXLarge: PreviewSizeComboBox.ItemIndex := 4;
788 gpsLarge: PreviewSizeComboBox.ItemIndex := 3;
789 gpsMedium: PreviewSizeComboBox.ItemIndex := 2;
790 gpsSmall: PreviewSizeComboBox.ItemIndex := 1;
791 gpsXSmall: PreviewSizeComboBox.ItemIndex := 0;
794 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\8dX
\90V
\83A
\83C
\83R
\83\93
795 ThreadListIconCheckBox.Checked := GikoSys.Setting.ListIconVisible;
796 NonAcquiredCountCheckBox.Checked := GikoSys.Setting.NonAcquiredCount;
797 CreationTimeLogsCheckBox.Checked := GikoSys.Setting.CreationTimeLogs;
798 FutureThreadCheckBox.Checked := GikoSys.Setting.FutureThread;
799 SelectIntervalEdit.Text := IntToStr(GikoSys.Setting.SelectInterval);
801 //dat
\97\8e\82¿
\83X
\83\8c\83\
\81[
\83g
\8f\87
802 case GikoSys.Setting.DatOchiSortIndex of
804 if GikoSys.Setting.DatOchiSortOrder then
805 DatOchiSortCombo.ItemIndex := 1
807 DatOchiSortCombo.ItemIndex := 2;
809 if GikoSys.Setting.DatOchiSortOrder then
810 DatOchiSortCombo.ItemIndex := 3
812 DatOchiSortCombo.ItemIndex := 4;
814 if GikoSys.Setting.DatOchiSortOrder then
815 DatOchiSortCombo.ItemIndex := 5
817 DatOchiSortCombo.ItemIndex := 6;
819 DatOchiSortCombo.ItemIndex := 0;
822 //
\8f\91\82«
\8d\9e\82Ý
\8e\9e\83}
\83V
\83\93\8e\9e\8aÔ
\8eg
\97p
\90Ý
\92è
823 PostTimeCheckBox.Checked := GikoSys.Setting.UseMachineTime;
824 PostTimeEdit.Text := IntToStr(GikoSys.Setting.TimeAdjustSec);
825 if GikoSys.Setting.TimeAdjust then
826 PutPostTimeRadioButton.Checked := True
828 BackPostTimeRadioButton.Checked := True;
830 RloCheckBox.Checked := GikoSys.Setting.AbonDeleterlo;
831 ReplaceulCheckBox.Checked := GikoSys.Setting.AbonReplaceul;
832 PopUpAbonCheckBox.Checked := GikoSys.Setting.PopUpAbon;
833 ShowNGLineCheckBox.Checked := GikoSys.Setting.ShowNGLinesNum;
834 AddResAnchorCheckBox.Checked := GikoSys.Setting.AddResAnchor;
835 DeleteSyriaCheckBox.Checked := GikoSys.Setting.DeleteSyria;
838 TabLoadSave.Checked := Gikosys.Setting.TabAutoLoadSave;
842 procedure TOptionDialog.SaveSetting;
848 //
\8eó
\90M
\83o
\83b
\83t
\83@
\83T
\83C
\83Y
849 Gikosys.Setting.RecvBufferSize := StrToInt(RecvBufferSize.Text);
851 GikoSys.Setting.Protocol := ProtocolCheckBox.Checked;
852 //
\83v
\83\8d\83L
\83V
\90Ú
\91±HTTP1.1
\8eg
\97p
853 Gikosys.Setting.ProxyProtocol := ProxyProtocolCheckBox.Checked;
855 GikoSys.Setting.OptionDialogTabIndex := OptionTab.TabIndex;
857 GikoSys.Setting.ReadProxy := ReadProxyCheck.Checked;
858 GikoSys.Setting.ReadProxyAddress := ReadProxyAddressEdit.Text;
859 GikoSys.Setting.ReadProxyPort := StrToInt(ReadPortEdit.Text);
860 GikoSys.Setting.ReadProxyUserID := ReadProxyUserIDEdit.Text;
861 GikoSys.Setting.ReadProxyPassword := ReadProxyPasswordEdit.Text;
863 GikoSys.Setting.WriteProxy := WriteProxyCheck.Checked;
864 GikoSys.Setting.WriteProxyAddress := WriteProxyAddressEdit.Text;
865 GikoSys.Setting.WriteProxyPort := StrToInt(WritePortEdit.Text);
866 GikoSys.Setting.WriteProxyUserID := WriteProxyUserIDEdit.Text;
867 GikoSys.Setting.WriteProxyPassword := WriteProxyPasswordEdit.Text;
869 GikoSys.Setting.CabinetFontName := CabinetMemo.Font.Name;
870 GikoSys.Setting.CabinetFontSize := CabinetMemo.Font.Size;
871 GikoSys.Setting.CabinetFontColor := CabinetMemo.Font.Color;
872 GikoSys.Setting.CabinetBackColor := CabinetMemo.Color;
874 GikoSys.Setting.ListFontName := ListMemo.Font.Name;
875 GikoSys.Setting.ListFontSize := ListMemo.Font.Size;
876 GikoSys.Setting.ListFontColor := ListMemo.Font.Color;
877 GikoSys.Setting.ListBackColor := ListMemo.Color;
878 GikoSys.Setting.UseOddColorOddResNum := OddResNumCheckBox.Checked;
879 GikoSys.Setting.OddColor := OddResNumColorBox.Selected;
881 GikoSys.Setting.HintFontName := HintMemo.Font.Name;
882 GikoSys.Setting.HintFontSize := HintMemo.Font.Size;
883 GikoSys.Setting.HintFontColor := HintMemo.Font.Color;
884 GikoSys.Setting.HintBackColor := HintMemo.Color;
886 GikoSys.Setting.BrowserTabFontName := BrowserTabMemo.Font.Name;
887 GikoSys.Setting.BrowserTabFontSize := BrowserTabMemo.Font.Size;
889 GikoSys.Setting.EditorFontName := EditorMemo.Font.Name;
890 GikoSys.Setting.EditorFontSize := EditorMemo.Font.Size;
891 GikoSys.Setting.EditorFontColor := EditorMemo.Font.Color;
892 GikoSys.Setting.EditorBackColor := EditorMemo.Color;
893 {FRepaintThread :
\95\
\8e¦
\8dÏ
\82Ý
\83X
\83\8c\83b
\83h
\82Ì
\8dÄ
\95`
\89æ
\82ª
\95K
\97v
\82©
\82Ç
\82¤
\82©
894 \90Ý
\92è
\82ª
\95Ï
\82í
\82Á
\82Ä
\82¢
\82½
\8fê
\8d\87\81Atrue
\82É
\82µ
\82Ä
\8aù
\82É
\95\
\8e¦
\82µ
\82Ä
\82¢
\82é
\91S
\82Ä
\82Ì
895 \83X
\83\8c\83b
\83h
\82ÌRepaint
\82ðtrue
\82É
\82·
\82é
898 if GikoSys.Setting.UseCSS <> CSSCheckBox.Checked then FRepaintThread := true;
899 GikoSys.Setting.UseCSS := CSSCheckBox.Checked;
900 //CSS
\83t
\83@
\83C
\83\8b\96¼
901 tmp := GikoSys.Setting.CSSFileName;
902 GikoSys.Setting.CSSFileName := 'default.css';
903 if CSSListView.Items.Count > 0 then begin
905 if CSSListView.Items[CSSListView.ItemIndex].Data <> nil then
906 GikoSys.Setting.CSSFileName := string( CSSListView.Items[CSSListView.ItemIndex].data )
908 GikoSys.Setting.CSSFileName := CSSListView.Items[CSSListView.ItemIndex].Caption + '.css';
912 if tmp <> GikoSys.Setting.CSSFileName then FRepaintThread := true;
913 // CSS
\82Ì
\83t
\83H
\83\93\83g
\8ew
\92è
914 if CSSFontCheckBox.Checked then begin
915 if GikoSys.Setting.BrowserFontName <> FCSSFont.Name then FRepaintThread := true;
916 GikoSys.Setting.BrowserFontName := FCSSFont.Name;
917 if GikoSys.Setting.BrowserFontSize <> FCSSFont.Size then FRepaintThread := true;
918 GikoSys.Setting.BrowserFontSize := FCSSFont.Size;
919 if fsBold in FCSSFont.Style then begin
920 if GikoSys.Setting.BrowserFontBold <> 1 then FRepaintThread := true;
921 GikoSys.Setting.BrowserFontBold := 1;
923 if GikoSys.Setting.BrowserFontBold <> -1 then FRepaintThread := true;
924 GikoSys.Setting.BrowserFontBold := -1;
926 if fsItalic in FCSSFont.Style then begin
927 if GikoSys.Setting.BrowserFontItalic <> 1 then FRepaintThread := true;
928 GikoSys.Setting.BrowserFontItalic := 1;
930 if GikoSys.Setting.BrowserFontItalic <> -1 then FRepaintThread := true;
931 GikoSys.Setting.BrowserFontItalic := -1;
933 i := ColorToRGB( FCSSFont.Color );
934 if (GikoSys.Setting.BrowserFontColor <> (i shr 16) or (i and $ff00) or ((i and $ff) shl 16)) then
935 FRepaintThread := true;
936 GikoSys.Setting.BrowserFontColor := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
938 if GikoSys.Setting.BrowserFontName <> '' then FRepaintThread := true;
939 GikoSys.Setting.BrowserFontName := '';
940 if GikoSys.Setting.BrowserFontSize <> 0 then FRepaintThread := true;
941 GikoSys.Setting.BrowserFontSize := 0;
942 if GikoSys.Setting.BrowserFontBold <> 0 then FRepaintThread := true;
943 GikoSys.Setting.BrowserFontBold := 0;
944 if GikoSys.Setting.BrowserFontItalic <> 0 then FRepaintThread := true;
945 GikoSys.Setting.BrowserFontItalic := 0;
946 if GikoSys.Setting.BrowserFontColor <> -1 then FRepaintThread := true;
947 GikoSys.Setting.BrowserFontColor := -1;
949 if CSSBackColorCheckBox.Checked then begin
950 i := ColorToRGB( FCSSBackColor );
951 if(GikoSys.Setting.BrowserBackColor <> (i shr 16) or (i and $ff00) or ((i and $ff) shl 16)) then
952 FRepaintThread := true;
953 GikoSys.Setting.BrowserBackColor := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
955 if GikoSys.Setting.BrowserBackColor <> -1 then FRepaintThread := true;
956 GikoSys.Setting.BrowserBackColor := -1;
960 if GikoSys.Setting.ShowMail <> ShowMailCheckBox.Checked then FRepaintThread := true;
961 GikoSys.Setting.ShowMail := ShowMailCheckBox.Checked;
962 //
\8bN
\93®
\8e\9e\83\8c\83X
\95\
\8e¦
\94Í
\88Í
\82Ì
\8cÅ
\92è
963 GikoSys.Setting.ResRangeHold := ResRangeHoldCheckBox.Checked;
964 case ResRangeHoldComboBox.ItemIndex of
965 0: GikoSys.Setting.ResRange := Ord( grrAll );
966 1: GikoSys.Setting.ResRange := 100;
967 2: GikoSys.Setting.ResRange := Ord( grrKoko );
968 3: GikoSys.Setting.ResRange := Ord( grrNew );
971 GikoSys.Setting.BrowserTabAppend := TGikoTabAppend(TabAddRadioGroup.ItemIndex);
973 // GikoSys.Setting.BoardURL2ch := BoardURL2chEdit.Text;
974 GikoSys.Setting.BoardURLs.Clear;
975 GikoSys.Setting.BoardURLs.AddStrings(BoardURLComboBox.Items);
976 GikoSys.Setting.BoardURLSelected := BoardURLComboBox.ItemIndex + 1;
977 GikoSys.Setting.UserID := UserIDEdit.Text;
978 GikoSys.Setting.Password := PasswordEdit.Text;
979 GikoSys.Setting.AutoLogin := AutoLoginCheckBox.Checked;
980 GikoSys.Setting.ForcedLogin := ForcedLoginCheckBox.Checked;
981 GikoSys.Setting.URLApp := URLAppCheckBox.Checked;
982 GikoSys.Setting.URLAppFile := AppFolderEdit.Text;
984 GikoSys.Setting.OpenMailer := OpenMailerCheckBox.Checked;
985 GikoSys.Setting.DeleteMsg := LogDeleteMessageCheckBox.Checked;
986 //
\8fI
\97¹
\8e\9e\8am
\94F
\83_
\83C
\83A
\83\8d\83O
987 GikoSys.Setting.ShowDialogForEnd := ShowDialogForEndCheckBox.Checked;
989 GikoSys.Setting.ShowDialogForAllTabClose := AllTabCloseCheckBox.Checked;
991 GikoSys.Setting.UseSamba := UseSambaCheckBox.Checked;
992 GikoSys.Setting.ResAnchorJamp := ResAnchorCheckBox.Checked;
993 //
\83u
\83\89\83E
\83U
\8dÅ
\91å
\89»
994 GikoSys.Setting.BrowserAutoMaximize := TGikoBrowserAutoMaximize( BrowserMaxCombo.ItemIndex );
995 //
\83|
\83b
\83v
\83A
\83b
\83v
\88Ê
\92u
996 case PopupPositionRadioGroup.ItemIndex of
997 0: GikoSys.Setting.PopupPosition := gppRightTop;
998 1: GikoSys.Setting.PopupPosition := gppRight;
999 2: GikoSys.Setting.PopupPosition := gppRightBottom;
1000 3: GikoSys.Setting.PopupPosition := gppTop;
1001 4: GikoSys.Setting.PopupPosition := gppCenter;
1002 5: GikoSys.Setting.PopupPosition := gppBottom;
1003 6: GikoSys.Setting.PopupPosition := gppLeftTop;
1004 7: GikoSys.Setting.PopupPosition := gppLeft;
1005 8: GikoSys.Setting.PopupPosition := gppLeftBottom;
1008 //
\94ñ
\83A
\83N
\83e
\83B
\83u
\8e\9e\83|
\83b
\83v
\83A
\83b
\83v
\95\
\8e¦
1009 GikoSys.Setting.UnActivePopup := UnActivePopupCheckBox.Checked;
1010 //
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\83{
\81[
\83\8b\83h
\95\
\8e¦
1011 GikoSys.Setting.ResPopupHeaderBold := ResPopupBoldCheckBox.Checked;
1013 //
\83A
\83h
\83\8c\83X
\83o
\81[
1014 GikoSys.Setting.URLDisplay := URLDisplayCheckBox.Checked;
1015 GikoSys.Setting.AddressBarTabStop := TabStopAddressBarCheckBox.Checked;
1016 GikoSys.Setting.LinkAddAddressBar := LinkAddCheckBox.Checked;
1017 if GikoSys.IsNumeric(AddressHistoryCountEdit.Text) then
1018 GikoSys.Setting.AddressHistoryCount := StrToInt(AddressHistoryCountEdit.Text)
1020 GikoSys.Setting.AddressHistoryCount := 100;
1022 //HTML
\83v
\83\8c\83r
\83\85\81[
1023 GikoSys.Setting.PreviewVisible := PreviewVisibleCheckBox.Checked;
1024 if GikoSys.IsNumeric(PreviewWaitEdit.Text) then
1025 GikoSys.Setting.PreviewWait := StrToInt(PreviewWaitEdit.Text)
1027 GikoSys.Setting.PreviewWait := 500;
1028 case PreviewSizeComboBox.ItemIndex of
1029 0: GikoSys.Setting.PreviewSize := gpsXSmall;
1030 1: GikoSys.Setting.PreviewSize := gpsSmall;
1031 2: GikoSys.Setting.PreviewSize := gpsMedium;
1032 3: GikoSys.Setting.PreviewSize := gpsLarge;
1033 4: GikoSys.Setting.PreviewSize := gpsXLarge;
1036 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\8dX
\90V
\83A
\83C
\83R
\83\93
1037 GikoSys.Setting.ListIconVisible := ThreadListIconCheckBox.Checked;
1039 //
\8eæ
\93¾
\90\94\81A
\96¢
\8eæ
\93¾
\90\94
1040 if (GikoSys.Setting.NonAcquiredCount <> NonAcquiredCountCheckBox.Checked) and (GikoForm.ActiveList Is TBoard) then
1041 FRepaintList := true;
1042 GikoSys.Setting.NonAcquiredCount := NonAcquiredCountCheckBox.Checked;
1044 GikoSys.Setting.CreationTimeLogs := CreationTimeLogsCheckBox.Checked;
1045 GikoSys.Setting.FutureThread := FutureThreadCheckBox.Checked;
1046 if StrToIntDef(SelectIntervalEdit.Text, 110) > 55 then
1047 GikoSys.Setting.SelectInterval := StrToIntDef(SelectIntervalEdit.Text, 110)
1049 GikoSys.Setting.SelectInterval := 55;
1051 //dat
\97\8e\82¿
\83X
\83\8c\83\
\81[
\83g
\8f\87
1052 case DatOchiSortCombo.ItemIndex of
1053 0: GikoSys.Setting.DatOchiSortIndex := -1; //
\95À
\82Ñ
\91Ö
\82¦
\82µ
\82È
\82¢
1054 1: begin //
\83X
\83\8c\94Ô
\8d\86(
\8f¸
\8f\87)
1055 GikoSys.Setting.DatOchiSortOrder := true;
1056 GikoSys.Setting.DatOchiSortIndex := 0;
1058 2: begin //
\83X
\83\8c\94Ô
\8d\86(
\8d~
\8f\87)
1059 GikoSys.Setting.DatOchiSortOrder := false;
1060 GikoSys.Setting.DatOchiSortIndex := 0;
1062 3: begin //
\8eæ
\93¾
\93ú
\8e\9e(
\8f¸
\8f\87)
1063 GikoSys.Setting.DatOchiSortOrder := true;
1064 GikoSys.Setting.DatOchiSortIndex := 6;
1066 4: begin //
\8eæ
\93¾
\93ú
\8e\9e(
\8d~
\8f\87)
1067 GikoSys.Setting.DatOchiSortOrder := false;
1068 GikoSys.Setting.DatOchiSortIndex := 6;
1070 5: begin //
\83X
\83\8c\8dì
\90¬
\93ú
\8e\9e(
\8f¸
\8f\87)
1071 GikoSys.Setting.DatOchiSortOrder := true;
1072 GikoSys.Setting.DatOchiSortIndex := 7;
1074 6: begin //
\83X
\83\8c\8dì
\90¬
\93ú
\8e\9e(
\8d~
\8f\87)
1075 GikoSys.Setting.DatOchiSortOrder := false;
1076 GikoSys.Setting.DatOchiSortIndex := 7;
1080 //
\8f\91\82«
\8d\9e\82Ý
\8e\9e\83}
\83V
\83\93\8e\9e\8aÔ
\8eg
\97p
\90Ý
\92è
1081 GikoSys.Setting.UseMachineTime := PostTimeCheckBox.Checked;
1082 if GikoSys.IsNumeric(PostTimeEdit.Text) then
1083 GikoSys.Setting.TimeAdjustSec := StrToInt(PostTimeEdit.Text)
1085 GikoSys.Setting.TimeAdjustSec := 0;
1086 GikoSys.Setting.TimeAdjust := PutPostTimeRadioButton.Checked;
1089 GikoSys.Setting.WriteSystemSettingFile;
1090 GikoSys.Setting.WriteBoardURLSettingFile;
1091 // GikoForm.SetBrowserTabState;
1093 if LogFolderEdit.Text <> '' then begin
1094 GikoSys.Setting.NewLogFolder := LogFolderEdit.Text;
1095 GikoSys.Setting.WriteFolderSettingFile;
1098 for i := 0 to SoundListView.Items.Count - 1 do begin
1099 if FileExists(SoundListView.Items[i].SubItems[0]) then
1100 GikoSys.Setting.SoundFileName[i] := SoundListView.Items[i].SubItems[0]
1102 GikoSys.Setting.SoundFileName[i] := '';
1106 GikoSys.Setting.AbonDeleterlo := RloCheckBox.Checked;
1107 GikoSys.Setting.AbonReplaceul := ReplaceulCheckBox.Checked;
1108 GikoSys.Setting.PopUpAbon := PopUpAbonCheckBox.Checked;
1109 GikoSys.Setting.ShowNGLinesNum := ShowNGLineCheckBox.Checked;
1110 GikoSys.Setting.AddResAnchor := AddResAnchorCheckBox.Checked;
1111 GikoSys.Setting.DeleteSyria := DeleteSyriaCheckBox.Checked;
1113 //Tab
\8e©
\93®
\95Û
\91¶
1114 GikoSys.Setting.TabAutoLoadSave := TabLoadSave.Checked;
1117 procedure TOptionDialog.SettingApply;
1121 GikoForm.TreeView.Items.BeginUpdate;
1122 GikoForm.FavoriteTreeView.Items.BeginUpdate;
1123 GikoForm.ListView.Items.BeginUpdate;
1125 GikoForm.TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1126 GikoForm.TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1127 GikoForm.TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1128 GikoForm.TreeView.Color := GikoSys.Setting.CabinetBackColor;
1130 GikoForm.FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1131 GikoForm.FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1132 GikoForm.FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1133 GikoForm.FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1135 GikoForm.ListView.Font.Name := GikoSys.Setting.ListFontName;
1136 GikoForm.ListView.Font.Size := GikoSys.Setting.ListFontSize;
1137 GikoForm.ListView.Font.Color := GikoSys.Setting.ListFontColor;
1138 //GikoForm.ListView.Color := GikoSys.Setting.ListBackColor;
1139 GikoForm.ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1140 GikoForm.UseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1141 GikoForm.OddColor := GikoSys.Setting.OddColor;
1143 GikoForm.BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1144 GikoForm.BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1145 // GikoForm.BrowserTab.Height := (GikoSys.Setting.BrowserTabFontSize * 2) + 1;
1146 // GikoForm.BrowserBottomPanel.Height := GikoForm.BrowserTab.Height;
1148 for i := 0 to Screen.CustomFormCount - 1 do begin
1149 if TObject(Screen.CustomForms[i]) is TEditorForm then begin
1150 TEditorForm(Screen.CustomForms[i]).SetFont;
1155 GikoForm.TreeView.Items.EndUpdate;
1156 GikoForm.FavoriteTreeView.Items.EndUpdate;
1157 GikoForm.ListView.Items.EndUpdate;
1160 //
\83A
\83h
\83\8c\83X
\83o
\81[
1161 for i := GikoForm.AddressComboBox.Items.Count - 1 downto 0 do begin
1162 if GikoSys.Setting.AddressHistoryCount >= GikoForm.AddressComboBox.Items.Count then
1164 GikoForm.AddressComboBox.Items.Delete(i);
1166 GikoForm.AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1168 //
\83X
\83\8c\88ê
\97\97\82Ì
\83\8a\83t
\83\8c\83b
\83V
\83\85
1169 if FRepaintList then begin
1170 // SetActiveList
\82ð
\8eÀ
\8ds
1171 GikoForm.ActiveList := GikoForm.ActiveList;
1174 //
\83X
\83\8c\83b
\83h
\82Ì
\83\8a\83t
\83\8c\83b
\83V
\83\85
1175 if FRepaintThread then begin
1176 for i := GikoForm.BrowserTab.Tabs.Count - 1 downto 0 do begin
1177 TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[i]).Repaint := true;
1179 GikoForm.BrowserTab.OnChange(nil);
1183 procedure TOptionDialog.ReadProxyCheckClick(Sender: TObject);
1185 ReadProxyAddressEdit.Enabled := ReadProxyCheck.Checked;
1186 ReadPortEdit.Enabled := ReadProxyCheck.Checked;
1187 ReadProxyUserIDEdit.Enabled := ReadProxyCheck.Checked;
1188 ReadProxyPasswordEdit.Enabled := ReadProxyCheck.Checked;
1190 ReadAddressLabel.Enabled := ReadProxyCheck.Checked;
1191 ReadPortLabel.Enabled := ReadProxyCheck.Checked;
1192 ReadUserIDLabel.Enabled := ReadProxyCheck.Checked;
1193 ReadPasswordLabel.Enabled := ReadProxyCheck.Checked;
1196 procedure TOptionDialog.ReadPortEditExit(Sender: TObject);
1198 if not GikoSys.IsNumeric(ReadPortEdit.Text) then
1199 ReadPortEdit.Text := '0';
1202 procedure TOptionDialog.LogFolderButtonClick(Sender: TObject);
1208 if SelectDirectory('
\83\8d\83O
\83t
\83H
\83\8b\83_
\91I
\91ð', Root, Dir) then begin
1209 LogFolderEdit.Text := Dir;
1213 function TOptionDialog.CheckFolder: Boolean;
1215 if Trim(LogFolderEdit.Text) = '' then
1216 LogFolderEdit.Text := ExtractFilePath(Application.ExeName) + 'Log';
1218 if DirectoryExists(LogFolderEdit.Text) then begin
1221 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
1222 //
\83t
\83H
\83\8b\83_
\82ð
\8dì
\90¬
1224 GikoSys.ForceDirectoriesEx(LogFolderEdit.Text);
1227 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);
1228 OptionTab.ActivePage := FolderSheet;
1229 LogFolderEdit.SetFocus;
1237 procedure TOptionDialog.FormClose(Sender: TObject; var Action: TCloseAction);
1244 procedure TOptionDialog.SoundReferButtonClick(Sender: TObject);
1246 OpenDialog.Filter := '
\83T
\83E
\83\93\83h (*.wav)|*.wav|
\82·
\82×
\82Ä
\82Ì
\83t
\83@
\83C
\83\8b (*.*)|*.*';
1247 sndPlaySound(nil, SND_ASYNC);
1248 if OpenDialog.Execute then begin
1249 SoundFileEdit.Text := OpenDialog.FileName;
1253 procedure TOptionDialog.SoundPlayButtonClick(Sender: TObject);
1255 if not FileExists(SoundFileEdit.Text) then begin
1256 MsgBox(Handle, '
\91¶
\8dÝ
\82µ
\82È
\82¢
\83t
\83@
\83C
\83\8b\82Å
\82·', '
\83G
\83\89\81[', MB_ICONSTOP or MB_OK);
1257 SoundFileEdit.Text := '';
1260 if not sndPlaySound(PChar(SoundFileEdit.Text), SND_ASYNC or SND_NOSTOP) then begin
1261 sndPlaySound(nil, SND_ASYNC);
1265 procedure TOptionDialog.SoundListViewChanging(Sender: TObject;
1266 Item: TListItem; Change: TItemChange; var AllowChange: Boolean);
1268 if Item.SubItems.Count > 0 then
1269 SoundFileEdit.Text := Item.SubItems[0];
1272 procedure TOptionDialog.SoundFileEditChange(Sender: TObject);
1276 sndPlaySound(nil, SND_ASYNC);
1277 Item := SoundListView.Selected;
1278 if Item = nil then Exit;
1280 if FileExists(SoundFileEdit.Text) then
1281 Item.SubItems[0] := SoundFileEdit.Text;
1282 if Trim(SoundFileEdit.Text) = '' then
1283 Item.SubItems[0] := '';
1286 procedure TOptionDialog.OptionTabChange(Sender: TObject);
1288 sndPlaySound(nil, SND_ASYNC);
1290 if OptionTab.ActivePage = CSSTabSheet then
1294 procedure TOptionDialog.AppFolderButtonClick(Sender: TObject);
1296 OpenDialog.Filter := '
\8eÀ
\8ds
\83t
\83@
\83C
\83\8b (*.exe)|*.exe|
\82·
\82×
\82Ä
\82Ì
\83t
\83@
\83C
\83\8b (*.*)|*.*';
1297 if OpenDialog.Execute then
1298 AppFolderEdit.Text := OpenDialog.FileName;
1301 procedure TOptionDialog.WriteProxyCheckClick(Sender: TObject);
1303 WriteProxyAddressEdit.Enabled := WriteProxyCheck.Checked;
1304 WritePortEdit.Enabled := WriteProxyCheck.Checked;
1305 WriteProxyUserIDEdit.Enabled := WriteProxyCheck.Checked;
1306 WriteProxyPasswordEdit.Enabled := WriteProxyCheck.Checked;
1308 WriteAddressLabel.Enabled := WriteProxyCheck.Checked;
1309 WritePortLabel.Enabled := WriteProxyCheck.Checked;
1310 WriteUserIDLabel.Enabled := WriteProxyCheck.Checked;
1311 WritePasswordLabel.Enabled := WriteProxyCheck.Checked;
1314 procedure TOptionDialog.WritePortEditExit(Sender: TObject);
1316 if not GikoSys.IsNumeric(WritePortEdit.Text) then
1317 WritePortEdit.Text := '0';
1320 procedure TOptionDialog.Tora3URLLabelClick(Sender: TObject);
1322 GikoSys.OpenBrowser(URL_TORA3, gbtAuto);
1325 procedure TOptionDialog.HotKeyEnter(Sender: TObject);
1327 OkBotton.Default := False;
1328 CancelBotton.Cancel := False;
1331 procedure TOptionDialog.HotKeyExit(Sender: TObject);
1333 OkBotton.Default := True;
1334 CancelBotton.Cancel := True;
1337 procedure TOptionDialog.URLAppCheckBoxClick(Sender: TObject);
1339 AppFolderLabel.Enabled := URLAppCheckBox.Checked;
1340 AppFolderEdit.Enabled := URLAppCheckBox.Checked;
1341 AppFolderButton.Enabled := URLAppCheckBox.Checked;
1344 procedure TOptionDialog.AddressHistoryCountEditExit(Sender: TObject);
1346 if not GikoSys.IsNumeric(AddressHistoryCountEdit.Text) then
1347 AddressHistoryCountEdit.Text := '100';
1350 procedure TOptionDialog.PreviewWaitEditExit(Sender: TObject);
1352 if not GikoSys.IsNumeric(PreviewWaitEdit.Text) then
1353 PreviewWaitEdit.Text := '500';
1354 if StrToInt(PreviewWaitEdit.Text) < 500 then
1355 PreviewWaitEdit.Text := '500';
1356 if StrToInt(PreviewWaitEdit.Text) > 9999 then
1357 PreviewWaitEdit.Text := '9999';
1360 procedure TOptionDialog.RecvBufferSizeExit(Sender: TObject);
1362 if not GikoSys.IsNumeric(RecvBufferSize.Text) then
1363 RecvBufferSize.Text := '4096';
1364 if StrToInt(RecvBufferSize.Text) < 256 then
1365 RecvBufferSize.Text := '4096';
1368 procedure TOptionDialog.CSSCheckBoxClick(Sender: TObject);
1370 CSSListLabel.Enabled := CSSCheckBox.Checked;
1371 CSSListView.Enabled := CSSCheckBox.Checked;
1374 procedure TOptionDialog.PostTimeEditExit(Sender: TObject);
1376 if not GikoSys.IsNumeric(PostTimeEdit.Text) then
1377 PostTimeEdit.Text := '0';
1380 procedure TOptionDialog.PostTimeCheckBoxClick(Sender: TObject);
1382 PostTimeLabel.Enabled := PostTimeCheckBox.Checked;
1383 PostTimeEdit.Enabled := PostTimeCheckBox.Checked;
1384 PutPostTimeRadioButton.Enabled := PostTimeCheckBox.Checked;
1385 BackPostTimeRadioButton.Enabled := PostTimeCheckBox.Checked;
1387 procedure TOptionDialog.SetAbonpropertys;
1390 GikoSys.FAbon.Deleterlo := RloCheckBox.Checked;
1391 GikoSys.FAbon.Replaceul := ReplaceulCheckBox.Checked;
1392 GikoSys.FAbon.AbonPopupRes := PopUpAbonCheckBox.Checked;
1393 GikoSys.FAbon.ReturnNGwordLineNum := ShowNGLineCheckBox.Checked;
1394 GikoSys.FAbon.SetNGResAnchor := AddResAnchorCheckBox.Checked;
1395 GikoSys.FAbon.DeleteSyria := DeleteSyriaCheckBox.Checked;
1397 procedure TOptionDialog.CSSFontButtonClick(Sender: TObject);
1400 FontDialog.Options := [fdAnsiOnly, fdEffects];
1401 FontDialog.Font.Assign(FCSSFont);
1402 if FontDialog.Execute then begin
1403 FontDialog.Font.Style := FontDialog.Font.Style - [fsUnderline] - [fsStrikeout];
1404 FCSSFont.Assign(FontDialog.Font);
1405 //FCSSFont := FontDialog.Font;
1412 procedure TOptionDialog.CSSBackColorButtonClick(Sender: TObject);
1415 ColorDialog.Color := FCSSBackColor;
1416 if ColorDialog.Execute then begin
1417 FCSSBackColor := ColorDialog.Color;
1424 procedure TOptionDialog.CSSFontCheckBoxClick(Sender: TObject);
1427 CSSFontButton.Enabled := CSSFontCheckBox.Checked;
1432 procedure TOptionDialog.CSSBackColorCheckBoxClick(Sender: TObject);
1435 CSSBackColorButton.Enabled := CSSBackColorCheckBox.Checked;
1440 procedure TOptionDialog.CSSSetContent(Content: string);
1444 if CSSBrowser.Document <> nil then begin
1445 doc := CSSBrowser.Document;
1448 doc.charset := 'Shift_JIS';
1454 procedure TOptionDialog.CSSPreview;
1457 ThreadItem: TThreadItem;
1459 Res: array [0..1] of TResRec;
1460 UserOptionalStyle: string;
1465 fileName := GikoSys.Setting.CSSFileName;
1467 GikoSys.Setting.CSSFileName := 'default.css';
1468 if CSSListView.Items.Count > 0 then begin
1470 if CSSListView.ItemIndex >= 0 then begin
1471 if CSSListView.Items[CSSListView.ItemIndex].Data <> nil then
1472 GikoSys.Setting.CSSFileName := string( CSSListView.Items[CSSListView.ItemIndex].data )
1474 GikoSys.Setting.CSSFileName := CSSListView.Items[CSSListView.ItemIndex].Caption + '.css';
1480 Board := TBoard.Create( nil, 'about://sample/' );
1481 ThreadItem := TThreadItem.Create( nil, 'about://sample/test/read.cgi/sample/' );
1484 Board.Title := '
\83T
\83\93\83v
\83\8b\94Â';
1485 ThreadItem.ParentBoard := Board;
1486 ThreadItem.AllResCount := High( Res );
1487 ThreadItem.NewResCount := 1;
1488 ThreadItem.NewReceive := 2;
1489 ThreadItem.Title := '
\83T
\83\93\83v
\83\8b\83v
\83\8c\83r
\83\85\81[';
1491 Res[0].FName := '
\96¼
\96³
\82µ
\82³
\82ñ';
1492 Res[0].FMailTo := 'sage';
1493 Res[0].FDateTime := 'ID:Sample';
1494 Res[0].FBody := 'CSS
\82Æ
\83X
\83L
\83\93\82Ì
\83T
\83\93\83v
\83\8b';
1495 Res[1].FName := '
\96¼
\96³
\82µ
\82³
\82ñ';
1496 Res[1].FMailTo := 'age';
1497 Res[1].FDateTime := 'ID:Sample';
1498 Res[1].FBody := '
\83I
\83}
\83G
\83\82\83i
\81[';
1500 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
1501 if CSSFontCheckBox.Checked then begin
1502 i := ColorToRGB( FCSSFont.Color );
1503 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
1505 UserOptionalStyle := UserOptionalStyle +
1506 'font-family:"' + FCSSFont.Name + '";' +
1507 'font-size:' + IntToStr( FCSSFont.Size ) + 'pt;' +
1508 'color:#' + IntToHex( i, 6 ) + ';';
1509 if fsBold in FCSSFont.Style then
1510 UserOptionalStyle := UserOptionalStyle + 'font-weight:bold;'
1512 UserOptionalStyle := UserOptionalStyle + 'font-weight:normal;';
1513 if fsItalic in FCSSFont.Style then
1514 UserOptionalStyle := UserOptionalStyle + 'font-style:italic;'
1516 UserOptionalStyle := UserOptionalStyle + 'font-style:normal;';
1518 if CSSBackColorCheckBox.Checked then begin
1519 i := ColorToRGB( FCSSBackColor );
1520 i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
1522 UserOptionalStyle := UserOptionalStyle +
1523 'background-color:#' + IntToHex( i, 6 ) + ';';
1526 if FileExists( GikoSys.GetSkinHeaderFileName ) then begin
1528 GikoSys.LoadFromSkin( GikoSys.GetSkinHeaderFileName, ThreadItem, 0 ) +
1529 '<a name="top"></a>' +
1530 GikoSys.SkinedRes( GikoSYs.LoadFromSkin( GikoSys.GetSkinResFileName, ThreadItem, 0 ), Res[0], '1' ) +
1531 GikoSys.SkinedRes( GikoSYs.LoadFromSkin( GikoSys.GetSkinNewResFileName, ThreadItem, 0 ), Res[1], '2' ) +
1532 '<a name="bottom"></a>' +
1533 GikoSys.LoadFromSkin( GikoSys.GetSkinFooterFileName, ThreadItem, 0 );
1535 html := StringReplace( html, '</head>',
1536 '<style type="text/css">body {' + UserOptionalStyle + '}</style></head>', [rfReplaceAll] );
1540 '<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">' +
1541 '<title>' + ThreadItem.Title + '</title>' +
1542 '<link rel="stylesheet" href="' + GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName + '" type="text/css">' +
1543 '<style type="text/css">body {' + UserOptionalStyle + '}</style>' +
1545 '<div class="title">' + ThreadItem.Title + '</div>';
1547 for i := 0 to High( Res ) do
1550 '<div class="header"><span class="no">' + IntToStr( i + 1 ) + '</span>' +
1551 '<span class="name_label">
\96¼
\91O
\81F </span>' +
1552 '<a class="name_mail" href="mailto:' + Res[i].FMailTo + '">' +
1553 '<b>' + Res[i].FName + '</b></a><span class="mail"> [' + Res[i].FMailTo + ']</span>' +
1554 '<span class="date_label">
\93\8a\8de
\93ú
\81F</span>' +
1555 '<span class="date"> ' + Res[i].FDateTime+ '</span></div>' +
1556 '<div class="mes">' + Res[i].FBody + ' </div>';
1559 html := html + '</body></html>';
1563 CSSSetContent( html );
1570 GikoSys.Setting.CSSFileName := fileName;
1575 procedure TOptionDialog.CSSListViewChange(Sender: TObject; Item: TListItem;
1576 Change: TItemChange);
1579 if OptionTab.ActivePage = CSSTabSheet then
1584 procedure TOptionDialog.AddURLButtonClick(Sender: TObject);
1586 BoardURLComboBox.Items.Append(BoardURLComboBox.Text);
1587 BoardURLComboBox.ItemIndex := BoardURLComboBox.Items.Count - 1;
1590 procedure TOptionDialog.RemoveURLButtonClick(Sender: TObject);
1592 BoardURLComboBox.DeleteSelected;
1595 procedure TOptionDialog.OddResNumCheckBoxClick(Sender: TObject);
1597 OddResNumColorBox.Enabled := OddResNumCheckBox.Checked;
1600 procedure TOptionDialog.ResRangeHoldCheckBoxClick(Sender: TObject);
1602 ResRangeHoldComboBox.Enabled := ResRangeHoldCheckBox.Checked;