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.15 - (show annotations) (download) (as text)
Mon Nov 3 11:49:34 2003 UTC (20 years, 5 months ago) by yoffy
Branch: MAIN
Changes since 1.14: +7 -0 lines
File MIME type: text/x-pascal
・GetNGWordsDir を追加。

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

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