Develop and Download Open Source Software

Browse CVS Repository

Contents of /gikonavigoeson/gikonavi/Setting.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.14 - (show annotations) (download) (as text)
Sun Nov 2 16:11:49 2003 UTC (20 years, 5 months ago) by yoffy
Branch: MAIN
Changes since 1.13: +272 -107 lines
File MIME type: text/x-pascal
・ファイルパスの取得関連を GikoSys から Setting に移動。
・UseSkin で現在スキンを使用しているかどうかが簡単に判断できるようになった。

1 unit Setting;
2
3 interface
4
5 uses
6 SysUtils, Classes, Graphics, Forms, Math, IniFiles, UCryptAuto, UBase64,
7 ComCtrls;
8
9 const
10 MAIN_COOLBAND_COUNT = 4; //?<?ゃ??oolBand????/span>
11 LIST_COOLBAND_COUNT = 2; //??oolBand????/span>
12 BROWSER_COOLBAND_COUNT = 3; //????????oolBand????/span>
13
14 BOARD_FILE_NAME = 'board.2ch';
15 CUSTOMBOARD_FILE_NAME = 'custom.2ch';
16 KEY_SETTING_FILE_NAME = 'key.ini';
17 TEMP_FOLDER = 'Temp';
18 OUTBOX_FILE_NAME = 'outbox.ini';
19 SENT_FILE_NAME = 'sent.ini';
20 CONFIG_DIR_NAME = 'config';
21 CSS_DIR_NAME = 'css';
22 SKIN_DIR_NAME = 'skin';
23 SKIN_HEADER_FILE_NAME = 'Header.html';
24 SKIN_FOOTER_FILE_NAME = 'Footer.html';
25 SKIN_NEWRES_FILE_NAME = 'NewRes.html';
26 SKIN_RES_FILE_NAME = 'Res.html';
27 SKIN_BOOKMARK_FILE_NAME = 'Bookmark.html';
28 SKIN_NEWMARK_FILE_NAME = 'Newmark.html';
29
30 type
31 TGikoTabPosition = (gtpTop, gtpBottom); // ?帥??篏?臀?/span>
32 TGikoTabAppend = (gtaFirst, gtpLast); // ?帥??菴遵??篏?臀?/span>
33 TGikoTabStyle = (gtsTab, gtsButton, gtsFlat); // ?帥???鴻?帥?ゃ??/span>
34 TGikoListOrientation = (gloHorizontal, gloVertical); // ???鴻?????眼?紙梓綛?/span>
35 TGikoListState = (glsMax, glsNormal, glsMin); // ???鴻???泣?ゃ?榊?倶??
36 // ???????≪????茵?ず篏?臀?/span>
37 TGikoPopupPosition = (gppRightTop, gppTop, gppLeftTop,
38 gppRight, gppCenter, gppLeft,
39 gppRightBottom, gppBottom, gppLeftBottom);
40 //???????ャ?若?泣?ゃ??/span>
41 TGikoPreviewSize = (gpsXLarge, gpsLarge, gpsMedium, gpsSmall, gpsXSmall);
42
43 //CoolBar荐?????潟?若??
44 TCoolSet = record
45 FCoolID: Integer;
46 FCoolWidth: Integer;
47 FCoolBreak: Boolean;
48 end;
49
50 TSetting = class(TObject)
51 private
52 //??篆<???????<?泣?ゃ??/span>
53 FRecvBufferSize: Integer;
54 //HTTP1.1篏睡??/span>
55 FProtocol: Boolean;
56 //???????傑・膓?HTTP1.1篏睡??/span>
57 FProxyProtocol: Boolean;
58
59 //???????件?茯?昭???
60 FReadProxy: Boolean;
61 FReadProxyAddress: string;
62 FReadProxyPort: Integer;
63 FReadProxyUserID: string;
64 FReadProxyPassword: string;
65
66 //???????件??梧昭???
67 FWriteProxy: Boolean;
68 FWriteProxyAddress: string;
69 FWriteProxyPort: Integer;
70 FWriteProxyUserID: string;
71 FWriteProxyPassword: string;
72
73 //???c????????
74 FCabinetFontName: string;
75 FCabinetFontSize: Integer;
76 FCabinetFontBold: Boolean;
77 FCabinetFontItalic: Boolean;
78 FCabinetFontColor: TColor;
79 FCabinetBackColor: TColor;
80
81 //???鴻??
82 FListFontName: string;
83 FListFontSize: Integer;
84 FListFontBold: Boolean;
85 FListFontItalic: Boolean;
86 FListFontColor: TColor;
87 FListBackColor: TColor;
88
89 //????????/span>
90 FBrowserFontName: string; // ''...default
91 FBrowserFontSize: Integer; // 0...default
92 FBrowserFontBold: Integer; // 0...default, -1...False, 1...True
93 FBrowserFontItalic: Integer; // 筝???????
94 FBrowserFontColor: Integer; // -1...default
95 FBrowserBackColor: Integer; // 筝???????
96
97 //?????c??/span>
98 FEditorFontName: string;
99 FEditorFontSize: Integer;
100 FEditorFontBold: Boolean;
101 FEditorFontItalic: Boolean;
102 FEditorFontColor: TColor;
103 FEditorBackColor: TColor;
104
105 //?帥???????潟??
106 FBrowserTabFontName: string;
107 FBrowserTabFontSize: Integer;
108 FBrowserTabFontBold: Boolean;
109 FBrowserTabFontItalic: Boolean;
110
111 //???潟?????c?潟????/span>
112 FHintFontName: string;
113 FHintFontSize: Integer;
114 //FHintFontBold: Boolean;
115 //FHintFontItalic: Boolean;
116 FHintFontColor: TColor;
117 FHintBackColor: TColor;
118
119 //???c?潟?????泣?ゃ??/span>
120 FWindowTop: Integer;
121 FWindowLeft: Integer;
122 FWindowHeight: Integer;
123 FWindowWidth: Integer;
124 FWindowMax: Boolean;
125 //???鴻?????ャ?若?鴻?帥?ゃ??/span>
126 FListStyle: TViewStyle;
127
128 //???若?????取;腓?/span>
129 FStdToolBarVisible: Boolean;
130 FAddressBarVisible: Boolean;
131 FLinkBarVisible: Boolean;
132 FListToolBarVisible: Boolean;
133 FListNameBarVisible: Boolean;
134 FBrowserToolBarVisible: Boolean;
135 FBrowserNameBarVisible: Boolean;
136
137 //???????吟?帥??
138 FBrowserTabVisible: Boolean;
139 FBrowserTabPosition: TGikoTabPosition;
140 FBrowserTabAppend: TGikoTabAppend;
141 FBrowserTabStyle: TGikoTabStyle;
142
143 //?<???祉?若?吾????/span>
144 FMessageBarVisible: Boolean;
145 FMessegeBarHeight: Integer;
146
147 //?鴻???若?帥?鴻????/span>
148 FStatusBarVisible: Boolean;
149
150 //???c????????????祉?泣?ゃ??/span>
151 FCabinetVisible: Boolean;
152 FCabinetWidth: Integer;
153
154 //???鴻???祉???????吟?泣?ゃ??/span>
155 FListOrientation: TGikoListOrientation;
156 FListHeight: Integer;
157 FListHeightState: TGikoListState;
158 FListWidth: Integer;
159 FListWidthState: TGikoListState;
160 // FListHeightMax: Boolean;
161 // FListWidthMax: Boolean;
162
163 //??篆∞???????祉?<?若??/span>
164 FNameList: TStringList;
165 FMailList: TStringList;
166
167 //?????c?帥?若???c?潟?????泣?ゃ??/span>
168 FEditWindowTop: Integer;
169 FEditWindowLeft: Integer;
170 FEditWindowHeight: Integer;
171 FEditWindowWidth: Integer;
172 FEditWindowMax: Boolean;
173
174 //???鴻????埈;腓?/span>
175 FListViewNo: Boolean;
176 //CSS茵?ず
177 FUseCSS: Boolean;
178 //CSS???<?ゃ????
179 FCSSFileName: string;
180 // ?鴻???活;腓?筝???????????? ini ???絖???????????)
181 FUseSkin: Boolean;
182 //mail罨?茵?ず
183 FShowMail: Boolean;
184 //莎桁????????00???壕;腓?/span>
185 FOnlyAHundredRes : Boolean;
186 //???≪?????c???????鴻???????≪????茵?ず
187 FUnActivePopup: Boolean;
188 //???鴻???????≪???????????若???若????
189 FResPopupHeaderBold: Boolean;
190
191 //???違????????
192 FLogFolder: string;
193 FNewLogFolder: string;
194
195 //???鴻???????????????若?泣?ゃ??/span>
196 FBBSColumnWidth: array[0..0] of Integer;
197 FCategoryColumnWidth: array[0..3] of Integer;
198 FBoardColumnWidth: array[0..6] of Integer;
199
200 //腟?莨若?炊??絖???
201 FSelectTextList: TStringList;
202
203 //?推?荀?RL
204 //FBoardURL2ch: string;
205 FBoardURLs: TStringList;
206 FBoardURLSelected: Integer;
207
208 //???若??D?祉???鴻???若??
209 FUserID: string;
210 FPassword: string;
211 FAutoLogin: Boolean;
212
213 //URL??????????莎桁???≪????/span>
214 FURLApp: Boolean;
215 FURLAppFile: string;
216
217 //mailto????????????篏?
218 FOpenMailer: Boolean;
219
220 //???ょ∈茯?
221 FDeleteMsg: Boolean;
222
223 //CoolBar鐚??<?ゃ?潟?紙?帥?祉???????駈?
224 FMainCoolBar: array[0..MAIN_COOLBAND_COUNT - 1] of TCoolSet;
225 FListCoolBar: array[0..LIST_COOLBAND_COUNT - 1] of TCoolSet;
226 FBrowserCoolBar: array[0..BROWSER_COOLBAND_COUNT - 1] of TCoolSet;
227
228 //ToolBar Wrapable
229 FListToolBarWrapable: Boolean;
230 FBrowserToolBarWrapable: Boolean;
231
232 //???????≪????篏?臀?/span>
233 FPopupPosition: TGikoPopupPosition;
234
235 //?≪?????鴻????/span>
236 FURLDisplay: Boolean;
237 FAddressBarTabStop: Boolean;
238 FLinkAddAddressBar: Boolean;
239 FAddressHistoryCount: Integer;
240
241 //?糸????????ャ??/span>
242 FPreviewVisible: Boolean;
243 FPreviewSize: TGikoPreviewSize;
244 FPreviewWait: Integer;
245
246 //?鴻??????筝?荀ф?贋?違?≪?ゃ?潟?活;腓?/span>
247 FListIconVisible: Boolean;
248
249 //?吾??莨若?炊?????激?恰????篏睡??┃絎?
250 FUseMachineTime: Boolean;
251 FTimeAdjustSec: Integer;
252 FTimeAdjust: Boolean;
253
254 //???若????
255 FAbonDeleterlo : Boolean; //&rlo;????????
256 FAbonReplaceul : Boolean; //<ul>?帥?違??<br>?帥?違??舟????????
257 FPopUpAbon : Boolean; //???鴻???????≪???????????若????????/span>
258 FShowNGLinesNum : Boolean; //荅峨?????鐚?磁???若?????<?ゃ??????違??茵?ず
259 FAddResAnchor : Boolean; //NG???鴻?吾?????鴻?≪?潟???若??菴遵??????
260
261 // ?鴻??????腟?莨若???c?若???????
262 FSelectComboBoxWidth : Integer;
263
264 // ??緇????御?????????????激?с?潟???ゃ?≪???違???帥??
265 FOptionDialogTabIndex: Integer;
266
267 // ??緇????御???????????c????????
268 FCabinetIndex: Integer;
269
270 //腟?篋?????∈茯????ゃ?≪???違??茵?ず??????
271 FShowDialogForEnd : Boolean;
272
273 function GetMainCoolSet(Index: Integer): TCoolSet;
274 function GetBoardCoolSet(Index: Integer): TCoolSet;
275 function GetBrowserCoolSet(Index: Integer): TCoolSet;
276 procedure SetMainCoolSet(Index: Integer; CoolSet: TCoolSet);
277 procedure SetBoardCoolSet(Index: Integer; CoolSet: TCoolSet);
278 procedure SetBrowserCoolSet(Index: Integer; CoolSet: TCoolSet);
279
280 function GetBBSColumnWidth(index: Integer): Integer;
281 function GetCategoryColumnWidth(index: Integer): Integer;
282 function GetBoardColumnWidth(index: Integer): Integer;
283 procedure SetBBSColumnWidth(index: Integer; value: Integer);
284 procedure SetCategoryColumnWidth(index: Integer; value: Integer);
285 procedure SetBoardColumnWidth(index: Integer; value: Integer);
286
287 function GetSoundName(Index: Integer): string;
288 function GetSoundViewName(Index: Integer): string;
289 function GetSoundFileName(Index: Integer): string;
290 procedure SetSoundFileName(Index: Integer; value: string);
291 function Encrypt(s: string): string;
292 function Decrypt(s: string): string;
293
294 procedure MakeURLIniFile();
295
296 procedure SetUseCSS( value: Boolean );
297 procedure SetCSSFileName( fileName: string );
298 protected
299
300 public
301 constructor Create;
302 destructor Destroy; override;
303 function GetFileName: string;
304 function GetBoardURLFileName: string;
305 procedure ReadSettingFile;
306 procedure ReadBoardURLsFile;
307 procedure WriteSystemSettingFile;
308 procedure WriteWindowSettingFile;
309 procedure WriteNameMailSettingFile;
310 procedure WriteFolderSettingFile();
311 procedure WriteBoardURLSettingFile;
312 function GetSoundCount: Integer;
313 function FindSoundFileName(Name: string): string;
314
315 function GetBoardFileName: string;
316 function GetCustomBoardFileName: string;
317 function GetHtmlTempFileName: string;
318 function GetAppDir: string;
319 function GetTempFolder: string;
320 function GetSentFileName: string;
321 function GetConfigDir: string;
322 function GetSkinDir: string;
323 function GetSkinHeaderFileName: string;
324 function GetSkinFooterFileName: string;
325 function GetSkinResFileName: string;
326 function GetSkinNewResFileName: string;
327 function GetSkinBookmarkFileName: string;
328 function GetSkinNewmarkFileName: string;
329 function GetStyleSheetDir: string;
330 function GetOutBoxFileName: string;
331
332 //??篆<???????<?泣?ゃ??/span>
333 property RecvBufferSize: Integer read FRecvBufferSize write FRecvBufferSize;
334 //HTTP1.1篏睡??/span>
335 property Protocol: Boolean read FProtocol write FProtocol;
336 //???????傑・膓?HTTP1.1篏睡??/span>
337 property ProxyProtocol: Boolean read FProxyProtocol write FProxyProtocol;
338
339 property ReadProxy: Boolean read FReadProxy write FReadProxy;
340 property ReadProxyAddress: string read FReadProxyAddress write FReadProxyAddress;
341 property ReadProxyPort: Integer read FReadProxyPort write FReadProxyPort;
342 property ReadProxyUserID: string read FReadProxyUserID write FReadProxyUserID;
343 property ReadProxyPassword: string read FReadProxyPassword write FReadProxyPassword;
344
345 property WriteProxy: Boolean read FWriteProxy write FWriteProxy;
346 property WriteProxyAddress: string read FWriteProxyAddress write FWriteProxyAddress;
347 property WriteProxyPort: Integer read FWriteProxyPort write FWriteProxyPort;
348 property WriteProxyUserID: string read FWriteProxyUserID write FWriteProxyUserID;
349 property WriteProxyPassword: string read FWriteProxyPassword write FWriteProxyPassword;
350
351 property CabinetFontName: string read FCabinetFontName write FCabinetFontName;
352 property CabinetFontSize: Integer read FCabinetFontSize write FCabinetFontSize;
353 property CabinetFontBold: Boolean read FCabinetFontBold write FCabinetFontBold;
354 property CabinetFontItalic: Boolean read FCabinetFontItalic write FCabinetFontItalic;
355 property CabinetFontColor: TColor read FCabinetFontColor write FCabinetFontColor;
356 property CabinetBackColor: TColor read FCabinetBackColor write FCabinetBackColor;
357
358 property ListFontName: string read FListFontName write FListFontName;
359 property ListFontSize: Integer read FListFontSize write FListFontSize;
360 property ListFontBold: Boolean read FListFontBold write FListFontBold;
361 property ListFontItalic: Boolean read FListFontItalic write FListFontItalic;
362 property ListFontColor: TColor read FListFontColor write FListFontColor;
363 property ListBackColor: TColor read FListBackColor write FListBackColor;
364
365 property BrowserFontName: string read FBrowserFontName write FBrowserFontName;
366 property BrowserFontSize: Integer read FBrowserFontSize write FBrowserFontSize;
367 property BrowserFontBold: Integer read FBrowserFontBold write FBrowserFontBold;
368 property BrowserFontItalic: Integer read FBrowserFontItalic write FBrowserFontItalic;
369 property BrowserFontColor: Integer read FBrowserFontColor write FBrowserFontColor;
370 property BrowserBackColor: Integer read FBrowserBackColor write FBrowserBackColor;
371
372 property EditorFontName: string read FEditorFontName write FEditorFontName;
373 property EditorFontSize: Integer read FEditorFontSize write FEditorFontSize;
374 property EditorFontBold: Boolean read FEditorFontBold write FEditorFontBold;
375 property EditorFontItalic: Boolean read FEditorFontItalic write FEditorFontItalic;
376 property EditorFontColor: TColor read FEditorFontColor write FEditorFontColor;
377 property EditorBackColor: TColor read FEditorBackColor write FEditorBackColor;
378
379 property BrowserTabFontName: string read FBrowserTabFontName write FBrowserTabFontName;
380 property BrowserTabFontSize: Integer read FBrowserTabFontSize write FBrowserTabFontSize;
381 property BrowserTabFontBold: Boolean read FBrowserTabFontBold write FBrowserTabFontBold;
382 property BrowserTabFontItalic: Boolean read FBrowserTabFontItalic write FBrowserTabFontItalic;
383
384 property HintFontName: string read FHintFontName write FHintFontName;
385 property HintFontSize: Integer read FHintFontSize write FHintFontSize;
386 //property HintFontBold: Boolean read FHintFontBold write FHintFontBold;
387 //property HintFontItalic: Boolean read FHintFontItalic write FHintFontItalic;
388 property HintFontColor: TColor read FHintFontColor write FHintFontColor;
389 property HintBackColor: TColor read FHintBackColor write FHintBackColor;
390
391 property WindowTop: Integer read FWindowTop write FWindowTop;
392 property WindowLeft: Integer read FWindowLeft write FWindowLeft;
393 property WindowHeight: Integer read FWindowHeight write FWindowHeight;
394 property WindowWidth: Integer read FWindowWidth write FWindowWidth;
395 property WindowMax: Boolean read FWindowMax write FWindowMax;
396 property ListStyle: TViewStyle read FListStyle write FListStyle;
397
398 property StdToolBarVisible: Boolean read FStdToolBarVisible write FStdToolBarVisible;
399 property AddressBarVisible: Boolean read FAddressBarVisible write FAddressBarVisible;
400 property LinkBarVisible: Boolean read FLinkBarVisible write FLinkBarVisible;
401 property ListToolBarVisible: Boolean read FListToolBarVisible write FListToolBarVisible;
402 property ListNameBarVisible: Boolean read FListNameBarVisible write FListNameBarVisible;
403 property BrowserToolBarVisible: Boolean read FBrowserToolBarVisible write FBrowserToolBarVisible;
404 property BrowserNameBarVisible: Boolean read FBrowserNameBarVisible write FBrowserNameBarVisible;
405
406 property BrowserTabVisible: Boolean read FBrowserTabVisible write FBrowserTabVisible;
407 property BrowserTabPosition: TGikoTabPosition read FBrowserTabPosition write FBrowserTabPosition;
408 property BrowserTabAppend: TGikoTabAppend read FBrowserTabAppend write FBrowserTabAppend;
409 property BrowserTabStyle: TGikoTabStyle read FBrowserTabStyle write FBrowserTabStyle;
410
411 property MessageBarVisible: Boolean read FMessageBarVisible write FMessageBarVisible;
412 property MessegeBarHeight: Integer read FMessegeBarHeight write FMessegeBarHeight;
413
414 property StatusBarVisible: Boolean read FStatusBarVisible write FStatusBarVisible;
415
416 property CabinetVisible: Boolean read FCabinetVisible write FCabinetVisible;
417 property CabinetWidth: Integer read FCabinetWidth write FCabinetWidth;
418
419 property ListOrientation: TGikoListOrientation read FListOrientation write FListOrientation;
420 property ListHeight: Integer read FListHeight write FListHeight;
421 property ListHeightState: TGikoListState read FListHeightState write FListHeightState;
422 property ListWidth: Integer read FListWidth write FListWidth;
423 property ListWidthState: TGikoListState read FListWidthState write FListWidthState;
424 // property ListHeightMax: Boolean read FListHeightMax write FListHeightMax;
425 // property ListWidthMax: Boolean read FListWidthMax write FListWidthMax;
426
427 property NameList: TStringList read FNameList write FNameList;
428 property MailList: TStringList read FMailList write FMailList;
429 property SelectTextList: TStringList read FSelectTextList write FSelectTextList;
430
431 property EditWindowTop: Integer read FEditWindowTop write FEditWindowTop;
432 property EditWindowLeft: Integer read FEditWindowLeft write FEditWindowLeft;
433 property EditWindowHeight: Integer read FEditWindowHeight write FEditWindowHeight;
434 property EditWindowWidth: Integer read FEditWindowWidth write FEditWindowWidth;
435 property EditWindowMax: Boolean read FEditWindowMax write FEditWindowMax;
436
437 property ListViewNo: Boolean read FListViewNo write FListViewNo;
438 property UseCSS: Boolean read FUseCSS write SetUseCSS;
439 property CSSFileName: string read FCSSFileName write SetCSSFileName;
440 property UseSkin: Boolean read FUseSkin;
441
442 property ShowMail: Boolean read FShowMail write FShowMail;
443 property OnlyAHundredRes : Boolean read FOnlyAHundredRes write FOnlyAHundredRes;
444 property UnActivePopup: Boolean read FUnActivePopup write FUnActivePopup;
445 property ResPopupHeaderBold: Boolean read FResPopupHeaderBold write FResPopupHeaderBold;
446
447 property LogFolder: string read FLogFolder write FLogFolder;
448 property NewLogFolder: string read FNewLogFolder write FNewLogFolder;
449
450 property BBSColumnWidth[index: Integer]: Integer read GetBBSColumnWidth write SetBBSColumnWidth;
451 property CategoryColumnWidth[index: Integer]: Integer read GetCategoryColumnWidth write SetCategoryColumnWidth;
452 property BoardColumnWidth[index: Integer]: Integer read GetBoardColumnWidth write SetBoardColumnWidth;
453
454 property SoundName[index: Integer]: string read GetSoundName;
455 property SoundViewName[index: Integer]: string read GetSoundViewName;
456 property SoundFileName[index: Integer]: string read GetSoundFileName write SetSoundFileName;
457
458 //property BoardURL2ch: string read FBoardURL2ch write FBoardURL2ch;
459 property BoardURLs: TStringList read FBoardURLs write FBoardURLs;
460 property BoardURLSelected: Integer read FBoardURLSelected write FBoardURLSelected;
461 property UserID: string read FUserID write FUserID;
462 property Password: string read FPassword write FPassword;
463 property AutoLogin: Boolean read FAutoLogin write FAutoLogin;
464
465 property URLApp: Boolean read FURLApp write FURLApp;
466 property URLAppFile: string read FURLAppFile write FURLAppFile;
467
468 property OpenMailer: Boolean read FOpenMailer write FOpenMailer;
469
470 property DeleteMsg: Boolean read FDeleteMsg write FDeleteMsg;
471
472 property MainCoolSet[Index: Integer]: TCoolSet read GetMainCoolSet write SetMainCoolSet;
473 property ListCoolSet[Index: Integer]: TCoolSet read GetBoardCoolSet write SetBoardCoolSet;
474 property BrowserCoolSet[Index: Integer]: TCoolSet read GetBrowserCoolSet write SetBrowserCoolSet;
475
476 property ListToolBarWrapable: Boolean read FListToolBarWrapable write FListToolBarWrapable;
477 property BrowserToolBarWrapable: Boolean read FBrowserToolBarWrapable write FBrowserToolBarWrapable;
478
479 property PopupPosition: TGikoPopupPosition read FPopupPosition write FPopupPosition;
480
481 property URLDisplay: Boolean read FURLDisplay write FURLDisplay;
482 property AddressBarTabStop: Boolean read FAddressBarTabStop write FAddressBarTabStop;
483 property LinkAddAddressBar: Boolean read FLinkAddAddressBar write FLinkAddAddressBar;
484 property AddressHistoryCount: Integer read FAddressHistoryCount write FAddressHistoryCount;
485
486 property PreviewVisible: Boolean read FPreviewVisible write FPreviewVisible;
487 property PreviewSize: TGikoPreviewSize read FPreviewSize write FPreviewSize;
488 property PreviewWait: Integer read FPreviewWait write FPreviewWait;
489
490 property ListIconVisible: Boolean read FListIconVisible write FListIconVisible;
491
492 property UseMachineTime: Boolean read FUseMachineTime write FUseMachineTime;
493 property TimeAdjustSec: Integer read FTimeAdjustSec write FTimeAdjustSec;
494 property TimeAdjust: Boolean read FTimeAdjust write FTimeAdjust;
495
496 //???若????
497 property AbonDeleterlo : Boolean read FAbonDeleterlo write FAbonDeleterlo;
498 property AbonReplaceul : Boolean read FAbonReplaceul write FAbonReplaceul;
499 property PopUpAbon : Boolean read FPopUpAbon write FPopUpAbon;
500 property ShowNGLinesNum : Boolean read FShowNGLinesNum write FShowNGLinesNum;
501 property AddResAnchor : Boolean read FAddResAnchor write FAddResAnchor;
502
503 // ?鴻??????腟?莨若???c?若???????
504 property SelectComboBoxWidth : Integer read FSelectComboBoxWidth write FSelectComboBoxWidth;
505
506 // ??緇????御?????????????激?с?潟???ゃ?≪???違???帥??
507 property OptionDialogTabIndex : Integer read FOptionDialogTabIndex write FOptionDialogTabIndex;
508
509 // ??緇????御???????????c????????
510 property CabinetIndex : Integer read FCabinetIndex write FCabinetIndex;
511
512 //腟?篋?????∈茯????ゃ?≪???違??茵?ず??????
513 property ShowDialogForEnd : Boolean read FShowDialogForEnd write FShowDialogForEnd;
514
515 end;
516
517
518
519 implementation
520
521 type
522 TSoundName = record
523 Name: string;
524 ViewName: string;
525 FileName: string;
526 end;
527
528 const
529 INI_FILE_NAME: string = 'gikoNavi.ini';
530 BOARD_URL_INI_FILE_NAME: string = 'url.ini';
531 DEFAULT_FONT_NAME: string = '鐚?竺 鐚違?眼?激????#39;;
532 DEFAULT_FONT_SIZE: Integer = 9;
533 DEFAULT_FONT_COLOR: string = 'clWindowText';
534 DEFAULT_WINDOW_COLOR: string = 'clWindow';
535 DEFAULT_TAB_FONT_NAME: string = '鐚?竺 鐚違?眼?激????#39;;
536 DEFAULT_TAB_FONT_SIZE: Integer = 9;
537 DEFAULT_2CH_BOARD_URL1: string = 'http://www6.ocn.ne.jp/~mirv/2chmenu.html';
538 DEFAULT_2CH_BOARD_URL2: string = 'http://www.ff.iij4u.or.jp/~ch2/bbstable.html';
539 //'http://www.2ch.net/newbbsmenu.html';
540 GIKO_ENCRYPT_TEXT: string = 'gikoNaviEncryptText';
541
542 var
543 SOUND_NAME: array[0..4] of TSoundName = (
544 (Name: 'New'; ViewName: '??緇?????'; FileName: ''),
545 (Name: 'NewDiff'; ViewName: '??緇?????(綏???)'; FileName: ''),
546 (Name: 'NoChange'; ViewName: '???贋??#39;; FileName: ''),
547 // (Name: 'RoundEnd'; ViewName: '綏≦??腟?篋?(??緇?????)'; FileName: ''),
548 // (Name: 'RoundNone'; ViewName: '綏≦??腟?篋?(??緇?????)'; FileName: ''),
549 (Name: 'ResEnd'; ViewName: '???拷??篆≦?篋?'; FileName: ''),
550 (Name: 'Error'; ViewName: '??????#39;; FileName: ''));
551
552 //?潟?潟?鴻????????/span>
553 constructor TSetting.Create();
554 begin
555 FNameList := TStringList.Create;
556 FMailList := TStringList.Create;
557 FSelectTextList := TStringList.Create;
558 FBoardURLs := TStringList.Create;
559 FNameList.Duplicates := dupIgnore;
560 FMailList.Duplicates := dupIgnore;
561 FBoardURLs.Duplicates := dupIgnore;
562 FSelectTextList.Duplicates := dupIgnore;
563 ReadSettingFile();
564 ReadBoardURLsFile();
565 end;
566
567 //???鴻????????/span>
568 destructor TSetting.Destroy();
569 begin
570 inherited;
571 FSelectTextList.Free;
572 FBoardURLs.Free;
573 FMailList.Free;
574 FNameList.Free;
575 end;
576
577 //?????????<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
578 function TSetting.GetFileName(): string;
579 begin
580 Result := ExtractFilePath(Application.ExeName) + INI_FILE_NAME;
581 end;
582
583 //?炊?贋?亥??RL荐?????<?ゃ????鐚????刻????<?ゃ????鐚?
584 function TSetting.GetBoardURLFileName(): string;
585 begin
586 Result := ExtractFilePath(Application.ExeName) + BOARD_URL_INI_FILE_NAME;
587 end;
588
589 //荐?????<?ゃ???莨?/span>
590 procedure TSetting.ReadSettingFile();
591 const
592 DEFAULT_BBS_WIDTH: array[0..0] of Integer = (140);
593 DEFAULT_CATEGORY_WIDTH: array[0..2] of Integer = (150, 80, 130);
594 DEFAULT_BOARD_WIDTH: array[0..6] of Integer = (350, 60, 60, 60, 60, 80, 130);
595 var
596 ini: TMemIniFile;
597 i: Integer;
598 wkList: TStringList;
599 wkStr: string;
600 Exists: Boolean;
601 s: string;
602 // id: Integer;
603 CoolSet: TCoolSet;
604 begin
605 Exists := FileExists(GetFileName);
606 ini := TMemIniFile.Create(GetFileName);
607 try
608 //??篆<???????<?泣?ゃ??/span>
609 FRecvBufferSize := ini.ReadInteger('HTTP', 'RecvBufferSize', 4096);
610 //HTTP1.1篏睡??/span>
611 FProtocol := ini.ReadBool('HTTP', 'Protocol', True);
612 //???????傑・膓?HTTP1.1篏睡??/span>
613 FProxyProtocol := ini.ReadBool('HTTP', 'ProxyProtocol', False);
614
615 FReadProxy := ini.ReadBool('ReadProxy', 'Proxy', false);
616 FReadProxyAddress := ini.ReadString('ReadProxy', 'Address', '');
617 FReadProxyPort := ini.ReadInteger('ReadProxy', 'Port', 0);
618 FReadProxyUserID := ini.ReadString('ReadProxy', 'UserID', '');
619 FReadProxyPassword := ini.ReadString('ReadProxy', 'Password', '');
620
621 FWriteProxy := ini.ReadBool('WriteProxy', 'Proxy', false);
622 FWriteProxyAddress := ini.ReadString('WriteProxy', 'Address', '');
623 FWriteProxyPort := ini.ReadInteger('WriteProxy', 'Port', 0);
624 FWriteProxyUserID := ini.ReadString('WriteProxy', 'UserID', '');
625 FWriteProxyPassword := ini.ReadString('WriteProxy', 'Password', '');
626
627 FBrowserFontName := ini.ReadString('Window', 'BrowserFontName', '');
628 FBrowserFontSize := ini.ReadInteger('Window', 'BrowserFontSize', 0);
629 FBrowserFontBold := ini.ReadInteger('Window', 'BrowserFontBold', 0);
630 FBrowserFontItalic := ini.ReadInteger('Window', 'BrowserFontItalic', 0);
631 FBrowserFontColor := ini.ReadInteger('Window', 'BrowserFontColor', -1);
632 FBrowserBackColor := ini.ReadInteger('Window', 'BrowserBackColor', -1);
633
634 FCabinetFontName := ini.ReadString('Window', 'CabinetFontName', DEFAULT_FONT_NAME);
635 FCabinetFontSize := ini.ReadInteger('Window', 'CabinetFontSize', DEFAULT_FONT_SIZE);
636 FCabinetFontBold := ini.ReadBool('Window', 'CabinetFontBold', False);
637 FCabinetFontItalic := ini.ReadBool('Window', 'CabinetFontItalic', False);
638 FCabinetFontColor := StringToColor(ini.ReadString('Window', 'CabinetFontColor', DEFAULT_FONT_COLOR));
639 FCabinetBackColor := StringToColor(ini.ReadString('Window', 'CabinetBackColor', DEFAULT_WINDOW_COLOR));
640
641 FListFontName := ini.ReadString('Window', 'ListFontName', DEFAULT_FONT_NAME);
642 FListFontSize := ini.ReadInteger('Window', 'ListFontSize', DEFAULT_FONT_SIZE);
643 FListFontBold := ini.ReadBool('Window', 'ListFontBold', False);
644 FListFontItalic := ini.ReadBool('Window', 'ListFontItalic', False);
645 FListFontColor := StringToColor(ini.ReadString('Window', 'ListFontColor', DEFAULT_FONT_COLOR));
646 FListBackColor := StringToColor(ini.ReadString('Window', 'ListBackColor', DEFAULT_WINDOW_COLOR));
647
648 FEditorFontName := ini.ReadString('Window', 'EditorFontName', DEFAULT_FONT_NAME);
649 FEditorFontSize := ini.ReadInteger('Window', 'EditorFontSize', DEFAULT_FONT_SIZE);
650 FEditorFontBold := ini.ReadBool('Window', 'EditorFontBold', False);
651 FEditorFontItalic := ini.ReadBool('Window', 'EditorFontItalic', False);
652 FEditorFontColor := StringToColor(ini.ReadString('Window', 'EditorFontColor', DEFAULT_FONT_COLOR));
653 FEditorBackColor := StringToColor(ini.ReadString('Window', 'EditorBackColor', DEFAULT_WINDOW_COLOR));
654
655 FBrowserTabFontName := ini.ReadString('Window', 'BrowserTabFontName', DEFAULT_TAB_FONT_NAME);
656 FBrowserTabFontSize := ini.ReadInteger('Window', 'BrowserTabFontSize', DEFAULT_TAB_FONT_SIZE);
657 FBrowserTabFontBold := ini.ReadBool('Window', 'BrowserTabFontBold', False);
658 FBrowserTabFontItalic := ini.ReadBool('Window', 'BrowserTabFontItalic', False);
659
660 FHintFontName := ini.ReadString('Window', 'HintFontName', Screen.HintFont.Name);
661 FHintFontSize := ini.ReadInteger('Window', 'HintFontSize', Screen.HintFont.Size);
662 //FHintFontBold := ini.ReadBool('Window', 'HintFontBold', False);
663 //FHintFontItalic := ini.ReadBool('Window', 'HintFontItalic', False);
664 FHintFontColor := StringToColor(ini.ReadString('Window', 'HintFontColor', DEFAULT_FONT_COLOR));
665 FHintBackColor := StringToColor(ini.ReadString('Window', 'HintBackColor', 'clInfoBk'));
666
667 FWindowTop := ini.ReadInteger('WindowSize', 'Top', -1);
668 FWindowLeft := ini.ReadInteger('WindowSize', 'Left', -1);
669 FWindowHeight := ini.ReadInteger('WindowSize', 'Height', -1);
670 FWindowWidth := ini.ReadInteger('WindowSize', 'Width', -1);
671 FWindowMax := ini.ReadBool('WindowSize', 'Max', false);
672
673 if FWindowHeight <= 0 then FWindowHeight := 400;
674 if FWindowWidth <= 0 then FWindowWidth := 600;
675
676 FListStyle := TViewStyle(ini.ReadInteger('ViewStyle', 'ListView', Ord(vsReport)));
677
678 FEditWindowTop := ini.ReadInteger('EditorWindowSize', 'Top', -1);
679 FEditWindowLeft := ini.ReadInteger('EditorWindowSize', 'Left', -1);
680 FEditWindowHeight := ini.ReadInteger('EditorWindowSize', 'Height', -1);
681 FEditWindowWidth := ini.ReadInteger('EditorWindowSize', 'Width', -1);
682 FEditWindowMax := ini.ReadBool('EditorWindowSize', 'Max', False);
683
684 FOptionDialogTabIndex := ini.ReadInteger('OptionDialog', 'TabIndex', 0);
685
686 //???若??????/span>
687 FStdToolBarVisible := ini.ReadBool('ToolBar', 'StdVisible', True);
688 FAddressBarVisible := ini.ReadBool('ToolBar', 'AddressVisible', True);
689 FLinkBarVisible := ini.ReadBool('ToolBar', 'LinkVisible', True);
690 FListToolBarVisible := ini.ReadBool('ToolBar', 'ListVisible', True);
691 FListNameBarVisible := ini.ReadBool('ToolBar', 'ListNameVisible', True);
692 FBrowserToolBarVisible := ini.ReadBool('ToolBar', 'BrowserVisible', True);
693 FBrowserNameBarVisible := ini.ReadBool('ToolBar', 'BrowserNameVisible', True);
694 //???若??????rapable
695 FListToolBarWrapable := ini.ReadBool('ToolBar', 'ListWrapable', False);
696 FBrowserToolBarWrapable := ini.ReadBool('ToolBar', 'BrowserWrapable', False);
697
698 FBrowserTabVisible := ini.ReadBool('Tab', 'BrowserTabVisible', True);
699 FBrowserTabPosition := TGikoTabPosition(ini.ReadInteger('Tab', 'BrowserTabPosition', Ord(gtpTop)));
700 FBrowserTabAppend := TGikoTabAppend(ini.ReadInteger('Tab', 'BrowserTabAppend', Ord(gtaFirst)));
701 FBrowserTabStyle := TGikoTabStyle(ini.ReadInteger('Tab', 'BrowserTabStyle', Ord(gtsFlat)));
702
703 FMessageBarVisible := ini.ReadBool('MessageBar', 'Visible', True);
704 FMessegeBarHeight := ini.ReadInteger('MessageBar', 'Height', 30);
705
706 FStatusBarVisible := ini.ReadBool('StatusBar', 'Visible', True);
707
708 FCabinetVisible := ini.ReadBool('Cabinet', 'Visible', True);
709 FCabinetWidth := ini.ReadInteger('Cabinet', 'Width', 200);
710 FCabinetIndex := ini.ReadInteger('Cabinet', 'Index', 0);
711
712 FListOrientation := TGikoListOrientation(ini.ReadInteger('List', 'Orientation', Ord(gloHorizontal)));
713 FListHeight := ini.ReadInteger('List', 'Height', 180);
714 FListHeightState := TGikoListState(ini.ReadInteger('List', 'HeightState', Ord(glsNormal)));
715 FListWidth := ini.ReadInteger('List', 'Width', 180);
716 FListWidthState := TGikoListState(ini.ReadInteger('List', 'WidthState', Ord(glsNormal)));
717 // FListHeightMax := ini.ReadBool('List', 'HeightMax', False);
718 // FListWidthMax := ini.ReadBool('List', 'WidthMax', False);
719
720 wkList := TStringList.Create;
721 try
722 ini.ReadSection('Name', wkList);
723 for i := 0 to wkList.Count - 1 do begin
724 wkStr := ini.ReadString('Name', wkList[i], '');
725 if (wkStr <> '') and (FNameList.IndexOf(wkStr) = -1) then
726 FNameList.Add(wkStr);
727 end;
728 ini.ReadSection('Mail', wkList);
729 for i := 0 to wkList.Count - 1 do begin
730 wkStr := ini.ReadString('Mail', wkList[i], '');
731 if (wkStr <> '') and (FMailList.IndexOf(wkStr) = -1) then
732 FMailList.Add(wkStr);
733 end;
734 ini.ReadSection('SelectText', wkList);
735 for i := 0 to wkList.Count - 1 do begin
736 wkStr := ini.ReadString('SelectText', wkList[i], '');
737 if (wkStr <> '') and (FSelectTextList.IndexOf(wkStr) = -1) then
738 FSelectTextList.Add(wkStr);
739 end;
740 finally
741 wkList.Free;
742 end;
743
744 //???鴻????????
745 wkList := TStringList.Create;
746 try
747 ini.ReadSection('BBSColumnWidth', wkList);
748 if Length(FBBSColumnWidth) <> wkList.Count then begin
749 ini.EraseSection('BBSColumnWidth');
750 end;
751 for i := 0 to Length(FBBSColumnWidth) - 1 do begin
752 BBSColumnWidth[i] := ini.ReadInteger('BBSColumnWidth', 'ID' + IntToStr(i), DEFAULT_BBS_WIDTH[i]);
753 end;
754 ini.ReadSection('CategoryColumnWidth', wkList);
755 if Length(FCategoryColumnWidth) <> wkList.Count then begin
756 ini.EraseSection('CategoryColumnWidth');
757 end;
758 for i := 0 to Length(FCategoryColumnWidth) - 1 do begin
759 CategoryColumnWidth[i] := ini.ReadInteger('CategoryColumnWidth', 'ID' + IntToStr(i), DEFAULT_CATEGORY_WIDTH[i]);
760 end;
761 ini.ReadSection('BoardColumnWidth', wkList);
762 if Length(FBoardColumnWidth) <> wkList.Count then begin
763 ini.EraseSection('BoardColumnWidth');
764 end;
765 for i := 0 to Length(FBoardColumnWidth) - 1 do begin
766 BoardColumnWidth[i] := ini.ReadInteger('BoardColumnWidth', 'ID' + IntToStr(i), DEFAULT_BOARD_WIDTH[i]);
767 end;
768 finally
769 wkList.Free;
770 end;
771
772
773 //???鴻?????/span>
774 FListViewNo := ini.ReadBool('Function', 'ListViewNo', True);
775 //CSS
776 FUseCSS := ini.ReadBool('CSS', 'UseCSS', True);
777 //CSS???<?ゃ????
778 FCSSFileName := ini.ReadString('CSS', 'FileName', 'default.css');
779
780 //Mail罨?茵?ず
781 FShowMail := ini.ReadBool('Thread', 'ShowMail', True);
782 //????00???壕;腓?/span>
783 FOnlyAHundredRes := ini.ReadBool('Thread', 'OnlyAHundredRes',false);
784 //???≪?????c???????鴻???????≪????茵?ず
785 FUnActivePopup := ini.ReadBool('Thread', 'UnActivePopup', False);
786 //???鴻???????≪???????????若???若????
787 FResPopupHeaderBold := ini.ReadBool('Thread', 'ResPopupHeaderBold', True);
788
789 //???ょ∈茯?
790 FDeleteMsg := ini.ReadBool('Function', 'LogDeleteMessage', True);
791 //腟?篋?腆肴?
792 FShowDialogForEnd := ini.ReadBool('Function','ShowDialogForEnd',false);
793
794 //???違????????
795 FLogFolder := ini.ReadString('Folder', 'LogFolder', ExtractFilePath(Application.ExeName) + 'Log');
796 NewLogFolder := '';
797
798 //??RL
799 //茲??亥?脂?蚊?с??????????????BoardURLs????????2003/10/05
800 //FBoardURL2ch := ini.ReadString('BoardURL', '2ch', DEFAULT_2CH_BOARD_URL);
801
802 //茯?荐主?????若??D?祉???鴻???若??
803 FUserID := ini.ReadString('Attestation', 'UserID', '');
804 FPassword := Decrypt(ini.ReadString('Attestation', 'Password', ''));
805 FAutoLogin := ini.ReadBool('Attestation', 'AutoLogin', False);
806
807 //URL??????????莎桁???≪????/span>
808 FURLApp := ini.ReadBool('URLApp', 'Select', False);
809 FURLAppFile := ini.ReadString('URLApp', 'File', '');
810
811 //mailto????????????篏?
812 FOpenMailer := ini.ReadBool('Mailto', 'Open', True);
813
814 //???????≪????篏?臀?/span>
815 FPopupPosition := TGikoPopupPosition(ini.ReadInteger('Browser', 'PopupPosition', Ord(gppLeftBottom)));
816
817 //?≪?????鴻????/span>
818 FURLDisplay := ini.ReadBool('AddressBar', 'URLDisplay', False);
819 FAddressBarTabStop := ini.ReadBool('AddressBar', 'TabStop', True);
820 FLinkAddAddressBar := ini.ReadBool('AddressBar', 'LinkAdd', False);
821 FAddressHistoryCount := ini.ReadInteger('AddressBar', 'HistoryCount', 100);
822
823 //?糸????????ャ??/span>
824 FPreviewVisible := ini.ReadBool('Browser', 'PreviewVisible', True);
825 FPreviewSize := TGikoPreviewSize(ini.ReadInteger('Browser', 'PreviewSize', Ord(gpsMedium)));
826 FPreviewWait := ini.ReadInteger('Browser', 'PreviewWait', 500);
827
828 //?鴻??????筝?荀ф?贋?違?≪?ゃ?潟??/span>
829 FListIconVisible := ini.ReadBool('ThreadList', 'StateIconVisible', True);
830
831 //?吾??莨若?炊?????激?恰???私戎??┃絎?
832 FUseMachineTime := ini.ReadBool('PostTime', 'UseMachineTime', False);
833 FTimeAdjustSec := ini.ReadInteger('PostTime', 'TimeAdjustSec', 0);
834 FTimeAdjust := ini.ReadBool('PostTime', 'TimeAdjust', True);
835
836 //?泣???潟??
837 if Exists then begin
838 for i := 0 to GetSoundCount - 1 do begin
839 SoundFileName[i] := ini.ReadString('Sound', SoundName[i], '');
840 if not FileExists(SoundFileName[i]) then
841 SoundFileName[i] := '';
842 end;
843 end else begin
844 s := ExtractFileDir(Application.ExeName) + '\sound\';
845 SoundFileName[0] := s + '??緇?????.wav';
846 SoundFileName[1] := s + '??緇?????(綏???).wav';
847 SoundFileName[2] := s + '???贋??wav';
848 SoundFileName[3] := '';
849 SoundFileName[4] := s + '??????wav';
850 end;
851
852 //???若??????/span>
853 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
854 CoolSet.FCoolID := ini.ReadInteger('MainCoolBar', 'ID' + IntToStr(i), -1);
855 CoolSet.FCoolWidth := ini.ReadInteger('MainCoolBar', 'Width' + IntToStr(i), -1);
856 CoolSet.FCoolBreak := ini.ReadBool('MainCoolBar', 'Break' + IntToStr(i), False);
857 MainCoolSet[i] := CoolSet;
858 end;
859 FSelectComboBoxWidth := ini.ReadInteger( 'ListCoolBar', 'SelectWidth', 127 );
860 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
861 CoolSet.FCoolID := ini.ReadInteger('ListCoolBar', 'ID' + IntToStr(i), -1);
862 CoolSet.FCoolWidth := ini.ReadInteger('ListCoolBar', 'Width' + IntToStr(i), -1);
863 CoolSet.FCoolBreak := ini.ReadBool('ListCoolBar', 'Break' + IntToStr(i), False);
864 ListCoolSet[i] := CoolSet;
865 end;
866 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
867 CoolSet.FCoolID := ini.ReadInteger('BrowserCoolBar', 'ID' + IntToStr(i), -1);
868 CoolSet.FCoolWidth := ini.ReadInteger('BrowserCoolBar', 'Width' + IntToStr(i), -1);
869 CoolSet.FCoolBreak := ini.ReadBool('BrowserCoolBar', 'Break' + IntToStr(i), False);
870 BrowserCoolSet[i] := CoolSet;
871 end;
872
873 //???若????
874 FAbonDeleterlo := ini.ReadBool('Abon','Deleterlo',false);
875 FAbonReplaceul := ini.ReadBool('Abon','Replaceul',false);
876 FPopUpAbon := ini.ReadBool('Abon','Popup',false);
877 FShowNGLinesNum := ini.ReadBool('Abon','ShowNGLines',false);
878 FAddResAnchor := ini.ReadBool('Abon','AddResAnchor',false);
879
880 finally
881 ini.Free;
882 end;
883 end;
884 //?炊?贋?亥??RL茯??粋昭??/span>
885 procedure TSetting.ReadBoardURLsFile();
886 var
887 ini: TMemIniFile;
888 urlNum: Integer;
889 i : Integer;
890 begin
891 if not FileExists(GetBoardURLFileName()) then
892 MakeURLIniFile();
893 ini := TMemIniFile.Create(GetBoardURLFileName());
894 try
895 urlNum := ini.ReadInteger('URL','count',0);
896 BoardURLSelected := ini.ReadInteger('URL','selected',0);
897 for i := 0 to urlNum - 1 do begin
898 FBoardURLs.Append(ini.ReadString('URL',IntToStr(i+1),''));
899 end;
900 finally
901 ini.Free;
902 end;
903
904 end;
905 //荐?????<?ゃ???絖?(system)
906 procedure TSetting.WriteSystemSettingFile();
907 var
908 ini: TMemIniFile;
909 begin
910 ini := TMemIniFile.Create(GetFileName());
911 try
912 //??篆<???????<?泣?ゃ??/span>
913 ini.WriteInteger('HTTP', 'RecvBufferSize', FRecvBufferSize);
914 //HTTP1.1篏睡??/span>
915 ini.WriteBool('HTTP', 'Protocol', FProtocol);
916 //???????傑・膓?HTTP1.1篏睡??/span>
917 ini.WriteBool('HTTP', 'ProxyProtocol', FProxyProtocol);
918
919 ini.WriteBool('ReadProxy', 'Proxy', FReadProxy);
920 ini.WriteString('ReadProxy', 'Address', FReadProxyAddress);
921 ini.WriteInteger('ReadProxy', 'Port', FReadProxyPort);
922 ini.WriteString('ReadProxy', 'UserID', FReadProxyUserID);
923 ini.WriteString('ReadProxy', 'Password', FReadProxyPassword);
924
925 ini.WriteBool('WriteProxy', 'Proxy', FWriteProxy);
926 ini.WriteString('WriteProxy', 'Address', FWriteProxyAddress);
927 ini.WriteInteger('WriteProxy', 'Port', FWriteProxyPort);
928 ini.WriteString('WriteProxy', 'UserID', FWriteProxyUserID);
929 ini.WriteString('WriteProxy', 'Password', FWriteProxyPassword);
930
931 ini.WriteString('Window', 'BrowserFontName', FBrowserFontName);
932 ini.WriteInteger('Window', 'BrowserFontSize', FBrowserFontSize);
933 ini.WriteInteger('Window', 'BrowserFontSize', FBrowserFontSize);
934 ini.WriteInteger('Window', 'BrowserFontBold', FBrowserFontBold);
935 ini.WriteInteger('Window', 'BrowserFontItalic', FBrowserFontItalic);
936 ini.WriteInteger('Window', 'BrowserFontColor', FBrowserFontColor);
937 ini.WriteInteger('Window', 'BrowserBackColor', FBrowserBackColor);
938
939 ini.WriteString('Window', 'CabinetFontName', FCabinetFontName);
940 ini.WriteInteger('Window', 'CabinetFontSize', FCabinetFontSize);
941 ini.WriteString('Window', 'CabinetFontColor', ColorToString(FCabinetFontColor));
942 ini.WriteString('Window', 'CabinetBackColor', ColorToString(FCabinetBackColor));
943
944 ini.WriteString('Window', 'ListFontName', FListFontName);
945 ini.WriteInteger('Window', 'ListFontSize', FListFontSize);
946 ini.WriteString('Window', 'ListFontColor', ColorToString(FListFontColor));
947 ini.WriteString('Window', 'ListBackColor', ColorToString(FListBackColor));
948
949 ini.WriteString('Window', 'EditorFontName', FEditorFontName);
950 ini.WriteInteger('Window', 'EditorFontSize', FEditorFontSize);
951 ini.WriteString('Window', 'EditorFontColor', ColorToString(FEditorFontColor));
952 ini.WriteString('Window', 'EditorBackColor', ColorToString(FEditorBackColor));
953
954 ini.WriteString('Window', 'BrowserTabFontName', FBrowserTabFontName);
955 ini.WriteInteger('Window', 'BrowserTabFontSize', FBrowserTabFontSize);
956 ini.WriteBool('Window', 'BrowserTabFontBold', FBrowserTabFontBold);
957 ini.WriteBool('Window', 'BrowserTabFontItalic', FBrowserTabFontItalic);
958
959 ini.WriteString('Window', 'HintFontName', FHintFontName);
960 ini.WriteInteger('Window', 'HintFontSize', FHintFontSize);
961 ini.WriteString('Window', 'HintFontColor', ColorToString(FHintFontColor));
962 ini.WriteString('Window', 'HintBackColor', ColorToString(FHintBackColor));
963
964 ini.UpdateFile;
965 finally
966 ini.Free;
967 end;
968 end;
969
970 //荐?????<?ゃ???絖?(window)
971 procedure TSetting.WriteWindowSettingFile();
972 var
973 i: Integer;
974 ini: TMemIniFile;
975 CoolSet: TCoolSet;
976 begin
977 ini := TMemIniFile.Create(GetFileName());
978 try
979 ini.WriteInteger('WindowSize', 'Top', WindowTop);
980 ini.WriteInteger('WindowSize', 'Left', WindowLeft);
981 ini.WriteInteger('WindowSize', 'Height', WindowHeight);
982 ini.WriteInteger('WindowSize', 'Width', WindowWidth);
983 ini.WriteBool('WindowSize', 'Max', WindowMax);
984
985 ini.WriteInteger('ViewStyle', 'ListView', Ord(ListStyle));
986
987 ini.WriteInteger('EditorWindowSize', 'Top', EditWindowTop);
988 ini.WriteInteger('EditorWindowSize', 'Left', EditWindowLeft);
989 ini.WriteInteger('EditorWindowSize', 'Height', EditWindowHeight);
990 ini.WriteInteger('EditorWindowSize', 'Width', EditWindowWidth);
991 ini.WriteBool('EditorWindowSize', 'Max', EditWindowMax);
992
993 ini.WriteInteger('OptionDialog', 'TabIndex', FOptionDialogTabIndex);
994
995 //???若??????/span>
996 ini.WriteBool('ToolBar', 'StdVisible', FStdToolBarVisible);
997 ini.WriteBool('ToolBar', 'AddressVisible', FAddressBarVisible);
998 ini.WriteBool('ToolBar', 'LinkVisible', FLinkBarVisible);
999 ini.WriteBool('ToolBar', 'ListVisible', FListToolBarVisible);
1000 ini.WriteBool('ToolBar', 'ListNameVisible', FListNameBarVisible);
1001 ini.WriteBool('ToolBar', 'BrowserVisible', FBrowserToolBarVisible);
1002 ini.WriteBool('ToolBar', 'BrowserNameVisible', FBrowserNameBarVisible);
1003 //???若??????rapable
1004 ini.WriteBool('ToolBar', 'ListWrapable', FListToolBarWrapable);
1005 ini.WriteBool('ToolBar', 'BrowserWrapable', FBrowserToolBarWrapable);
1006
1007 //?帥??
1008 ini.WriteBool('Tab', 'BrowserTabVisible', FBrowserTabVisible);
1009 ini.WriteInteger('Tab', 'BrowserTabPosition', Ord(FBrowserTabPosition));
1010 ini.WriteInteger('Tab', 'BrowserTabAppend', Ord(FBrowserTabAppend));
1011 ini.WriteInteger('Tab', 'BrowserTabStyle', Ord(FBrowserTabStyle));
1012
1013 //?<???祉?若?吾????/span>
1014 ini.WriteBool('MessageBar', 'Visible', FMessageBarVisible);
1015 ini.WriteInteger('MessageBar', 'Height', FMessegeBarHeight);
1016
1017 //?鴻???若?帥?鴻????/span>
1018 ini.WriteBool('StatusBar', 'Visible', FStatusBarVisible);
1019
1020 //???c????????
1021 ini.WriteBool('Cabinet', 'Visible', FCabinetVisible);
1022 ini.WriteInteger('Cabinet', 'Width', FCabinetWidth);
1023 ini.WriteInteger('Cabinet', 'Index', FCabinetIndex);
1024
1025 //???鴻?????泣?ゃ?冴?????贋梓綛?/span>
1026 ini.WriteInteger('List', 'Orientation', Ord(FListOrientation));
1027 ini.WriteInteger('List', 'Height', FListHeight);
1028 ini.WriteInteger('List', 'HeightState', Ord(FListHeightState));
1029 ini.WriteInteger('List', 'Width', FListWidth);
1030 ini.WriteInteger('List', 'WidthState', Ord(FListWidthState));
1031 // ini.WriteBool('List', 'HeightMax', FListHeightMax);
1032 // ini.WriteBool('List', 'WidthMax', FListWidthMax);
1033
1034
1035 // ini.WriteInteger('Window', 'BrowserFontSize', BrowserFontSize);
1036
1037 //???鴻????埈;腓?/span>
1038 ini.WriteBool('Function', 'ListViewNo', FListViewNo);
1039 //CSS篏睡??/span>
1040 ini.WriteBool('CSS', 'UseCSS', FUseCSS);
1041 //CSS???<?ゃ????
1042 ini.WriteString('CSS', 'FileName', FCSSFileName);
1043 //Mail罨?茵?ず
1044 ini.WriteBool('Thread', 'ShowMail', FShowMail);
1045 //????00???壕;腓?/span>
1046 ini.WriteBool('Thread', 'OnlyAHundredRes', FOnlyAHundredRes);
1047 //???医???ょ∈茯?
1048 ini.WriteBool('Function', 'LogDeleteMessage', FDeleteMsg);
1049 //腟?篋?腆肴?
1050 ini.WriteBool('Function','ShowDialogForEnd',FShowDialogForEnd);
1051 //???≪?????c???????????≪????茵?ず
1052 ini.WriteBool('Thread', 'UnActivePopup', FUnActivePopup);
1053 //???鴻???????≪???????????若???若????
1054 ini.WriteBool('Thread', 'ResPopupHeaderBold', FResPopupHeaderBold);
1055
1056 //ini.WriteString('BoardURL', '2ch', FBoardURL2ch);
1057
1058 //茯?荐主?????若??D?祉???鴻???若??
1059 ini.WriteString('Attestation', 'UserID', FUserID);
1060 ini.WriteString('Attestation', 'Password', Encrypt(FPassword));
1061 ini.WriteBool('Attestation', 'AutoLogin', FAutoLogin);
1062
1063 //URL??????????莎桁???≪????/span>
1064 ini.WriteBool('URLApp', 'Select', FURLApp);
1065 ini.WriteString('URLApp', 'File', FURLAppFile);
1066
1067 //mailto????????????篏?
1068 ini.WriteBool('Mailto', 'Open', FOpenMailer);
1069
1070 //???????≪????篏?臀?/span>
1071 ini.WriteInteger('Browser', 'PopupPosition', Ord(FPopupPosition));
1072
1073 //?≪?????鴻????/span>
1074 ini.WriteBool('AddressBar', 'URLDisplay', FURLDisplay);
1075 ini.WriteBool('AddressBar', 'TabStop', FAddressBarTabStop);
1076 ini.WriteBool('AddressBar', 'LinkAdd', FLinkAddAddressBar);
1077 ini.WriteInteger('AddressBar', 'HistoryCount', FAddressHistoryCount);
1078
1079 //?糸????????ャ??/span>
1080 ini.WriteBool('Browser', 'PreviewVisible', FPreviewVisible);
1081 ini.WriteInteger('Browser', 'PreviewSize', Ord(FPreviewSize));
1082 ini.WriteInteger('Browser', 'PreviewWait', FPreviewWait);
1083
1084 //?鴻??????筝?荀ф?贋?違?≪?ゃ?潟??/span>
1085 ini.WriteBool('ThreadList', 'StateIconVisible', FListIconVisible);
1086
1087 //?吾??莨若?炊?????激?恰???私戎??┃絎?
1088 ini.WriteBool('PostTime', 'UseMachineTime', FUseMachineTime);
1089 ini.WriteInteger('PostTime', 'TimeAdjustSec', FTimeAdjustSec);
1090 ini.WriteBool('PostTime', 'TimeAdjust', FTimeAdjust);
1091
1092 //???鴻????????
1093 for i := 0 to Length(FBBSColumnWidth) - 1 do begin
1094 ini.WriteInteger('BBSColumnWidth', 'ID' + IntToStr(i), FBBSColumnWidth[i]);
1095 end;
1096 for i := 0 to Length(FCategoryColumnWidth) - 1 do begin
1097 ini.WriteInteger('CategoryColumnWidth', 'ID' + IntToStr(i), FCategoryColumnWidth[i]);
1098 end;
1099 for i := 0 to Length(FBoardColumnWidth) - 1 do begin
1100 ini.WriteInteger('BoardColumnWidth', 'ID' + IntToStr(i), FBoardColumnWidth[i]);
1101 end;
1102
1103 //?泣???潟??
1104 for i := 0 to GetSoundCount - 1 do begin
1105 if not FileExists(SoundFileName[i]) then
1106 SoundFileName[i] := '';
1107 ini.WriteString('Sound', SoundName[i], SoundFileName[i]);
1108 end;
1109
1110 //CoolBar
1111 ini.EraseSection('MainCoolBar');
1112 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1113 CoolSet := MainCoolSet[i];
1114 ini.WriteInteger('MainCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
1115 ini.WriteInteger('MainCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
1116 ini.WriteBool('MainCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
1117 end;
1118 ini.EraseSection('ListCoolBar');
1119 ini.WriteInteger( 'ListCoolBar', 'SelectWidth', FSelectComboBoxWidth );
1120 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1121 CoolSet := ListCoolSet[i];
1122 ini.WriteInteger('ListCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
1123 ini.WriteInteger('ListCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
1124 ini.WriteBool('ListCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
1125 end;
1126 ini.EraseSection('BrowserCoolBar');
1127 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1128 CoolSet := BrowserCoolSet[i];
1129 ini.WriteInteger('BrowserCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
1130 ini.WriteInteger('BrowserCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
1131 ini.WriteBool('BrowserCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
1132 end;
1133
1134 //???若????
1135 ini.WriteBool('Abon','Deleterlo',FAbonDeleterlo);
1136 ini.WriteBool('Abon','Replaceul',FAbonReplaceul);
1137 ini.WriteBool('Abon','Popup',FPopUpAbon);
1138 ini.WriteBool('Abon','ShowNGLines',FShowNGLinesNum);
1139 ini.WriteBool('Abon','AddResAnchor',FAddResAnchor);
1140
1141 ini.UpdateFile;
1142 finally
1143 ini.Free;
1144 end;
1145 end;
1146
1147 //荐?????<?ゃ???絖?(name & mail)
1148 procedure TSetting.WriteNameMailSettingFile();
1149 var
1150 i: Integer;
1151 ini: TMemIniFile;
1152 begin
1153 ini := TMemIniFile.Create(GetFileName());
1154 try
1155 ini.EraseSection('Name');
1156 ini.EraseSection('Mail');
1157 ini.EraseSection('SelectText');
1158 for i := 0 to FNameList.Count - 1 do begin
1159 ini.WriteString('Name', Format('%.2d', [i + 1]), FNameList[i]);
1160 if i >= 39 then
1161 Break;
1162 end;
1163 for i := 0 to FMailList.Count - 1 do begin
1164 ini.WriteString('Mail', Format('%.2d', [i + 1]), FMailList[i]);
1165 if i >= 39 then
1166 Break;
1167 end;
1168 for i := 0 to FSelectTextList.Count - 1 do begin
1169 ini.WriteString('SelectText', Format('%.2d', [i + 1]), FSelectTextList[i]);
1170 if i >= 39 then
1171 Break;
1172 end;
1173 ini.UpdateFile;
1174 finally
1175 ini.Free;
1176 end;
1177 end;
1178
1179 procedure TSetting.WriteFolderSettingFile();
1180 var
1181 ini: TMemIniFile;
1182 begin
1183 ini := TMemIniFile.Create(GetFileName());
1184 try
1185 if ExtractFilePath(Application.ExeName) + 'Log' = NewLogFolder then
1186 ini.DeleteKey('Folder', 'LogFolder')
1187 else
1188 ini.WriteString('Folder', 'LogFolder', NewLogFolder);
1189 ini.UpdateFile;
1190 finally
1191 ini.Free;
1192 end;
1193 end;
1194 //?炊?贋?亥??oardURL??篆?絖?
1195 procedure TSetting.WriteBoardURLSettingFile();
1196 var
1197 ini: TMemIniFile;
1198 i : Integer;
1199 oldcount : Integer;
1200 begin
1201 ini := TMemIniFile.Create(GetBoardURLFileName());
1202 try
1203 oldcount := ini.ReadInteger('URL','count',FBoardURLs.Count);
1204 ini.WriteInteger('URL','count',FBoardURLs.Count);
1205 ini.WriteInteger('URL','selected',BoardURLSelected);
1206 for i := 0 to FBoardURLs.Count -1 do begin
1207 ini.WriteString('URL',IntToStr(i+1),FBoardURLs.Strings[i]);
1208 end;
1209 if oldcount > FBoardURLs.Count then begin
1210 for i := FBoardURLs.Count to oldcount do begin
1211 ini.DeleteKey('URL',IntToStr(i+1));
1212 end;
1213 end;
1214 ini.UpdateFile;
1215 finally
1216 ini.Free;
1217 end;
1218 end;
1219
1220 //???鴻????????????????/span>
1221 function TSetting.GetBBSColumnWidth(index: Integer): Integer;
1222 begin
1223 Result := IfThen(index in [0..Length(FBBSColumnWidth) - 1], FBBSColumnWidth[index], 0);
1224 end;
1225
1226 function TSetting.GetCategoryColumnWidth(index: Integer): Integer;
1227 begin
1228 Result := IfThen(index in [0..Length(FCategoryColumnWidth) - 1], FCategoryColumnWidth[index], 0);
1229 end;
1230
1231 function TSetting.GetBoardColumnWidth(index: Integer): Integer;
1232 begin
1233 Result := IfThen(index in [0..Length(FBoardColumnWidth) - 1], FBoardColumnWidth[index], 0);
1234 end;
1235
1236 procedure TSetting.SetBBSColumnWidth(index: Integer; value: Integer);
1237 begin
1238 if index in [0..Length(FBBSColumnWidth) - 1] then
1239 FBBSColumnWidth[index] := value;
1240 end;
1241
1242 procedure TSetting.SetCategoryColumnWidth(index: Integer; value: Integer);
1243 begin
1244 if index in [0..Length(FCategoryColumnWidth) - 1] then
1245 FCategoryColumnWidth[index] := value;
1246 end;
1247
1248 procedure TSetting.SetBoardColumnWidth(index: Integer; value: Integer);
1249 begin
1250 if index in [0..Length(FBoardColumnWidth) - 1] then
1251 FBoardColumnWidth[index] := value;
1252 end;
1253
1254 function TSetting.GetSoundCount: Integer;
1255 begin
1256 Result := Length(SOUND_NAME);
1257 end;
1258
1259 function TSetting.GetSoundName(Index: Integer): string;
1260 begin
1261 if (Index < GetSoundCount) and (Index >= 0) then
1262 Result := SOUND_NAME[Index].Name
1263 else
1264 Result := '';
1265 end;
1266
1267 function TSetting.GetSoundViewName(Index: Integer): string;
1268 begin
1269 if (Index < GetSoundCount) and (Index >= 0) then
1270 Result := SOUND_NAME[Index].ViewName
1271 else
1272 Result := '';
1273 end;
1274
1275 function TSetting.GetSoundFileName(Index: Integer): string;
1276 begin
1277 if (Index < GetSoundCount) and (Index >= 0) then
1278 Result := SOUND_NAME[Index].FileName
1279 else
1280 Result := '';
1281 end;
1282
1283 procedure TSetting.SetSoundFileName(Index: Integer; value: string);
1284 begin
1285 if (Index < GetSoundCount) and (Index >= 0) then
1286 SOUND_NAME[Index].FileName := value;
1287 end;
1288
1289 function TSetting.FindSoundFileName(Name: string): string;
1290 var
1291 i: Integer;
1292 begin
1293 for i := 0 to GetSoundCount - 1 do begin
1294 if SoundName[i] = Name then begin
1295 Result := SoundFileName[i];
1296 Exit;
1297 end;
1298 end;
1299 Result := '';
1300 end;
1301
1302 function TSetting.Encrypt(s: string): string;
1303 var
1304 cryptObj: THogeCryptAuto;
1305 inputStream, outputStream: TStringStream;
1306 begin
1307 inputStream := TStringStream.Create(s);
1308 outputStream := TStringStream.Create('');
1309 cryptObj := THogeCryptAuto.Create;
1310 try
1311 // ???桁??
1312 cryptObj.Encrypt(inputStream, GIKO_ENCRYPT_TEXT, outputStream);
1313
1314 // ???ゃ?????????у?荀?????????????鴻???????
1315 Result := HogeBase64Encode(outputStream.DataString);
1316 finally
1317 cryptObj.Free;
1318 outputStream.Free;
1319 inputStream.Free;
1320 end;
1321 end;
1322
1323 function TSetting.Decrypt(s: string): string;
1324 var
1325 cryptObj: THogeCryptAuto;
1326 inputStream, outputStream: TStringStream;
1327 begin
1328 try
1329 inputStream := TStringStream.Create(HogeBase64Decode(s));
1330 except
1331 Result := '';
1332 Exit;
1333 end;
1334 outputStream := TStringStream.Create('');
1335 cryptObj := THogeCryptAuto.Create;
1336 try
1337 // 緇??/span>
1338 cryptObj.Decrypt(inputStream, GIKO_ENCRYPT_TEXT, outputStream);
1339 Result := outputStream.DataString;
1340 finally
1341 cryptObj.Free;
1342 outputStream.Free;
1343 inputStream.Free;
1344 end;
1345 end;
1346
1347 function TSetting.GetMainCoolSet(Index: Integer): TCoolSet;
1348 begin
1349 if Index in [0..MAIN_COOLBAND_COUNT - 1] then
1350 Result := FMainCoolBar[Index]
1351 else begin
1352 Result.FCoolID := -1;
1353 Result.FCoolWidth := -1;
1354 Result.FCoolBreak := False;
1355 end;
1356 end;
1357
1358 function TSetting.GetBoardCoolSet(Index: Integer): TCoolSet;
1359 begin
1360 if Index in [0..LIST_COOLBAND_COUNT - 1] then
1361 Result := FListCoolBar[Index]
1362 else begin
1363 Result.FCoolID := -1;
1364 Result.FCoolWidth := -1;
1365 Result.FCoolBreak := False;
1366 end;
1367 end;
1368
1369 function TSetting.GetBrowserCoolSet(Index: Integer): TCoolSet;
1370 begin
1371 if Index in [0..BROWSER_COOLBAND_COUNT - 1] then
1372 Result := FBrowserCoolBar[Index]
1373 else begin
1374 Result.FCoolID := -1;
1375 Result.FCoolWidth := -1;
1376 Result.FCoolBreak := False;
1377 end;
1378 end;
1379
1380 procedure TSetting.SetMainCoolSet(Index: Integer; CoolSet: TCoolSet);
1381 begin
1382 if Index in [0..MAIN_COOLBAND_COUNT - 1] then
1383 FMainCoolBar[Index] := CoolSet;
1384 end;
1385
1386 procedure TSetting.SetBoardCoolSet(Index: Integer; CoolSet: TCoolSet);
1387 begin
1388 if Index in [0..LIST_COOLBAND_COUNT - 1] then
1389 FListCoolBar[Index] := CoolSet;
1390 end;
1391
1392 procedure TSetting.SetBrowserCoolSet(Index: Integer; CoolSet: TCoolSet);
1393 begin
1394 if Index in [0..BROWSER_COOLBAND_COUNT - 1] then
1395 FBrowserCoolBar[Index] := CoolSet;
1396 end;
1397
1398 //url.ini????????????????????
1399 procedure TSetting.MakeURLIniFile();
1400 var
1401 ini: TMemIniFile;
1402 begin
1403 ini := TMemIniFile.Create(GetBoardURLFileName());
1404 try
1405 ini.WriteInteger('URL','count',2);
1406 ini.WriteInteger('URL','selected',2);
1407 ini.WriteString('URL','1',DEFAULT_2CH_BOARD_URL1);
1408 ini.WriteString('URL','2',DEFAULT_2CH_BOARD_URL2);
1409 ini.UpdateFile;
1410 finally
1411 ini.Free;
1412 end;
1413 end;
1414
1415 (*************************************************************************
1416 *???若?????<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
1417 *************************************************************************)
1418 function TSetting.GetBoardFileName: string;
1419 begin
1420 Result := GetAppDir + CONFIG_DIR_NAME + '\' + BOARD_FILE_NAME;
1421 end;
1422
1423 (*************************************************************************
1424 *???若?????<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
1425 *************************************************************************)
1426 function TSetting.GetCustomBoardFileName: string;
1427 begin
1428 Result := GetAppDir + CONFIG_DIR_NAME + '\' + CUSTOMBOARD_FILE_NAME;
1429 end;
1430
1431 (*************************************************************************
1432 *???潟???????????????弱????緇?
1433 *************************************************************************)
1434 function TSetting.GetHtmlTempFileName: string;
1435 begin
1436 Result := TEMP_FOLDER;
1437 end;
1438
1439
1440 (*************************************************************************
1441 *絎?茵????<?ゃ????????????緇?
1442 *************************************************************************)
1443 function TSetting.GetAppDir: string;
1444 begin
1445 Result := ExtractFilePath(Application.ExeName);
1446 end;
1447
1448 (*************************************************************************
1449 *TempHtml???<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
1450 *************************************************************************)
1451 function TSetting.GetTempFolder: string;
1452 begin
1453 Result := GetAppDir + TEMP_FOLDER;
1454 end;
1455
1456 (*************************************************************************
1457 *sent.ini???<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
1458 *************************************************************************)
1459 function TSetting.GetSentFileName: string;
1460 begin
1461 Result := GetAppDir + SENT_FILE_NAME;
1462 end;
1463
1464 (*************************************************************************
1465 *outbox.ini???<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
1466 *************************************************************************)
1467 function TSetting.GetOutBoxFileName: string;
1468 begin
1469 Result := GetAppDir + OUTBOX_FILE_NAME;
1470 end;
1471
1472 (*************************************************************************
1473 *Config??????????緇?
1474 *************************************************************************)
1475 function TSetting.GetConfigDir: string;
1476 begin
1477 Result := IncludeTrailingPathDelimiter(GetAppDir + CONFIG_DIR_NAME);
1478 end;
1479
1480 function TSetting.GetStyleSheetDir: string;
1481 begin
1482 Result := IncludeTrailingPathDelimiter(GetConfigDir + CSS_DIR_NAME);
1483 end;
1484
1485 function TSetting.GetSkinDir: string;
1486 begin
1487 Result := IncludeTrailingPathDelimiter(GetConfigDir + SKIN_DIR_NAME);
1488 end;
1489
1490 function TSetting.GetSkinHeaderFileName: string;
1491 begin
1492 Result := CSSFileName + SKIN_HEADER_FILE_NAME;
1493 end;
1494
1495 function TSetting.GetSkinFooterFileName: string;
1496 begin
1497 Result := CSSFileName + SKIN_FOOTER_FILE_NAME;
1498 end;
1499
1500 function TSetting.GetSkinNewResFileName: string;
1501 begin
1502 Result := CSSFileName + SKIN_NEWRES_FILE_NAME;
1503 end;
1504
1505 function TSetting.GetSkinResFileName: string;
1506 begin
1507 Result := CSSFileName + SKIN_RES_FILE_NAME;
1508 end;
1509
1510 function TSetting.GetSkinBookmarkFileName: string;
1511 begin
1512 Result := CSSFileName + SKIN_BOOKMARK_FILE_NAME;
1513 end;
1514
1515 function TSetting.GetSkinNewmarkFileName: string;
1516 begin
1517 Result := CSSFileName + SKIN_NEWMARK_FILE_NAME;
1518 end;
1519
1520 procedure TSetting.SetUseCSS( value: Boolean );
1521 begin
1522
1523 FUseCSS := value;
1524
1525 FUseSkin :=
1526 UseCSS and
1527 (Pos( GetSkinDir, CSSFileName ) > 0) and
1528 FileExists( GetSkinHeaderFileName );
1529
1530 end;
1531
1532 procedure TSetting.SetCSSFileName( fileName: string );
1533 begin
1534
1535 FCSSFileName := fileName;
1536
1537 FUseSkin :=
1538 UseCSS and
1539 (Pos( GetSkinDir, CSSFileName ) > 0) and
1540 FileExists( GetSkinHeaderFileName );
1541
1542 end;
1543
1544 end.
1545

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