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.65 - (show annotations) (download) (as text)
Wed Sep 8 08:10:05 2004 UTC (19 years, 7 months ago) by yoffy
Branch: MAIN
Changes since 1.64: +13 -9 lines
File MIME type: text/x-pascal
カラム位置を変えても正しく表示できるようになった。

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 BOARD_DIR_NAME = 'Board';
17 KEY_SETTING_FILE_NAME = 'key.ini';
18 EKEY_SETTING_FILE_NAME = 'Ekey.ini';
19 TEMP_FOLDER = 'Temp';
20 OUTBOX_FILE_NAME = 'outbox.ini';
21 SENT_FILE_NAME = 'sent.ini';
22 CONFIG_DIR_NAME = 'config';
23 CSS_DIR_NAME = 'css';
24 SKIN_DIR_NAME = 'skin';
25 SKIN_HEADER_FILE_NAME = 'Header.html';
26 SKIN_FOOTER_FILE_NAME = 'Footer.html';
27 SKIN_NEWRES_FILE_NAME = 'NewRes.html';
28 SKIN_RES_FILE_NAME = 'Res.html';
29 SKIN_BOOKMARK_FILE_NAME = 'Bookmark.html';
30 SKIN_NEWMARK_FILE_NAME = 'Newmark.html';
31 NGWORDs_DIR_NAME : String = 'NGwords';
32 BOARD_PLUGIN_DIR_NAME = 'BoardPlugin';
33 SAMBATIME_FILE_NAME : String = 'Samba.ini';
34 IGNORE_FILE_NAME : String = 'Ignore.txt';
35 // DOLIB_LOGIN_URL = '/~tora3n2c/futen.cgi';
36 MAX_POPUP_RES : Integer = 10;
37 type
38 TGikoTabPosition = (gtpTop, gtpBottom); // ?帥??篏?臀?/span>
39 TGikoTabAppend = (gtaFirst, gtpLast); // ?帥??菴遵??篏?臀?/span>
40 TGikoTabStyle = (gtsTab, gtsButton, gtsFlat); // ?帥???鴻?帥?ゃ??/span>
41 TGikoListOrientation = (gloHorizontal, gloVertical); // ???鴻?????眼?紙梓綛?/span>
42 TGikoListState = (glsMax, glsNormal, glsMin); // ???鴻???泣?ゃ?榊?倶??
43 // ???????≪????茵?ず篏?臀?/span>
44 TGikoPopupPosition = (gppRightTop, gppTop, gppLeftTop,
45 gppRight, gppCenter, gppLeft,
46 gppRightBottom, gppBottom, gppLeftBottom);
47 //???????ャ?若?泣?ゃ??/span>
48 TGikoPreviewSize = (gpsXLarge, gpsLarge, gpsMedium, gpsSmall, gpsXSmall);
49 TGikoBrowserAutoMaximize = (gbmNone, gbmClick, gbmDoubleClick);
50 // ???????吟????????????紊у???????>散
51 /// ???壕;腓榊??蚊??10 ?? 65535 ????? n ???号?宴????
52 /// 絨?? 201-300 ??????????蚊?????????????醇?с?????????篏? 2 byte ???膣???
53 TGikoResRange = (grrAll, grrSelect, grrKoko, grrNew);
54
55 /// ?鴻??????筝?荀ц;腓榊???/span>
56 TGikoThreadRange = (gtrAll, gtrSelect, gtrLog, gtrNew);
57
58 /// ?????眼?????鴻?????????? ID
59 type TGikoBBSColumnID = (gbbscTitle);
60 /// ?????眼?????鴻????????????
61 const GikoBBSColumnCaption : array[0..0] of string =
62 ( '?????眼????' );
63 /// ?????眼?????鴻????????????
64 type TGikoBBSColumnList = class( TList )
65 private
66 function GetItem( index : integer ) : TGikoBBSColumnID;
67 procedure SetItem( index : integer; value : TGikoBBSColumnID);
68 public
69 constructor Create;
70 destructor Destroy;
71 function Add( value : TGikoBBSColumnID ) : Integer;
72 property Items[index : integer]: TGikoBBSColumnID read GetItem write SetItem; default;
73 end;
74 /// ?帥???鴻?????????? ID
75 type TGikoCategoryColumnID = (gccTitle, gccRoundName, gccLastModified);
76 /// ?帥???鴻????????????
77 const GikoCategoryColumnCaption : array[0..2] of string =
78 ( '?水??', '綏≦??篋?膣?', '??緇??ユ??' );
79 /// ?帥???鴻????????????
80 type TGikoCategoryColumnList = class( TList )
81 private
82 function GetItem( index : integer ) : TGikoCategoryColumnID;
83 procedure SetItem( index : integer; value : TGikoCategoryColumnID);
84 public
85 constructor Create;
86 destructor Destroy;
87 function Add( value : TGikoCategoryColumnID ) : Integer;
88 property Items[index : integer]: TGikoCategoryColumnID read GetItem write SetItem; default;
89 end;
90 /// ?鴻?????鴻?????????? ID
91 type TGikoBoardColumnID = (gbcTitle, gbcAllCount, gbcLocalCount, gbcNonAcqCount,
92 gbcNewCount, gbcUnReadCount, gbcRoundName, gbcLastModified, gbcCreated );
93 /// ?鴻?????鴻????????????
94 const GikoBoardColumnCaption : array[0..8] of string =
95 ( '?鴻????????', '?????潟??', '??緇?', '????', '?亥??',
96 '???', '綏≦??篋?膣?', '??緇??ユ??', '?鴻??????ユ??' );
97 const GikoBoardColumnAlignment : array[0..8] of TAlignment = (
98 taLeftJustify, taRightJustify, taRightJustify, taRightJustify,
99 taRightJustify, taRightJustify, taLeftJustify, taLeftJustify,
100 taLeftJustify );
101 /// ?鴻?????鴻????????????
102 type TGikoBoardColumnList = class( TList )
103 private
104 function GetItem( index : integer ) : TGikoBoardColumnID;
105 procedure SetItem( index : integer; value : TGikoBoardColumnID);
106 public
107 constructor Create;
108 destructor Destroy;
109 function Add( value : TGikoBoardColumnID ) : Integer;
110 property Items[index : integer]: TGikoBoardColumnID read GetItem write SetItem; default;
111 end;
112
113 type
114 //CoolBar荐?????潟?若??
115 TCoolSet = record
116 FCoolID: Integer;
117 FCoolWidth: Integer;
118 FCoolBreak: Boolean;
119 end;
120
121 TSetting = class(TObject)
122 private
123 //??篆<???????<?泣?ゃ??/span>
124 FRecvBufferSize: Integer;
125 //HTTP1.1篏睡??/span>
126 FProtocol: Boolean;
127 //???????傑・膓?HTTP1.1篏睡??/span>
128 FProxyProtocol: Boolean;
129
130 //???????件?茯?昭???
131 FReadProxy: Boolean;
132 FReadProxyAddress: string;
133 FReadProxyPort: Integer;
134 FReadProxyUserID: string;
135 FReadProxyPassword: string;
136
137 //???????件??梧昭???
138 FWriteProxy: Boolean;
139 FWriteProxyAddress: string;
140 FWriteProxyPort: Integer;
141 FWriteProxyUserID: string;
142 FWriteProxyPassword: string;
143
144 //???c????????
145 FCabinetFontName: string;
146 FCabinetFontSize: Integer;
147 FCabinetFontBold: Boolean;
148 FCabinetFontItalic: Boolean;
149 FCabinetFontColor: TColor;
150 FCabinetBackColor: TColor;
151
152 //???鴻??
153 FListFontName: string;
154 FListFontSize: Integer;
155 FListFontBold: Boolean;
156 FListFontItalic: Boolean;
157 FListFontColor: TColor;
158 FListBackColor: TColor;
159
160 //????????/span>
161 FBrowserFontName: string; // ''...default
162 FBrowserFontSize: Integer; // 0...default
163 FBrowserFontBold: Integer; // 0...default, -1...False, 1...True
164 FBrowserFontItalic: Integer; // 筝???????
165 FBrowserFontColor: Integer; // -1...default
166 FBrowserBackColor: Integer; // 筝???????
167
168 //?????c??/span>
169 FEditorFontName: string;
170 FEditorFontSize: Integer;
171 FEditorFontBold: Boolean;
172 FEditorFontItalic: Boolean;
173 FEditorFontColor: TColor;
174 FEditorBackColor: TColor;
175
176 //?帥???????潟??
177 FBrowserTabFontName: string;
178 FBrowserTabFontSize: Integer;
179 FBrowserTabFontBold: Boolean;
180 FBrowserTabFontItalic: Boolean;
181
182 //???潟?????c?潟????/span>
183 FHintFontName: string;
184 FHintFontSize: Integer;
185 //FHintFontBold: Boolean;
186 //FHintFontItalic: Boolean;
187 FHintFontColor: TColor;
188 FHintBackColor: TColor;
189
190 //???c?潟?????泣?ゃ??/span>
191 FWindowTop: Integer;
192 FWindowLeft: Integer;
193 FWindowHeight: Integer;
194 FWindowWidth: Integer;
195 FWindowMax: Boolean;
196 //???鴻?????ャ?若?鴻?帥?ゃ??/span>
197 FListStyle: TViewStyle;
198
199 //???若?????取;腓?/span>
200 FStdToolBarVisible: Boolean;
201 FAddressBarVisible: Boolean;
202 FLinkBarVisible: Boolean;
203 FListToolBarVisible: Boolean;
204 FListNameBarVisible: Boolean;
205 FBrowserToolBarVisible: Boolean;
206 FBrowserNameBarVisible: Boolean;
207
208 //???????吟?帥??
209 FBrowserTabVisible: Boolean;
210 FBrowserTabPosition: TGikoTabPosition;
211 FBrowserTabAppend: TGikoTabAppend;
212 FBrowserTabStyle: TGikoTabStyle;
213
214 //?<???祉?若?吾????/span>
215 FMessageBarVisible: Boolean;
216 FMessegeBarHeight: Integer;
217
218 //?鴻???若?帥?鴻????/span>
219 FStatusBarVisible: Boolean;
220
221 //???c????????????祉?泣?ゃ??/span>
222 FCabinetVisible: Boolean;
223 FCabinetWidth: Integer;
224
225 //???鴻???祉???????吟?泣?ゃ??/span>
226 FListOrientation: TGikoListOrientation;
227 FListHeight: Integer;
228 FListHeightState: TGikoListState;
229 FListWidth: Integer;
230 FListWidthState: TGikoListState;
231 // FListHeightMax: Boolean;
232 // FListWidthMax: Boolean;
233
234 //??篆∞???????祉?<?若??/span>
235 FNameList: TStringList;
236 FMailList: TStringList;
237
238 //?????c?帥?若???c?潟?????泣?ゃ??/span>
239 FEditWindowTop: Integer;
240 FEditWindowLeft: Integer;
241 FEditWindowHeight: Integer;
242 FEditWindowWidth: Integer;
243 FEditWindowMax: Boolean;
244 FEditWindowStay: Boolean;
245 FEditWindowTranslucent: Boolean;
246
247 //???鴻????埈;腓?/span>
248 FListViewNo: Boolean;
249 //CSS茵?ず
250 FUseCSS: Boolean;
251 //CSS???<?ゃ????
252 FCSSFileName: string;
253 // ?鴻???活;腓?筝???????????? ini ???絖???????????)
254 FUseSkin: Boolean;
255 //mail罨?茵?ず
256 FShowMail: Boolean;
257 /// ???壕;腓榊???/span>
258 FResRange : Longint;
259 /// 莎桁???????壕;腓榊??蚊???阪?
260 FResRangeHold : Boolean;
261 /// ?鴻??????筝?荀ц;腓榊???/span>
262 FThreadRange : TGikoThreadRange;
263 //???≪?????c???????鴻???????≪????茵?ず
264 FUnActivePopup: Boolean;
265 //???鴻???????≪???????????若???若????
266 FResPopupHeaderBold: Boolean;
267
268 //???違????????
269 FLogFolder: string;
270 FNewLogFolder: string;
271
272 //???鴻???????????????若?泣?ゃ??/span>
273 FBBSColumnWidth: array[0..0] of Integer;
274 FCategoryColumnWidth: array[0..2] of Integer;
275 FBoardColumnWidth: array[0..8] of Integer;
276
277 /// ?????眼?????鴻??????????綺?span>
278 FBBSColumnOrder : TGikoBBSColumnList;
279 /// ?帥???鴻??????????綺?span>
280 FCategoryColumnOrder : TGikoCategoryColumnList;
281 /// ?鴻?????鴻??????????綺?span>
282 FBoardColumnOrder : TGikoBoardColumnList;
283
284 //?純?若????
285 FBBSSortIndex: Integer;
286 FBBSSortOrder: Boolean;
287 FCategorySortIndex: Integer;
288 FCategorySortOrder: Boolean;
289 FBoardSortIndex: Integer;
290 FBoardSortOrder: Boolean;
291
292 //Dat?純?<?鴻???純?若????
293 FDatOchiSortIndex: Integer;
294 FDatOchiSortOrder: Boolean;
295
296 //腟?莨若?炊??絖???
297 FSelectTextList: TStringList;
298
299 //?推?荀?RL
300 //FBoardURL2ch: string;
301 FBoardURLs: TStringList;
302 FBoardURLSelected: Integer;
303
304 //???若??D?祉???鴻???若??
305 FUserID: string;
306 FPassword: string;
307 FAutoLogin: Boolean;
308 FForcedLogin: Boolean;
309 FDolibURL: string;
310
311 //URL??????????莎桁???≪????/span>
312 FURLApp: Boolean;
313 FURLAppFile: string;
314
315 //mailto????????????篏?
316 FOpenMailer: Boolean;
317
318 //???ょ∈茯?
319 FDeleteMsg: Boolean;
320
321 //CoolBar鐚??<?ゃ?潟?紙?帥?祉???????駈?
322 FMainCoolBar: array[0..MAIN_COOLBAND_COUNT - 1] of TCoolSet;
323 FListCoolBar: array[0..LIST_COOLBAND_COUNT - 1] of TCoolSet;
324 FBrowserCoolBar: array[0..BROWSER_COOLBAND_COUNT - 1] of TCoolSet;
325
326 //ToolBar Wrapable
327 FListToolBarWrapable: Boolean;
328 FBrowserToolBarWrapable: Boolean;
329
330 //???????≪????篏?臀?/span>
331 FPopupPosition: TGikoPopupPosition;
332
333 //?≪?????鴻????/span>
334 FURLDisplay: Boolean;
335 FAddressBarTabStop: Boolean;
336 FLinkAddAddressBar: Boolean;
337 FAddressHistoryCount: Integer;
338
339 //?糸????????ャ??/span>
340 FPreviewVisible: Boolean;
341 FPreviewSize: TGikoPreviewSize;
342 FPreviewWait: Integer;
343
344 // ????????/span>
345 FBrowserAutoMaximize: TGikoBrowserAutoMaximize;
346
347 //?鴻??????筝?荀ф?贋?違?≪?ゃ?潟?活;腓?/span>
348 FListIconVisible: Boolean;
349 //??緇??違?с???????????茵?ず????
350 FNonAcquiredCount: Boolean;
351
352 //?鴻??????筝?荀с??og???????鴻?????????帥?鴻??????ャ??茵?ず??????
353 FCreationTimeLogs: Boolean;
354 //?鴻??????筝?荀с???鴻???????ャ?ф???ャ???鴻?????????ャ??茵?ず??????
355 FFutureThread: Boolean;
356
357 //?吾??莨若?炊?????激?恰????篏睡??┃絎?
358 FUseMachineTime: Boolean;
359 FTimeAdjustSec: Integer;
360 FTimeAdjust: Boolean;
361
362 //???若????
363 FAbonDeleterlo : Boolean; //&rlo;????????
364 FAbonReplaceul : Boolean; //<ul>?帥?違??<br>?帥?違??舟????????
365 FPopUpAbon : Boolean; //???鴻???????≪???????????若????????/span>
366 FShowNGLinesNum : Boolean; //荅峨?????鐚?磁???若?????<?ゃ??????違??茵?ず
367 FAddResAnchor : Boolean; //NG???鴻?吾?????鴻?≪?潟???若??菴遵??????
368 FDeleteSyria : Boolean; //?激???∵??????????膈?
369
370 // ?鴻??????腟?莨若???c?若???????
371 FSelectComboBoxWidth : Integer;
372
373 // ??緇????御?????????????激?с?潟???ゃ?≪???違???帥??
374 FOptionDialogTabIndex: Integer;
375
376 // ??緇????御???????????c????????
377 FCabinetIndex: Integer;
378
379 //腟?篋?????∈茯????ゃ?≪???違??茵?ず??????
380 FShowDialogForEnd : Boolean;
381 //???????帥????????????????∈茯????ゃ?≪???違??茵?ず????
382 FShowDialogForAllTabClose: Boolean;
383 //??緇????号?違???鴻???????????号?違???違???c??????????絽梧?????蚊?????c???蚊???????蚊??篏睡????????
384 FUseOddColorOddResNum: Boolean;
385 FOddColor: TColor;
386
387 //Samba24絲丞?罘??純??篏帥????
388 FUseSamba: Boolean;
389
390 //???鴻?≪?潟???若???????????????吾?c?潟????????
391 FResAnchorJamp: Boolean;
392
393 //Tab????篆?絖?
394 FTabAutoLoadSave : Boolean;
395 // ?????c??/span>
396 FSpaceToNBSP : Boolean; ///< ??茹??鴻???若?鴻??Tab ?? &nbsp; ??舟??
397 FAmpToCharRef : Boolean; ///< '&' ?? &amp; ??舟??
398
399 //???????吟?帥????茵?ず???????鴻???荀с?с?????若?純?????主Щ?????≦??????
400 FSelectInterval : Integer;
401
402 function GetMainCoolSet(Index: Integer): TCoolSet;
403 function GetBoardCoolSet(Index: Integer): TCoolSet;
404 function GetBrowserCoolSet(Index: Integer): TCoolSet;
405 procedure SetMainCoolSet(Index: Integer; CoolSet: TCoolSet);
406 procedure SetBoardCoolSet(Index: Integer; CoolSet: TCoolSet);
407 procedure SetBrowserCoolSet(Index: Integer; CoolSet: TCoolSet);
408
409 function GetBBSColumnWidth(index: Integer): Integer;
410 function GetCategoryColumnWidth(index: Integer): Integer;
411 function GetBoardColumnWidth(index: Integer): Integer;
412 procedure SetBBSColumnWidth(index: Integer; value: Integer);
413 procedure SetCategoryColumnWidth(index: Integer; value: Integer);
414 procedure SetBoardColumnWidth(index: Integer; value: Integer);
415
416 function GetSoundName(Index: Integer): string;
417 function GetSoundViewName(Index: Integer): string;
418 function GetSoundFileName(Index: Integer): string;
419 procedure SetSoundFileName(Index: Integer; value: string);
420 function Encrypt(s: string): string;
421 function Decrypt(s: string): string;
422
423 procedure MakeURLIniFile();
424
425 procedure SetUseCSS( value: Boolean );
426 procedure SetCSSFileName( fileName: string );
427 protected
428
429 public
430 constructor Create;
431 destructor Destroy; override;
432 function GetFileName: string;
433 function GetBoardURLFileName: string;
434 procedure ReadSettingFile;
435 procedure ReadBoardURLsFile;
436 procedure WriteSystemSettingFile;
437 procedure WriteWindowSettingFile;
438 procedure WriteNameMailSettingFile;
439 procedure WriteFolderSettingFile();
440 procedure WriteBoardURLSettingFile;
441 function GetSoundCount: Integer;
442 function FindSoundFileName(Name: string): string;
443
444 function GetBoardFileName: string;
445 function GetCustomBoardFileName: string;
446 function GetBoardDir: string;
447 function GetHtmlTempFileName: string;
448 function GetAppDir: string;
449 function GetTempFolder: string;
450 function GetSentFileName: string;
451 function GetConfigDir: string;
452 function GetSkinDir: string;
453 function GetSkinHeaderFileName: string;
454 function GetSkinFooterFileName: string;
455 function GetSkinResFileName: string;
456 function GetSkinNewResFileName: string;
457 function GetSkinBookmarkFileName: string;
458 function GetSkinNewmarkFileName: string;
459 function GetStyleSheetDir: string;
460 function GetOutBoxFileName: string;
461 function GetNGWordsDir: string;
462 function GetBoardPlugInDir: string;
463 function GetSambaFileName: string;
464 function GetIgnoreFileName: string;
465
466 //??篆<???????<?泣?ゃ??/span>
467 property RecvBufferSize: Integer read FRecvBufferSize write FRecvBufferSize;
468 //HTTP1.1篏睡??/span>
469 property Protocol: Boolean read FProtocol write FProtocol;
470 //???????傑・膓?HTTP1.1篏睡??/span>
471 property ProxyProtocol: Boolean read FProxyProtocol write FProxyProtocol;
472
473 property ReadProxy: Boolean read FReadProxy write FReadProxy;
474 property ReadProxyAddress: string read FReadProxyAddress write FReadProxyAddress;
475 property ReadProxyPort: Integer read FReadProxyPort write FReadProxyPort;
476 property ReadProxyUserID: string read FReadProxyUserID write FReadProxyUserID;
477 property ReadProxyPassword: string read FReadProxyPassword write FReadProxyPassword;
478
479 property WriteProxy: Boolean read FWriteProxy write FWriteProxy;
480 property WriteProxyAddress: string read FWriteProxyAddress write FWriteProxyAddress;
481 property WriteProxyPort: Integer read FWriteProxyPort write FWriteProxyPort;
482 property WriteProxyUserID: string read FWriteProxyUserID write FWriteProxyUserID;
483 property WriteProxyPassword: string read FWriteProxyPassword write FWriteProxyPassword;
484
485 property CabinetFontName: string read FCabinetFontName write FCabinetFontName;
486 property CabinetFontSize: Integer read FCabinetFontSize write FCabinetFontSize;
487 property CabinetFontBold: Boolean read FCabinetFontBold write FCabinetFontBold;
488 property CabinetFontItalic: Boolean read FCabinetFontItalic write FCabinetFontItalic;
489 property CabinetFontColor: TColor read FCabinetFontColor write FCabinetFontColor;
490 property CabinetBackColor: TColor read FCabinetBackColor write FCabinetBackColor;
491
492 property ListFontName: string read FListFontName write FListFontName;
493 property ListFontSize: Integer read FListFontSize write FListFontSize;
494 property ListFontBold: Boolean read FListFontBold write FListFontBold;
495 property ListFontItalic: Boolean read FListFontItalic write FListFontItalic;
496 property ListFontColor: TColor read FListFontColor write FListFontColor;
497 property ListBackColor: TColor read FListBackColor write FListBackColor;
498
499 property BrowserFontName: string read FBrowserFontName write FBrowserFontName;
500 property BrowserFontSize: Integer read FBrowserFontSize write FBrowserFontSize;
501 property BrowserFontBold: Integer read FBrowserFontBold write FBrowserFontBold;
502 property BrowserFontItalic: Integer read FBrowserFontItalic write FBrowserFontItalic;
503 property BrowserFontColor: Integer read FBrowserFontColor write FBrowserFontColor;
504 property BrowserBackColor: Integer read FBrowserBackColor write FBrowserBackColor;
505
506 property EditorFontName: string read FEditorFontName write FEditorFontName;
507 property EditorFontSize: Integer read FEditorFontSize write FEditorFontSize;
508 property EditorFontBold: Boolean read FEditorFontBold write FEditorFontBold;
509 property EditorFontItalic: Boolean read FEditorFontItalic write FEditorFontItalic;
510 property EditorFontColor: TColor read FEditorFontColor write FEditorFontColor;
511 property EditorBackColor: TColor read FEditorBackColor write FEditorBackColor;
512
513 property BrowserTabFontName: string read FBrowserTabFontName write FBrowserTabFontName;
514 property BrowserTabFontSize: Integer read FBrowserTabFontSize write FBrowserTabFontSize;
515 property BrowserTabFontBold: Boolean read FBrowserTabFontBold write FBrowserTabFontBold;
516 property BrowserTabFontItalic: Boolean read FBrowserTabFontItalic write FBrowserTabFontItalic;
517
518 property HintFontName: string read FHintFontName write FHintFontName;
519 property HintFontSize: Integer read FHintFontSize write FHintFontSize;
520 //property HintFontBold: Boolean read FHintFontBold write FHintFontBold;
521 //property HintFontItalic: Boolean read FHintFontItalic write FHintFontItalic;
522 property HintFontColor: TColor read FHintFontColor write FHintFontColor;
523 property HintBackColor: TColor read FHintBackColor write FHintBackColor;
524
525 property WindowTop: Integer read FWindowTop write FWindowTop;
526 property WindowLeft: Integer read FWindowLeft write FWindowLeft;
527 property WindowHeight: Integer read FWindowHeight write FWindowHeight;
528 property WindowWidth: Integer read FWindowWidth write FWindowWidth;
529 property WindowMax: Boolean read FWindowMax write FWindowMax;
530 property ListStyle: TViewStyle read FListStyle write FListStyle;
531
532 property StdToolBarVisible: Boolean read FStdToolBarVisible write FStdToolBarVisible;
533 property AddressBarVisible: Boolean read FAddressBarVisible write FAddressBarVisible;
534 property LinkBarVisible: Boolean read FLinkBarVisible write FLinkBarVisible;
535 property ListToolBarVisible: Boolean read FListToolBarVisible write FListToolBarVisible;
536 property ListNameBarVisible: Boolean read FListNameBarVisible write FListNameBarVisible;
537 property BrowserToolBarVisible: Boolean read FBrowserToolBarVisible write FBrowserToolBarVisible;
538 property BrowserNameBarVisible: Boolean read FBrowserNameBarVisible write FBrowserNameBarVisible;
539
540 property BrowserTabVisible: Boolean read FBrowserTabVisible write FBrowserTabVisible;
541 property BrowserTabPosition: TGikoTabPosition read FBrowserTabPosition write FBrowserTabPosition;
542 property BrowserTabAppend: TGikoTabAppend read FBrowserTabAppend write FBrowserTabAppend;
543 property BrowserTabStyle: TGikoTabStyle read FBrowserTabStyle write FBrowserTabStyle;
544
545 property MessageBarVisible: Boolean read FMessageBarVisible write FMessageBarVisible;
546 property MessegeBarHeight: Integer read FMessegeBarHeight write FMessegeBarHeight;
547
548 property StatusBarVisible: Boolean read FStatusBarVisible write FStatusBarVisible;
549
550 property CabinetVisible: Boolean read FCabinetVisible write FCabinetVisible;
551 property CabinetWidth: Integer read FCabinetWidth write FCabinetWidth;
552
553 property ListOrientation: TGikoListOrientation read FListOrientation write FListOrientation;
554 property ListHeight: Integer read FListHeight write FListHeight;
555 property ListHeightState: TGikoListState read FListHeightState write FListHeightState;
556 property ListWidth: Integer read FListWidth write FListWidth;
557 property ListWidthState: TGikoListState read FListWidthState write FListWidthState;
558 // property ListHeightMax: Boolean read FListHeightMax write FListHeightMax;
559 // property ListWidthMax: Boolean read FListWidthMax write FListWidthMax;
560
561 property NameList: TStringList read FNameList write FNameList;
562 property MailList: TStringList read FMailList write FMailList;
563 property SelectTextList: TStringList read FSelectTextList write FSelectTextList;
564
565 property EditWindowTop: Integer read FEditWindowTop write FEditWindowTop;
566 property EditWindowLeft: Integer read FEditWindowLeft write FEditWindowLeft;
567 property EditWindowHeight: Integer read FEditWindowHeight write FEditWindowHeight;
568 property EditWindowWidth: Integer read FEditWindowWidth write FEditWindowWidth;
569 property EditWindowMax: Boolean read FEditWindowMax write FEditWindowMax;
570 property EditWindowStay: Boolean read FEditWindowStay write FEditWindowStay;
571 property EditWindowTranslucent: Boolean read FEditWindowTranslucent write FEditWindowTranslucent;
572
573 property ListViewNo: Boolean read FListViewNo write FListViewNo;
574 property UseCSS: Boolean read FUseCSS write SetUseCSS;
575 property CSSFileName: string read FCSSFileName write SetCSSFileName;
576 property UseSkin: Boolean read FUseSkin;
577
578 property ShowMail: Boolean read FShowMail write FShowMail;
579 property ResRange : Longint read FResRange write FResRange;
580 property ResRangeHold : Boolean read FResRangeHold write FResRangeHold;
581 property ThreadRange : TGikoThreadRange read FThreadRange write FThreadRange;
582 property UnActivePopup: Boolean read FUnActivePopup write FUnActivePopup;
583 property ResPopupHeaderBold: Boolean read FResPopupHeaderBold write FResPopupHeaderBold;
584
585 property LogFolder: string read FLogFolder write FLogFolder;
586 property NewLogFolder: string read FNewLogFolder write FNewLogFolder;
587
588 property BBSColumnWidth[index: Integer]: Integer read GetBBSColumnWidth write SetBBSColumnWidth;
589 property CategoryColumnWidth[index: Integer]: Integer read GetCategoryColumnWidth write SetCategoryColumnWidth;
590 property BoardColumnWidth[index: Integer]: Integer read GetBoardColumnWidth write SetBoardColumnWidth;
591
592 property BBSColumnOrder : TGikoBBSColumnList read FBBSColumnOrder write FBBSColumnOrder;
593 property CategoryColumnOrder : TGikoCategoryColumnList read FCategoryColumnOrder write FCategoryColumnOrder;
594 property BoardColumnOrder : TGikoBoardColumnList read FBoardColumnOrder write FBoardColumnOrder;
595
596 property SoundName[index: Integer]: string read GetSoundName;
597 property SoundViewName[index: Integer]: string read GetSoundViewName;
598 property SoundFileName[index: Integer]: string read GetSoundFileName write SetSoundFileName;
599
600 property BBSSortIndex: Integer read FBBSSortIndex write FBBSSortIndex;
601 property BBSSortOrder: Boolean read FBBSSortOrder write FBBSSortOrder;
602 property CategorySortIndex: Integer read FCategorySortIndex write FCategorySortIndex;
603 property CategorySortOrder: Boolean read FCategorySortOrder write FCategorySortOrder;
604 property BoardSortIndex: Integer read FBoardSortIndex write FBoardSortIndex;
605 property BoardSortOrder: Boolean read FBoardSortOrder write FBoardSortOrder;
606
607 property DatOchiSortIndex: Integer read FDatOchiSortIndex write FDatOchiSortIndex;
608 property DatOchiSortOrder: Boolean read FDatOchiSortOrder write FDatOchiSortOrder;
609
610 //property BoardURL2ch: string read FBoardURL2ch write FBoardURL2ch;
611 property BoardURLs: TStringList read FBoardURLs write FBoardURLs;
612 property BoardURLSelected: Integer read FBoardURLSelected write FBoardURLSelected;
613 property UserID: string read FUserID write FUserID;
614 property Password: string read FPassword write FPassword;
615 property AutoLogin: Boolean read FAutoLogin write FAutoLogin;
616 property ForcedLogin: Boolean read FForcedLogin write FForcedLogin;
617 property DolibURL: string read FDolibURL write FDolibURL;
618
619 property URLApp: Boolean read FURLApp write FURLApp;
620 property URLAppFile: string read FURLAppFile write FURLAppFile;
621
622 property OpenMailer: Boolean read FOpenMailer write FOpenMailer;
623
624 property DeleteMsg: Boolean read FDeleteMsg write FDeleteMsg;
625
626 property MainCoolSet[Index: Integer]: TCoolSet read GetMainCoolSet write SetMainCoolSet;
627 property ListCoolSet[Index: Integer]: TCoolSet read GetBoardCoolSet write SetBoardCoolSet;
628 property BrowserCoolSet[Index: Integer]: TCoolSet read GetBrowserCoolSet write SetBrowserCoolSet;
629
630 property ListToolBarWrapable: Boolean read FListToolBarWrapable write FListToolBarWrapable;
631 property BrowserToolBarWrapable: Boolean read FBrowserToolBarWrapable write FBrowserToolBarWrapable;
632
633 property PopupPosition: TGikoPopupPosition read FPopupPosition write FPopupPosition;
634
635 property URLDisplay: Boolean read FURLDisplay write FURLDisplay;
636 property AddressBarTabStop: Boolean read FAddressBarTabStop write FAddressBarTabStop;
637 property LinkAddAddressBar: Boolean read FLinkAddAddressBar write FLinkAddAddressBar;
638 property AddressHistoryCount: Integer read FAddressHistoryCount write FAddressHistoryCount;
639
640 property PreviewVisible: Boolean read FPreviewVisible write FPreviewVisible;
641 property PreviewSize: TGikoPreviewSize read FPreviewSize write FPreviewSize;
642 property PreviewWait: Integer read FPreviewWait write FPreviewWait;
643 property BrowserAutoMaximize: TGikoBrowserAutoMaximize read FBrowserAutoMaximize write FBrowserAutoMaximize;
644
645 property ListIconVisible: Boolean read FListIconVisible write FListIconVisible;
646 property NonAcquiredCount: Boolean read FNonAcquiredCount write FNonAcquiredCount;
647 property CreationTimeLogs: Boolean read FCreationTimeLogs write FCreationTimeLogs;
648 property FutureThread: Boolean read FFutureThread write FFutureThread;
649
650 property UseMachineTime: Boolean read FUseMachineTime write FUseMachineTime;
651 property TimeAdjustSec: Integer read FTimeAdjustSec write FTimeAdjustSec;
652 property TimeAdjust: Boolean read FTimeAdjust write FTimeAdjust;
653
654 //???若????
655 property AbonDeleterlo : Boolean read FAbonDeleterlo write FAbonDeleterlo;
656 property AbonReplaceul : Boolean read FAbonReplaceul write FAbonReplaceul;
657 property PopUpAbon : Boolean read FPopUpAbon write FPopUpAbon;
658 property ShowNGLinesNum : Boolean read FShowNGLinesNum write FShowNGLinesNum;
659 property AddResAnchor : Boolean read FAddResAnchor write FAddResAnchor;
660 property DeleteSyria : Boolean read FDeleteSyria write FDeleteSyria;
661 // ?鴻??????腟?莨若???c?若???????
662 property SelectComboBoxWidth : Integer read FSelectComboBoxWidth write FSelectComboBoxWidth;
663
664 // ??緇????御?????????????激?с?潟???ゃ?≪???違???帥??
665 property OptionDialogTabIndex : Integer read FOptionDialogTabIndex write FOptionDialogTabIndex;
666
667 // ??緇????御???????????c????????
668 property CabinetIndex : Integer read FCabinetIndex write FCabinetIndex;
669
670 //腟?篋?????∈茯????ゃ?≪???違??茵?ず??????
671 property ShowDialogForEnd : Boolean read FShowDialogForEnd write FShowDialogForEnd;
672 property ShowDialogForAllTabClose: Boolean read FShowDialogForAllTabClose write FShowDialogForAllTabClose;
673 //??緇????号?違???鴻???????????号?違???違???c??????????絽梧?????蚊?????c???蚊???????蚊??篏睡????????
674 property UseOddColorOddResNum: Boolean read FUseOddColorOddResNum write FUseOddColorOddResNum;
675 property OddColor: TColor read FOddColor write FOddColor;
676 property UseSamba: Boolean read FUseSamba write FUseSamba;
677 property ResAnchorJamp: Boolean read FResAnchorJamp write FResAnchorJamp;
678
679 // ?????c??/span>
680 property SpaceToNBSP : Boolean read FSpaceToNBSP write FSpaceToNBSP;
681 property AmpToCharRef : Boolean read FAmpToCharRef write FAmpToCharRef;
682
683 property SelectInterval : Integer read FSelectInterval write FSelectInterval;
684 //Tab篆?絖?
685 property TabAutoLoadSave: Boolean read FTabAutoLoadSave write FTabAutoLoadSave;
686 end;
687
688
689
690 implementation
691
692 type
693 TSoundName = record
694 Name: string;
695 ViewName: string;
696 FileName: string;
697 end;
698
699 const
700 INI_FILE_NAME: string = 'gikoNavi.ini';
701 BOARD_URL_INI_FILE_NAME: string = 'url.ini';
702 DEFAULT_FONT_NAME: string = '鐚?竺 鐚違?眼?激????#39;;
703 DEFAULT_FONT_SIZE: Integer = 9;
704 DEFAULT_FONT_COLOR: string = 'clWindowText';
705 DEFAULT_WINDOW_COLOR: string = 'clWindow';
706 DEFAULT_TAB_FONT_NAME: string = '鐚?竺 鐚違?眼?激????#39;;
707 DEFAULT_TAB_FONT_SIZE: Integer = 9;
708 DEFAULT_2CH_BOARD_URL1: string = 'http://www6.ocn.ne.jp/~mirv/2chmenu.html';
709 DEFAULT_2CH_BOARD_URL2: string = 'http://www.ff.iij4u.or.jp/~ch2/bbsmenu.html';
710 //http://menu.2ch.net/bbsmenu.html //??????????????罩e????推?荀с??????????
711 //'http://www.2ch.net/newbbsmenu.html';
712 GIKO_ENCRYPT_TEXT: string = 'gikoNaviEncryptText';
713
714 var
715 SOUND_NAME: array[0..4] of TSoundName = (
716 (Name: 'New'; ViewName: '??緇?????'; FileName: ''),
717 (Name: 'NewDiff'; ViewName: '??緇?????(綏???)'; FileName: ''),
718 (Name: 'NoChange'; ViewName: '???贋??#39;; FileName: ''),
719 // (Name: 'RoundEnd'; ViewName: '綏≦??腟?篋?(??緇?????)'; FileName: ''),
720 // (Name: 'RoundNone'; ViewName: '綏≦??腟?篋?(??緇?????)'; FileName: ''),
721 (Name: 'ResEnd'; ViewName: '???拷??篆≦?篋?'; FileName: ''),
722 (Name: 'Error'; ViewName: '??????#39;; FileName: ''));
723
724 constructor TGikoBBSColumnList.Create;
725 begin
726 inherited;
727 end;
728
729 destructor TGikoBBSColumnList.Destroy;
730 begin
731 inherited;
732 end;
733
734 function TGikoBBSColumnList.GetItem( index : integer ) : TGikoBBSColumnID;
735 begin
736 Result := TGikoBBSColumnID( inherited Items[ index ] );
737 end;
738
739 procedure TGikoBBSColumnList.SetItem( index : integer; value : TGikoBBSColumnID);
740 begin
741 inherited Items[ index ] := Pointer( value );
742 end;
743
744 function TGikoBBSColumnList.Add( value : TGikoBBSColumnID ) : Integer;
745 begin
746 Result := inherited Add( Pointer( value ) );
747 end;
748
749 constructor TGikoCategoryColumnList.Create;
750 begin
751 inherited;
752 end;
753
754 destructor TGikoCategoryColumnList.Destroy;
755 begin
756 inherited;
757 end;
758
759 function TGikoCategoryColumnList.GetItem( index : integer ) : TGikoCategoryColumnID;
760 begin
761 Result := TGikoCategoryColumnID( inherited Items[ index ] );
762 end;
763
764 procedure TGikoCategoryColumnList.SetItem( index : integer; value : TGikoCategoryColumnID);
765 begin
766 inherited Items[ index ] := Pointer( value );
767 end;
768
769 function TGikoCategoryColumnList.Add( value : TGikoCategoryColumnID ) : Integer;
770 begin
771 Result := inherited Add( Pointer( value ) );
772 end;
773
774 constructor TGikoBoardColumnList.Create;
775 begin
776 inherited;
777 end;
778
779 destructor TGikoBoardColumnList.Destroy;
780 begin
781 inherited;
782 end;
783
784 function TGikoBoardColumnList.GetItem( index : integer ) : TGikoBoardColumnID;
785 begin
786 Result := TGikoBoardColumnID( inherited Items[ index ] );
787 end;
788
789 procedure TGikoBoardColumnList.SetItem( index : integer; value : TGikoBoardColumnID);
790 begin
791 inherited Items[ index ] := Pointer( value );
792 end;
793
794 function TGikoBoardColumnList.Add( value : TGikoBoardColumnID ) : Integer;
795 begin
796 Result := inherited Add( Pointer( value ) );
797 end;
798
799 //?潟?潟?鴻????????/span>
800 constructor TSetting.Create();
801 begin
802 FNameList := TStringList.Create;
803 FMailList := TStringList.Create;
804 FSelectTextList := TStringList.Create;
805 FBoardURLs := TStringList.Create;
806 FBBSColumnOrder := TGikoBBSColumnList.Create;
807 FCategoryColumnOrder := TGikoCategoryColumnList.Create;
808 FBoardColumnOrder := TGikoBoardColumnList.Create;
809 FNameList.Duplicates := dupIgnore;
810 FMailList.Duplicates := dupIgnore;
811 FBoardURLs.Duplicates := dupIgnore;
812 FSelectTextList.Duplicates := dupIgnore;
813 ReadSettingFile();
814 ReadBoardURLsFile();
815 end;
816
817 //???鴻????????/span>
818 destructor TSetting.Destroy();
819 begin
820 inherited;
821 FBoardColumnOrder.Free;
822 FCategoryColumnOrder.Free;
823 FBBSColumnOrder.Free;
824 FSelectTextList.Free;
825 FBoardURLs.Free;
826 FMailList.Free;
827 FNameList.Free;
828 end;
829
830 //?????????<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
831 function TSetting.GetFileName(): string;
832 begin
833 Result := ExtractFilePath(Application.ExeName) + INI_FILE_NAME;
834 end;
835
836 //?炊?贋?亥??RL荐?????<?ゃ????鐚????刻????<?ゃ????鐚?
837 function TSetting.GetBoardURLFileName(): string;
838 begin
839 Result := ExtractFilePath(Application.ExeName) + BOARD_URL_INI_FILE_NAME;
840 end;
841
842 //荐?????<?ゃ???莨?/span>
843 procedure TSetting.ReadSettingFile();
844 const
845 DEFAULT_BBS_WIDTH: array[0..0] of Integer = (140);
846 DEFAULT_CATEGORY_WIDTH: array[0..2] of Integer = (150, 80, 130);
847 DEFAULT_BOARD_WIDTH: array[0..8] of Integer = (350, 60, 60, 60, 60, 60, 80, 130, 130);
848 MAX_WIDTH: Integer = 2000;
849 var
850 ini: TMemIniFile;
851 i: Integer;
852 id, code : Integer;
853 wkList: TStringList;
854 wkStr: string;
855 Exists: Boolean;
856 s: string;
857 // id: Integer;
858 CoolSet: TCoolSet;
859 begin
860 Exists := FileExists(GetFileName);
861 ini := TMemIniFile.Create(GetFileName);
862 try
863 //??篆<???????<?泣?ゃ??/span>
864 FRecvBufferSize := ini.ReadInteger('HTTP', 'RecvBufferSize', 4096);
865 //HTTP1.1篏睡??/span>
866 FProtocol := ini.ReadBool('HTTP', 'Protocol', True);
867 //???????傑・膓?HTTP1.1篏睡??/span>
868 FProxyProtocol := ini.ReadBool('HTTP', 'ProxyProtocol', False);
869
870 FReadProxy := ini.ReadBool('ReadProxy', 'Proxy', false);
871 FReadProxyAddress := ini.ReadString('ReadProxy', 'Address', '');
872 FReadProxyPort := ini.ReadInteger('ReadProxy', 'Port', 0);
873 FReadProxyUserID := ini.ReadString('ReadProxy', 'UserID', '');
874 FReadProxyPassword := ini.ReadString('ReadProxy', 'Password', '');
875
876 FWriteProxy := ini.ReadBool('WriteProxy', 'Proxy', false);
877 FWriteProxyAddress := ini.ReadString('WriteProxy', 'Address', '');
878 FWriteProxyPort := ini.ReadInteger('WriteProxy', 'Port', 0);
879 FWriteProxyUserID := ini.ReadString('WriteProxy', 'UserID', '');
880 FWriteProxyPassword := ini.ReadString('WriteProxy', 'Password', '');
881
882 FBrowserFontName := ini.ReadString('Window', 'BrowserFontName', '');
883 FBrowserFontSize := ini.ReadInteger('Window', 'BrowserFontSize', 0);
884 FBrowserFontBold := ini.ReadInteger('Window', 'BrowserFontBold', 0);
885 FBrowserFontItalic := ini.ReadInteger('Window', 'BrowserFontItalic', 0);
886 FBrowserFontColor := ini.ReadInteger('Window', 'BrowserFontColor', -1);
887 FBrowserBackColor := ini.ReadInteger('Window', 'BrowserBackColor', -1);
888
889 FCabinetFontName := ini.ReadString('Window', 'CabinetFontName', DEFAULT_FONT_NAME);
890 FCabinetFontSize := ini.ReadInteger('Window', 'CabinetFontSize', DEFAULT_FONT_SIZE);
891 FCabinetFontBold := ini.ReadBool('Window', 'CabinetFontBold', False);
892 FCabinetFontItalic := ini.ReadBool('Window', 'CabinetFontItalic', False);
893 FCabinetFontColor := StringToColor(ini.ReadString('Window', 'CabinetFontColor', DEFAULT_FONT_COLOR));
894 FCabinetBackColor := StringToColor(ini.ReadString('Window', 'CabinetBackColor', DEFAULT_WINDOW_COLOR));
895
896 FListFontName := ini.ReadString('Window', 'ListFontName', DEFAULT_FONT_NAME);
897 FListFontSize := ini.ReadInteger('Window', 'ListFontSize', DEFAULT_FONT_SIZE);
898 FListFontBold := ini.ReadBool('Window', 'ListFontBold', False);
899 FListFontItalic := ini.ReadBool('Window', 'ListFontItalic', False);
900 FListFontColor := StringToColor(ini.ReadString('Window', 'ListFontColor', DEFAULT_FONT_COLOR));
901 FListBackColor := StringToColor(ini.ReadString('Window', 'ListBackColor', DEFAULT_WINDOW_COLOR));
902 FUseOddColorOddResNum := ini.ReadBool('Window','UseOddColor', False);
903 FOddColor := StringToColor(ini.ReadString('Window', 'OddColor', DEFAULT_WINDOW_COLOR));
904
905 FEditorFontName := ini.ReadString('Window', 'EditorFontName', DEFAULT_FONT_NAME);
906 FEditorFontSize := ini.ReadInteger('Window', 'EditorFontSize', DEFAULT_FONT_SIZE);
907 FEditorFontBold := ini.ReadBool('Window', 'EditorFontBold', False);
908 FEditorFontItalic := ini.ReadBool('Window', 'EditorFontItalic', False);
909 FEditorFontColor := StringToColor(ini.ReadString('Window', 'EditorFontColor', DEFAULT_FONT_COLOR));
910 FEditorBackColor := StringToColor(ini.ReadString('Window', 'EditorBackColor', DEFAULT_WINDOW_COLOR));
911
912 FBrowserTabFontName := ini.ReadString('Window', 'BrowserTabFontName', DEFAULT_TAB_FONT_NAME);
913 FBrowserTabFontSize := ini.ReadInteger('Window', 'BrowserTabFontSize', DEFAULT_TAB_FONT_SIZE);
914 FBrowserTabFontBold := ini.ReadBool('Window', 'BrowserTabFontBold', False);
915 FBrowserTabFontItalic := ini.ReadBool('Window', 'BrowserTabFontItalic', False);
916
917 FHintFontName := ini.ReadString('Window', 'HintFontName', Screen.HintFont.Name);
918 FHintFontSize := ini.ReadInteger('Window', 'HintFontSize', Screen.HintFont.Size);
919 //FHintFontBold := ini.ReadBool('Window', 'HintFontBold', False);
920 //FHintFontItalic := ini.ReadBool('Window', 'HintFontItalic', False);
921 FHintFontColor := StringToColor(ini.ReadString('Window', 'HintFontColor', DEFAULT_FONT_COLOR));
922 FHintBackColor := StringToColor(ini.ReadString('Window', 'HintBackColor', 'clInfoBk'));
923
924 FWindowTop := ini.ReadInteger('WindowSize', 'Top', -1);
925 FWindowLeft := ini.ReadInteger('WindowSize', 'Left', -1);
926 FWindowHeight := ini.ReadInteger('WindowSize', 'Height', -1);
927 FWindowWidth := ini.ReadInteger('WindowSize', 'Width', -1);
928 FWindowMax := ini.ReadBool('WindowSize', 'Max', false);
929
930 if FWindowHeight <= 0 then FWindowHeight := 400;
931 if FWindowWidth <= 0 then FWindowWidth := 600;
932
933 FListStyle := TViewStyle(ini.ReadInteger('ViewStyle', 'ListView', Ord(vsReport)));
934
935 FEditWindowTop := ini.ReadInteger('EditorWindowSize', 'Top', -1);
936 FEditWindowLeft := ini.ReadInteger('EditorWindowSize', 'Left', -1);
937 FEditWindowHeight := ini.ReadInteger('EditorWindowSize', 'Height', -1);
938 FEditWindowWidth := ini.ReadInteger('EditorWindowSize', 'Width', -1);
939 FEditWindowMax := ini.ReadBool('EditorWindowSize', 'Max', False);
940 FEditWindowStay := ini.ReadBool('EditorWindowSize', 'Stay', False);
941 FEditWindowTranslucent := ini.ReadBool('EditorWindowSize', 'Translucent', False);
942
943 FOptionDialogTabIndex := ini.ReadInteger('OptionDialog', 'TabIndex', 0);
944
945 //???若??????/span>
946 FStdToolBarVisible := ini.ReadBool('ToolBar', 'StdVisible', True);
947 FAddressBarVisible := ini.ReadBool('ToolBar', 'AddressVisible', True);
948 FLinkBarVisible := ini.ReadBool('ToolBar', 'LinkVisible', True);
949 FListToolBarVisible := ini.ReadBool('ToolBar', 'ListVisible', True);
950 FListNameBarVisible := ini.ReadBool('ToolBar', 'ListNameVisible', True);
951 FBrowserToolBarVisible := ini.ReadBool('ToolBar', 'BrowserVisible', True);
952 FBrowserNameBarVisible := ini.ReadBool('ToolBar', 'BrowserNameVisible', True);
953 //???若??????rapable
954 FListToolBarWrapable := ini.ReadBool('ToolBar', 'ListWrapable', False);
955 FBrowserToolBarWrapable := ini.ReadBool('ToolBar', 'BrowserWrapable', False);
956
957 FBrowserTabVisible := ini.ReadBool('Tab', 'BrowserTabVisible', True);
958 FBrowserTabPosition := TGikoTabPosition(ini.ReadInteger('Tab', 'BrowserTabPosition', Ord(gtpTop)));
959 FBrowserTabAppend := TGikoTabAppend(ini.ReadInteger('Tab', 'BrowserTabAppend', Ord(gtaFirst)));
960 FBrowserTabStyle := TGikoTabStyle(ini.ReadInteger('Tab', 'BrowserTabStyle', Ord(gtsFlat)));
961
962 FMessageBarVisible := ini.ReadBool('MessageBar', 'Visible', True);
963 FMessegeBarHeight := ini.ReadInteger('MessageBar', 'Height', 30);
964
965 FStatusBarVisible := ini.ReadBool('StatusBar', 'Visible', True);
966
967 FCabinetVisible := ini.ReadBool('Cabinet', 'Visible', True);
968 FCabinetWidth := ini.ReadInteger('Cabinet', 'Width', 200);
969 FCabinetIndex := ini.ReadInteger('Cabinet', 'Index', 0);
970
971 FListOrientation := TGikoListOrientation(ini.ReadInteger('List', 'Orientation', Ord(gloHorizontal)));
972 FListHeight := ini.ReadInteger('List', 'Height', 180);
973 FListHeightState := TGikoListState(ini.ReadInteger('List', 'HeightState', Ord(glsNormal)));
974 FListWidth := ini.ReadInteger('List', 'Width', 180);
975 FListWidthState := TGikoListState(ini.ReadInteger('List', 'WidthState', Ord(glsNormal)));
976 // FListHeightMax := ini.ReadBool('List', 'HeightMax', False);
977 // FListWidthMax := ini.ReadBool('List', 'WidthMax', False);
978
979 wkList := TStringList.Create;
980 try
981 ini.ReadSection('Name', wkList);
982 for i := 0 to wkList.Count - 1 do begin
983 wkStr := ini.ReadString('Name', wkList[i], '');
984 if (wkStr <> '') and (FNameList.IndexOf(wkStr) = -1) then
985 FNameList.Add(wkStr);
986 end;
987 ini.ReadSection('Mail', wkList);
988 for i := 0 to wkList.Count - 1 do begin
989 wkStr := ini.ReadString('Mail', wkList[i], '');
990 if (wkStr <> '') and (FMailList.IndexOf(wkStr) = -1) then
991 FMailList.Add(wkStr);
992 end;
993 ini.ReadSection('SelectText', wkList);
994 for i := 0 to wkList.Count - 1 do begin
995 wkStr := ini.ReadString('SelectText', wkList[i], '');
996 if (wkStr <> '') and (FSelectTextList.IndexOf(wkStr) = -1) then
997 FSelectTextList.Add(wkStr);
998 end;
999 finally
1000 wkList.Free;
1001 end;
1002
1003 // ???鴻????????綛?
1004 wkList := TStringList.Create;
1005 try
1006 ini.ReadSection('BBSColumnWidth', wkList);
1007 if Length(FBBSColumnWidth) <> wkList.Count then begin
1008 ini.EraseSection('BBSColumnWidth');
1009 end;
1010 for i := 0 to Length(FBBSColumnWidth) - 1 do begin
1011 BBSColumnWidth[i] := ini.ReadInteger('BBSColumnWidth', 'ID' + IntToStr(i), DEFAULT_BBS_WIDTH[i]);
1012 if BBSColumnWidth[i] > MAX_WIDTH then
1013 BBSColumnWidth[i] := DEFAULT_BBS_WIDTH[i];
1014 end;
1015 ini.ReadSection('CategoryColumnWidth', wkList);
1016 if Length(FCategoryColumnWidth) <> wkList.Count then begin
1017 ini.EraseSection('CategoryColumnWidth');
1018 end;
1019 for i := 0 to Length(FCategoryColumnWidth) - 1 do begin
1020 CategoryColumnWidth[i] := ini.ReadInteger('CategoryColumnWidth', 'ID' + IntToStr(i), DEFAULT_CATEGORY_WIDTH[i]);
1021 if CategoryColumnWidth[i] > MAX_WIDTH then
1022 CategoryColumnWidth[i] := DEFAULT_CATEGORY_WIDTH[i];
1023 end;
1024 ini.ReadSection('BoardColumnWidth', wkList);
1025 if Length(FBoardColumnWidth) <> wkList.Count then begin
1026 ini.EraseSection('BoardColumnWidth');
1027 end;
1028 for i := 0 to Length(FBoardColumnWidth) - 1 do begin
1029 BoardColumnWidth[i] := ini.ReadInteger('BoardColumnWidth', 'ID' + IntToStr(i), DEFAULT_BOARD_WIDTH[i]);
1030 if BoardColumnWidth[i] > MAX_WIDTH then
1031 BoardColumnWidth[i] := DEFAULT_BOARD_WIDTH[i];
1032 end;
1033 finally
1034 wkList.Free;
1035 end;
1036
1037 // ?????眼?????鴻??????????綺?span>
1038 wkList := TStringList.Create;
1039 try
1040 ini.ReadSection( 'BBSColumnOrder', wkList );
1041 for i := 0 to wkList.Count - 1 do begin
1042 wkStr := ini.ReadString( 'BBSColumnOrder', 'ID' + IntToStr( i ), '' );
1043 Val( wkStr, id, code );
1044 if code = 0 then
1045 FBBSColumnOrder.Add( TGikoBBSColumnID( id ) );
1046 end;
1047 if FBBSColumnOrder.Count = 0 then begin
1048 // 荐?????<?????т???
1049 for i := 0 to Integer( High( TGikoBBSColumnID ) ) do
1050 FBBSColumnOrder.Add( TGikoBBSColumnID( i ) );
1051 end;
1052
1053 ini.ReadSection( 'CategoryColumnOrder', wkList );
1054 for i := 0 to wkList.Count - 1 do begin
1055 wkStr := ini.ReadString( 'CategoryColumnOrder', 'ID' + IntToStr( i ), '' );
1056 Val( wkStr, id, code );
1057 if code = 0 then
1058 FCategoryColumnOrder.Add( TGikoCategoryColumnID( id ) );
1059 end;
1060 if FCategoryColumnOrder.Count = 0 then begin
1061 // 荐?????<?????т???
1062 for i := 0 to Integer( High( TGikoCategoryColumnID ) ) do
1063 FCategoryColumnOrder.Add( TGikoCategoryColumnID( i ) );
1064 end;
1065
1066 ini.ReadSection( 'BoardColumnOrder', wkList );
1067 for i := 0 to wkList.Count - 1 do begin
1068 wkStr := ini.ReadString( 'BoardColumnOrder', 'ID' + IntToStr( i ), '' );
1069 Val( wkStr, id, code );
1070 if code = 0 then
1071 FBoardColumnOrder.Add( TGikoBoardColumnID( id ) );
1072 end;
1073 if FBoardColumnOrder.Count = 0 then begin
1074 // 荐?????<?????т???
1075 for i := 0 to Integer( High( TGikoBoardColumnID ) ) do
1076 FBoardColumnOrder.Add( TGikoBoardColumnID( i ) );
1077 end;
1078 finally
1079 wkList.Free;
1080 end;
1081
1082 //???鴻?????/span>
1083 FListViewNo := ini.ReadBool('Function', 'ListViewNo', True);
1084 //CSS
1085 UseCSS := ini.ReadBool('CSS', 'UseCSS', True);
1086 //CSS???<?ゃ????
1087 CSSFileName := ini.ReadString('CSS', 'FileName', 'default.css');
1088
1089 //Mail罨?茵?ず
1090 FShowMail := ini.ReadBool('Thread', 'ShowMail', True);
1091 // ???壕;腓榊???/span>
1092 if ini.ReadBool('Thread', 'OnlyAHundredRes',false) then
1093 FResRange := 100 // ?ゃ??荐?????????/span>
1094 else
1095 FResRange := ini.ReadInteger( 'Thread', 'ResRange', Ord( grrAll ) );
1096 FResRangeHold := ini.ReadBool( 'Thread', 'ResRangeHold', False );
1097 // ?鴻??????筝?荀ц;腓榊???/span>
1098 FThreadRange := TGikoThreadRange( ini.ReadInteger('ThreadList', 'ThreadRange', Ord( gtrAll )) );
1099 //???≪?????c???????鴻???????≪????茵?ず
1100 FUnActivePopup := ini.ReadBool('Thread', 'UnActivePopup', False);
1101 //???鴻???????≪???????????若???若????
1102 FResPopupHeaderBold := ini.ReadBool('Thread', 'ResPopupHeaderBold', True);
1103 //???ょ∈茯?
1104 FDeleteMsg := ini.ReadBool('Function', 'LogDeleteMessage', True);
1105 //腟?篋?腆肴?
1106 FShowDialogForEnd := ini.ReadBool('Function','ShowDialogForEnd',false);
1107 //AllTabClose
1108 FShowDialogForAllTabClose := ini.ReadBool('Function','ShowDialogForAllTabClose',false);
1109 //Samba
1110 FUseSamba := ini.ReadBool('Function','UseSamba', True);
1111 //ResAnchorjamp
1112 ResAnchorJamp := ini.ReadBool('Function', 'ResAnchoJamp', True);
1113 //???違????????
1114 FLogFolder := ini.ReadString('Folder', 'LogFolder', ExtractFilePath(Application.ExeName) + 'Log');
1115 NewLogFolder := '';
1116
1117 //??RL
1118 //茲??亥?脂?蚊?с??????????????BoardURLs????????2003/10/05
1119 //FBoardURL2ch := ini.ReadString('BoardURL', '2ch', DEFAULT_2CH_BOARD_URL);
1120
1121 //茯?荐主?????若??D?祉???鴻???若??
1122 FUserID := ini.ReadString('Attestation', 'UserID', '');
1123 FPassword := Decrypt(ini.ReadString('Attestation', 'Password', ''));
1124 FAutoLogin := ini.ReadBool('Attestation', 'AutoLogin', False);
1125 FForcedLogin := ini.ReadBool('Attestation', 'FForcedLogin', False);
1126 // FDolibURL := ini.ReadString('Attestation', 'FDolibURL', DOLIB_LOGIN_URL);
1127
1128 //URL??????????莎桁???≪????/span>
1129 FURLApp := ini.ReadBool('URLApp', 'Select', False);
1130 FURLAppFile := ini.ReadString('URLApp', 'File', '');
1131
1132 //mailto????????????篏?
1133 FOpenMailer := ini.ReadBool('Mailto', 'Open', True);
1134
1135 //???????≪????篏?臀?/span>
1136 FPopupPosition := TGikoPopupPosition(ini.ReadInteger('Browser', 'PopupPosition', Ord(gppLeftBottom)));
1137
1138 //?≪?????鴻????/span>
1139 FURLDisplay := ini.ReadBool('AddressBar', 'URLDisplay', False);
1140 FAddressBarTabStop := ini.ReadBool('AddressBar', 'TabStop', True);
1141 FLinkAddAddressBar := ini.ReadBool('AddressBar', 'LinkAdd', False);
1142 FAddressHistoryCount := ini.ReadInteger('AddressBar', 'HistoryCount', 100);
1143
1144 //?糸????????ャ??/span>
1145 FPreviewVisible := ini.ReadBool('Browser', 'PreviewVisible', True);
1146 FPreviewSize := TGikoPreviewSize(ini.ReadInteger('Browser', 'PreviewSize', Ord(gpsMedium)));
1147 FPreviewWait := ini.ReadInteger('Browser', 'PreviewWait', 500);
1148
1149 // ????????/span>
1150 FBrowserAutoMaximize := TGikoBrowserAutoMaximize(
1151 ini.ReadInteger('Window', 'BrowserAutoMaximize', Ord(gbmDoubleClick)) );
1152
1153 //?鴻??????筝?荀ф?贋?違?≪?ゃ?潟??/span>
1154 FListIconVisible := ini.ReadBool('ThreadList', 'StateIconVisible', True);
1155 FNonAcquiredCount := ini.ReadBool('ThreadList', 'NonAcquiredCount', False);
1156 FCreationTimeLogs := ini.ReadBool('ThreadList', 'CreationTimeLogs', True);
1157 FFutureThread := ini.ReadBool('ThreadList', 'FutureThread', True);
1158 FSelectInterval := ini.ReadInteger('ThreadList', 'SelectInterval', 110);
1159 //?純?若????
1160 FBBSSortIndex := ini.ReadInteger('ThreadList', 'BBSSortIndex', 0);
1161 FBBSSortOrder := ini.ReadBool('ThreadList', 'BBSSortOrder', True);
1162 FCategorySortIndex := ini.ReadInteger('ThreadList', 'CategorySortIndex', 0);
1163 FCategorySortOrder := ini.ReadBool('ThreadList', 'CategorySortOrder', True);
1164 FBoardSortIndex := ini.ReadInteger('ThreadList', 'BoardSortIndex', 0);
1165 FBoardSortOrder := ini.ReadBool('ThreadList', 'BoardSortOrder', True);
1166 //Dat?純?<?鴻???純?若????
1167 FDatOchiSortIndex := ini.ReadInteger('ThreadList', 'DatOchiSortIndex', -1);
1168 FDatOchiSortOrder := ini.ReadBool('ThreadList', 'DatOchiSortOrder', False);
1169
1170 //?吾??莨若?炊?????激?恰???私戎??┃絎?
1171 FUseMachineTime := ini.ReadBool('PostTime', 'UseMachineTime', False);
1172 FTimeAdjustSec := ini.ReadInteger('PostTime', 'TimeAdjustSec', 0);
1173 FTimeAdjust := ini.ReadBool('PostTime', 'TimeAdjust', True);
1174
1175 //?泣???潟??
1176 if Exists then begin
1177 for i := 0 to GetSoundCount - 1 do begin
1178 SoundFileName[i] := ini.ReadString('Sound', SoundName[i], '');
1179 if not FileExists(SoundFileName[i]) then
1180 SoundFileName[i] := '';
1181 end;
1182 end else begin
1183 s := ExtractFileDir(Application.ExeName) + '\sound\';
1184 SoundFileName[0] := s + '??緇?????.wav';
1185 SoundFileName[1] := s + '??緇?????(綏???).wav';
1186 SoundFileName[2] := s + '???贋??wav';
1187 SoundFileName[3] := '';
1188 SoundFileName[4] := s + '??????wav';
1189 end;
1190
1191 //???若??????/span>
1192 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1193 CoolSet.FCoolID := ini.ReadInteger('MainCoolBar', 'ID' + IntToStr(i), -1);
1194 CoolSet.FCoolWidth := ini.ReadInteger('MainCoolBar', 'Width' + IntToStr(i), -1);
1195 CoolSet.FCoolBreak := ini.ReadBool('MainCoolBar', 'Break' + IntToStr(i), False);
1196 MainCoolSet[i] := CoolSet;
1197 end;
1198 FSelectComboBoxWidth := ini.ReadInteger( 'ListCoolBar', 'SelectWidth', 127 );
1199 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1200 CoolSet.FCoolID := ini.ReadInteger('ListCoolBar', 'ID' + IntToStr(i), -1);
1201 CoolSet.FCoolWidth := ini.ReadInteger('ListCoolBar', 'Width' + IntToStr(i), -1);
1202 CoolSet.FCoolBreak := ini.ReadBool('ListCoolBar', 'Break' + IntToStr(i), False);
1203 ListCoolSet[i] := CoolSet;
1204 end;
1205 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1206 CoolSet.FCoolID := ini.ReadInteger('BrowserCoolBar', 'ID' + IntToStr(i), -1);
1207 CoolSet.FCoolWidth := ini.ReadInteger('BrowserCoolBar', 'Width' + IntToStr(i), -1);
1208 CoolSet.FCoolBreak := ini.ReadBool('BrowserCoolBar', 'Break' + IntToStr(i), False);
1209 BrowserCoolSet[i] := CoolSet;
1210 end;
1211
1212 //???若????
1213 FAbonDeleterlo := ini.ReadBool('Abon','Deleterlo',false);
1214 FAbonReplaceul := ini.ReadBool('Abon','Replaceul',false);
1215 FPopUpAbon := ini.ReadBool('Abon','Popup',false);
1216 FShowNGLinesNum := ini.ReadBool('Abon','ShowNGLines',false);
1217 FAddResAnchor := ini.ReadBool('Abon','AddResAnchor',false);
1218 FDeleteSyria := ini.ReadBool('Abon','DeleteSyria',false);
1219
1220 // ?????c??/span>
1221 FSpaceToNBSP := ini.ReadBool( 'Editor', 'SpaceToNBSP', True );
1222 FAmpToCharRef := ini.ReadBool( 'Editor', 'AmpToCharRef', False );
1223
1224 //Tab????篆?絖???茯??粋昭??/span>
1225 FTabAutoLoadSave := ini.ReadBool('TabAuto', 'TabAutoLoadSave', False);
1226
1227
1228 finally
1229 ini.Free;
1230 end;
1231 end;
1232 //?炊?贋?亥??RL茯??粋昭??/span>
1233 procedure TSetting.ReadBoardURLsFile();
1234 var
1235 ini: TMemIniFile;
1236 urlNum: Integer;
1237 i : Integer;
1238 begin
1239 if not FileExists(GetBoardURLFileName()) then
1240 MakeURLIniFile();
1241 ini := TMemIniFile.Create(GetBoardURLFileName());
1242 try
1243 urlNum := ini.ReadInteger('URL','count',0);
1244 BoardURLSelected := ini.ReadInteger('URL','selected',0);
1245 for i := 0 to urlNum - 1 do begin
1246 FBoardURLs.Append(ini.ReadString('URL',IntToStr(i+1),''));
1247 end;
1248 finally
1249 ini.Free;
1250 end;
1251
1252 end;
1253 //荐?????<?ゃ???絖?(system)
1254 procedure TSetting.WriteSystemSettingFile();
1255 var
1256 ini: TMemIniFile;
1257 begin
1258 ini := TMemIniFile.Create(GetFileName());
1259 try
1260 //??篆<???????<?泣?ゃ??/span>
1261 ini.WriteInteger('HTTP', 'RecvBufferSize', FRecvBufferSize);
1262 //HTTP1.1篏睡??/span>
1263 ini.WriteBool('HTTP', 'Protocol', FProtocol);
1264 //???????傑・膓?HTTP1.1篏睡??/span>
1265 ini.WriteBool('HTTP', 'ProxyProtocol', FProxyProtocol);
1266
1267 ini.WriteBool('ReadProxy', 'Proxy', FReadProxy);
1268 ini.WriteString('ReadProxy', 'Address', FReadProxyAddress);
1269 ini.WriteInteger('ReadProxy', 'Port', FReadProxyPort);
1270 ini.WriteString('ReadProxy', 'UserID', FReadProxyUserID);
1271 ini.WriteString('ReadProxy', 'Password', FReadProxyPassword);
1272
1273 ini.WriteBool('WriteProxy', 'Proxy', FWriteProxy);
1274 ini.WriteString('WriteProxy', 'Address', FWriteProxyAddress);
1275 ini.WriteInteger('WriteProxy', 'Port', FWriteProxyPort);
1276 ini.WriteString('WriteProxy', 'UserID', FWriteProxyUserID);
1277 ini.WriteString('WriteProxy', 'Password', FWriteProxyPassword);
1278
1279 ini.WriteString('Window', 'BrowserFontName', FBrowserFontName);
1280 ini.WriteInteger('Window', 'BrowserFontSize', FBrowserFontSize);
1281 ini.WriteInteger('Window', 'BrowserFontSize', FBrowserFontSize);
1282 ini.WriteInteger('Window', 'BrowserFontBold', FBrowserFontBold);
1283 ini.WriteInteger('Window', 'BrowserFontItalic', FBrowserFontItalic);
1284 ini.WriteInteger('Window', 'BrowserFontColor', FBrowserFontColor);
1285 ini.WriteInteger('Window', 'BrowserBackColor', FBrowserBackColor);
1286
1287 ini.WriteString('Window', 'CabinetFontName', FCabinetFontName);
1288 ini.WriteInteger('Window', 'CabinetFontSize', FCabinetFontSize);
1289 ini.WriteString('Window', 'CabinetFontColor', ColorToString(FCabinetFontColor));
1290 ini.WriteString('Window', 'CabinetBackColor', ColorToString(FCabinetBackColor));
1291
1292 ini.WriteString('Window', 'ListFontName', FListFontName);
1293 ini.WriteInteger('Window', 'ListFontSize', FListFontSize);
1294 ini.WriteString('Window', 'ListFontColor', ColorToString(FListFontColor));
1295 ini.WriteString('Window', 'ListBackColor', ColorToString(FListBackColor));
1296 ini.WriteBool('Window','UseOddColor',FUseOddColorOddResNum);
1297 ini.WriteString('Window', 'OddColor',ColorToString(FOddColor));
1298
1299 ini.WriteString('Window', 'EditorFontName', FEditorFontName);
1300 ini.WriteInteger('Window', 'EditorFontSize', FEditorFontSize);
1301 ini.WriteString('Window', 'EditorFontColor', ColorToString(FEditorFontColor));
1302 ini.WriteString('Window', 'EditorBackColor', ColorToString(FEditorBackColor));
1303
1304 ini.WriteString('Window', 'BrowserTabFontName', FBrowserTabFontName);
1305 ini.WriteInteger('Window', 'BrowserTabFontSize', FBrowserTabFontSize);
1306 ini.WriteBool('Window', 'BrowserTabFontBold', FBrowserTabFontBold);
1307 ini.WriteBool('Window', 'BrowserTabFontItalic', FBrowserTabFontItalic);
1308
1309 ini.WriteString('Window', 'HintFontName', FHintFontName);
1310 ini.WriteInteger('Window', 'HintFontSize', FHintFontSize);
1311 ini.WriteString('Window', 'HintFontColor', ColorToString(FHintFontColor));
1312 ini.WriteString('Window', 'HintBackColor', ColorToString(FHintBackColor));
1313
1314 ini.UpdateFile;
1315 finally
1316 ini.Free;
1317 end;
1318 end;
1319
1320 //荐?????<?ゃ???絖?(window)
1321 procedure TSetting.WriteWindowSettingFile();
1322 var
1323 i: Integer;
1324 ini: TMemIniFile;
1325 CoolSet: TCoolSet;
1326 begin
1327 ini := TMemIniFile.Create(GetFileName());
1328 try
1329 ini.WriteInteger('WindowSize', 'Top', WindowTop);
1330 ini.WriteInteger('WindowSize', 'Left', WindowLeft);
1331 ini.WriteInteger('WindowSize', 'Height', WindowHeight);
1332 ini.WriteInteger('WindowSize', 'Width', WindowWidth);
1333 ini.WriteBool('WindowSize', 'Max', WindowMax);
1334
1335 ini.WriteInteger('ViewStyle', 'ListView', Ord(ListStyle));
1336
1337 ini.WriteInteger('EditorWindowSize', 'Top', EditWindowTop);
1338 ini.WriteInteger('EditorWindowSize', 'Left', EditWindowLeft);
1339 ini.WriteInteger('EditorWindowSize', 'Height', EditWindowHeight);
1340 ini.WriteInteger('EditorWindowSize', 'Width', EditWindowWidth);
1341 ini.WriteBool('EditorWindowSize', 'Max', EditWindowMax);
1342 ini.WriteBool('EditorWindowSize', 'Stay', EditWindowStay);
1343 ini.WriteBool('EditorWindowSize', 'Translucent', EditWindowTranslucent);
1344
1345 ini.WriteInteger('OptionDialog', 'TabIndex', FOptionDialogTabIndex);
1346
1347 //???若??????/span>
1348 ini.WriteBool('ToolBar', 'StdVisible', FStdToolBarVisible);
1349 ini.WriteBool('ToolBar', 'AddressVisible', FAddressBarVisible);
1350 ini.WriteBool('ToolBar', 'LinkVisible', FLinkBarVisible);
1351 ini.WriteBool('ToolBar', 'ListVisible', FListToolBarVisible);
1352 ini.WriteBool('ToolBar', 'ListNameVisible', FListNameBarVisible);
1353 ini.WriteBool('ToolBar', 'BrowserVisible', FBrowserToolBarVisible);
1354 ini.WriteBool('ToolBar', 'BrowserNameVisible', FBrowserNameBarVisible);
1355 //???若??????rapable
1356 ini.WriteBool('ToolBar', 'ListWrapable', FListToolBarWrapable);
1357 ini.WriteBool('ToolBar', 'BrowserWrapable', FBrowserToolBarWrapable);
1358
1359 //?帥??
1360 ini.WriteBool('Tab', 'BrowserTabVisible', FBrowserTabVisible);
1361 ini.WriteInteger('Tab', 'BrowserTabPosition', Ord(FBrowserTabPosition));
1362 ini.WriteInteger('Tab', 'BrowserTabAppend', Ord(FBrowserTabAppend));
1363 ini.WriteInteger('Tab', 'BrowserTabStyle', Ord(FBrowserTabStyle));
1364
1365 //?<???祉?若?吾????/span>
1366 ini.WriteBool('MessageBar', 'Visible', FMessageBarVisible);
1367 ini.WriteInteger('MessageBar', 'Height', FMessegeBarHeight);
1368
1369 //?鴻???若?帥?鴻????/span>
1370 ini.WriteBool('StatusBar', 'Visible', FStatusBarVisible);
1371
1372 //???c????????
1373 ini.WriteBool('Cabinet', 'Visible', FCabinetVisible);
1374 ini.WriteInteger('Cabinet', 'Width', FCabinetWidth);
1375 ini.WriteInteger('Cabinet', 'Index', FCabinetIndex);
1376
1377 //???鴻?????泣?ゃ?冴?????贋梓綛?/span>
1378 ini.WriteInteger('List', 'Orientation', Ord(FListOrientation));
1379 ini.WriteInteger('List', 'Height', FListHeight);
1380 ini.WriteInteger('List', 'HeightState', Ord(FListHeightState));
1381 ini.WriteInteger('List', 'Width', FListWidth);
1382 ini.WriteInteger('List', 'WidthState', Ord(FListWidthState));
1383 // ini.WriteBool('List', 'HeightMax', FListHeightMax);
1384 // ini.WriteBool('List', 'WidthMax', FListWidthMax);
1385
1386
1387 // ini.WriteInteger('Window', 'BrowserFontSize', BrowserFontSize);
1388
1389 //???鴻????埈;腓?/span>
1390 ini.WriteBool('Function', 'ListViewNo', FListViewNo);
1391 //CSS篏睡??/span>
1392 ini.WriteBool('CSS', 'UseCSS', FUseCSS);
1393 //CSS???<?ゃ????
1394 ini.WriteString('CSS', 'FileName', FCSSFileName);
1395 //Mail罨?茵?ず
1396 ini.WriteBool('Thread', 'ShowMail', FShowMail);
1397 // ???壕;腓榊???/span>
1398 ini.DeleteKey( 'Thread', 'OnlyAHundredRes' ); // ?ゃ??荐????????/span>
1399 ini.WriteInteger('Thread', 'ResRange', FResRange);
1400 ini.WriteBool('Thread', 'ResRangeHold', FResRangeHold);
1401 // ?鴻??????筝?荀ц;腓榊???/span>
1402 ini.WriteInteger('ThreadList', 'ThreadRange', Ord( FThreadRange ));
1403 //???医???ょ∈茯?
1404 ini.WriteBool('Function', 'LogDeleteMessage', FDeleteMsg);
1405 //腟?篋?腆肴?
1406 ini.WriteBool('Function','ShowDialogForEnd',FShowDialogForEnd);
1407 //AllTabClose
1408 ini.WriteBool('Function','ShowDialogForAllTabClose', FShowDialogForAllTabClose);
1409 //Samba
1410 ini.WriteBool('Function','UseSamba', FUseSamba);
1411 //ResAnchorjamp
1412 ini.WriteBool('Function', 'ResAnchoJamp', ResAnchorJamp);
1413
1414 //???≪?????c???????????≪????茵?ず
1415 ini.WriteBool('Thread', 'UnActivePopup', FUnActivePopup);
1416 //???鴻???????≪???????????若???若????
1417 ini.WriteBool('Thread', 'ResPopupHeaderBold', FResPopupHeaderBold);
1418 //ini.WriteString('BoardURL', '2ch', FBoardURL2ch);
1419
1420 //茯?荐主?????若??D?祉???鴻???若??
1421 ini.WriteString('Attestation', 'UserID', FUserID);
1422 ini.WriteString('Attestation', 'Password', Encrypt(FPassword));
1423 ini.WriteBool('Attestation', 'AutoLogin', FAutoLogin);
1424 ini.WriteBool('Attestation', 'FForcedLogin', FForcedLogin);
1425 ini.WriteString('Attestation', 'FDolibURL', FDolibURL);
1426
1427 //URL??????????莎桁???≪????/span>
1428 ini.WriteBool('URLApp', 'Select', FURLApp);
1429 ini.WriteString('URLApp', 'File', FURLAppFile);
1430
1431 //mailto????????????篏?
1432 ini.WriteBool('Mailto', 'Open', FOpenMailer);
1433
1434 //???????≪????篏?臀?/span>
1435 ini.WriteInteger('Browser', 'PopupPosition', Ord(FPopupPosition));
1436
1437 //?≪?????鴻????/span>
1438 ini.WriteBool('AddressBar', 'URLDisplay', FURLDisplay);
1439 ini.WriteBool('AddressBar', 'TabStop', FAddressBarTabStop);
1440 ini.WriteBool('AddressBar', 'LinkAdd', FLinkAddAddressBar);
1441 ini.WriteInteger('AddressBar', 'HistoryCount', FAddressHistoryCount);
1442
1443 //?糸????????ャ??/span>
1444 ini.WriteBool('Browser', 'PreviewVisible', FPreviewVisible);
1445 ini.WriteInteger('Browser', 'PreviewSize', Ord(FPreviewSize));
1446 ini.WriteInteger('Browser', 'PreviewWait', FPreviewWait);
1447
1448 ini.WriteInteger('Window', 'BrowserAutoMaximize', Ord( BrowserAutoMaximize ) );
1449
1450 //?鴻??????筝?荀ф?贋?違?≪?ゃ?潟??/span>
1451 ini.WriteBool('ThreadList', 'StateIconVisible', FListIconVisible);
1452 ini.WriteBool('ThreadList', 'NonAcquiredCount', FNonAcquiredCount);
1453 ini.WriteBool('ThreadList', 'CreationTimeLogs',FCreationTimeLogs);
1454 ini.WriteBool('ThreadList', 'FutureThread', FFutureThread);
1455 ini.WriteInteger('ThreadList', 'SelectInterval', FSelectInterval);
1456 //?純?若????
1457 ini.WriteInteger('ThreadList', 'BBSSortIndex', FBBSSortIndex);
1458 ini.WriteBool('ThreadList', 'BBSSortOrder', FBBSSortOrder);
1459 ini.WriteInteger('ThreadList', 'CategorySortIndex', FCategorySortIndex);
1460 ini.WriteBool('ThreadList', 'CategorySortOrder', FCategorySortOrder);
1461 ini.WriteInteger('ThreadList', 'BoardSortIndex', FBoardSortIndex);
1462 ini.WriteBool('ThreadList', 'BoardSortOrder', FBoardSortOrder);
1463 ini.WriteInteger('ThreadList', 'DatOchiSortIndex', FDatOchiSortIndex);
1464 ini.WriteBool('ThreadList', 'DatOchiSortOrder', FDatOchiSortOrder);
1465
1466 //?吾??莨若?炊?????激?恰???私戎??┃絎?
1467 ini.WriteBool('PostTime', 'UseMachineTime', FUseMachineTime);
1468 ini.WriteInteger('PostTime', 'TimeAdjustSec', FTimeAdjustSec);
1469 ini.WriteBool('PostTime', 'TimeAdjust', FTimeAdjust);
1470
1471 // ???鴻????????綛?
1472 for i := 0 to Length(FBBSColumnWidth) - 1 do begin
1473 ini.WriteInteger('BBSColumnWidth', 'ID' + IntToStr(i), FBBSColumnWidth[i]);
1474 end;
1475 for i := 0 to Length(FCategoryColumnWidth) - 1 do begin
1476 ini.WriteInteger('CategoryColumnWidth', 'ID' + IntToStr(i), FCategoryColumnWidth[i]);
1477 end;
1478 for i := 0 to Length(FBoardColumnWidth) - 1 do begin
1479 ini.WriteInteger('BoardColumnWidth', 'ID' + IntToStr(i), FBoardColumnWidth[i]);
1480 end;
1481
1482 // ?????眼?????鴻????綺?span>
1483 for i := 0 to FBBSColumnOrder.Count - 1 do
1484 ini.WriteInteger( 'BBSColumnOrder', 'ID' + IntToStr( i ), Ord( FBBSColumnOrder[ i ] ) );
1485
1486 // ?帥???鴻????綺?span>
1487 for i := 0 to FCategoryColumnOrder.Count - 1 do
1488 ini.WriteInteger( 'CategoryColumnOrder', 'ID' + IntToStr( i ), Ord( FCategoryColumnOrder[ i ] ) );
1489
1490 // ?鴻?????鴻????綺?span>
1491 for i := 0 to FBoardColumnOrder.Count - 1 do
1492 ini.WriteInteger( 'BoardColumnOrder', 'ID' + IntToStr( i ), Ord( FBoardColumnOrder[ i ] ) );
1493
1494 //?泣???潟??
1495 for i := 0 to GetSoundCount - 1 do begin
1496 if not FileExists(SoundFileName[i]) then
1497 SoundFileName[i] := '';
1498 ini.WriteString('Sound', SoundName[i], SoundFileName[i]);
1499 end;
1500
1501 //CoolBar
1502 ini.EraseSection('MainCoolBar');
1503 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1504 CoolSet := MainCoolSet[i];
1505 ini.WriteInteger('MainCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
1506 ini.WriteInteger('MainCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
1507 ini.WriteBool('MainCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
1508 end;
1509 ini.EraseSection('ListCoolBar');
1510 ini.WriteInteger( 'ListCoolBar', 'SelectWidth', FSelectComboBoxWidth );
1511 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1512 CoolSet := ListCoolSet[i];
1513 ini.WriteInteger('ListCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
1514 ini.WriteInteger('ListCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
1515 ini.WriteBool('ListCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
1516 end;
1517 ini.EraseSection('BrowserCoolBar');
1518 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1519 CoolSet := BrowserCoolSet[i];
1520 ini.WriteInteger('BrowserCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
1521 ini.WriteInteger('BrowserCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
1522 ini.WriteBool('BrowserCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
1523 end;
1524
1525 //???若????
1526 ini.WriteBool('Abon','Deleterlo',FAbonDeleterlo);
1527 ini.WriteBool('Abon','Replaceul',FAbonReplaceul);
1528 ini.WriteBool('Abon','Popup',FPopUpAbon);
1529 ini.WriteBool('Abon','ShowNGLines',FShowNGLinesNum);
1530 ini.WriteBool('Abon','AddResAnchor',FAddResAnchor);
1531 ini.WriteBool('Abon','DeleteSyria',FDeleteSyria);
1532
1533 // ?????c??/span>
1534 ini.WriteBool( 'Editor', 'SpaceToNBSP', FSpaceToNBSP );
1535 ini.WriteBool( 'Editor', 'AmpToCharRef', FAmpToCharRef );
1536
1537 ini.WriteBool('TabAuto', 'TabAutoLoadSave', FTabAutoLoadSave);
1538
1539 ini.UpdateFile;
1540 finally
1541 ini.Free;
1542 end;
1543 end;
1544
1545 //荐?????<?ゃ???絖?(name & mail)
1546 procedure TSetting.WriteNameMailSettingFile();
1547 var
1548 i: Integer;
1549 ini: TMemIniFile;
1550 begin
1551 ini := TMemIniFile.Create(GetFileName());
1552 try
1553 ini.EraseSection('Name');
1554 ini.EraseSection('Mail');
1555 ini.EraseSection('SelectText');
1556 for i := 0 to FNameList.Count - 1 do begin
1557 ini.WriteString('Name', Format('%.2d', [i + 1]), FNameList[i]);
1558 if i >= 39 then
1559 Break;
1560 end;
1561 for i := 0 to FMailList.Count - 1 do begin
1562 ini.WriteString('Mail', Format('%.2d', [i + 1]), FMailList[i]);
1563 if i >= 39 then
1564 Break;
1565 end;
1566 for i := 0 to FSelectTextList.Count - 1 do begin
1567 ini.WriteString('SelectText', Format('%.2d', [i + 1]), FSelectTextList[i]);
1568 if i >= 39 then
1569 Break;
1570 end;
1571 ini.UpdateFile;
1572 finally
1573 ini.Free;
1574 end;
1575 end;
1576
1577 procedure TSetting.WriteFolderSettingFile();
1578 var
1579 ini: TMemIniFile;
1580 begin
1581 ini := TMemIniFile.Create(GetFileName());
1582 try
1583 if ExtractFilePath(Application.ExeName) + 'Log' = NewLogFolder then
1584 ini.DeleteKey('Folder', 'LogFolder')
1585 else
1586 ini.WriteString('Folder', 'LogFolder', NewLogFolder);
1587 ini.UpdateFile;
1588 finally
1589 ini.Free;
1590 end;
1591 end;
1592 //?炊?贋?亥??oardURL??篆?絖?
1593 procedure TSetting.WriteBoardURLSettingFile();
1594 var
1595 ini: TMemIniFile;
1596 i : Integer;
1597 oldcount : Integer;
1598 begin
1599 ini := TMemIniFile.Create(GetBoardURLFileName());
1600 try
1601 oldcount := ini.ReadInteger('URL','count',FBoardURLs.Count);
1602 ini.WriteInteger('URL','count',FBoardURLs.Count);
1603 ini.WriteInteger('URL','selected',BoardURLSelected);
1604 for i := 0 to FBoardURLs.Count -1 do begin
1605 ini.WriteString('URL',IntToStr(i+1),FBoardURLs.Strings[i]);
1606 end;
1607 if oldcount > FBoardURLs.Count then begin
1608 for i := FBoardURLs.Count to oldcount do begin
1609 ini.DeleteKey('URL',IntToStr(i+1));
1610 end;
1611 end;
1612 ini.UpdateFile;
1613 finally
1614 ini.Free;
1615 end;
1616 end;
1617
1618 {$R-}
1619 //???鴻????????????????/span>
1620 function TSetting.GetBBSColumnWidth(index: Integer): Integer;
1621 begin
1622 Result := IfThen(index in [0..Length(FBBSColumnWidth) - 1], FBBSColumnWidth[index], 0);
1623 end;
1624
1625 function TSetting.GetCategoryColumnWidth(index: Integer): Integer;
1626 begin
1627 Result := IfThen(index in [0..Length(FCategoryColumnWidth) - 1], FCategoryColumnWidth[index], 0);
1628 end;
1629
1630 function TSetting.GetBoardColumnWidth(index: Integer): Integer;
1631 begin
1632 Result := IfThen(index in [0..Length(FBoardColumnWidth) - 1], FBoardColumnWidth[index], 0);
1633 end;
1634 {$IFDEF DEBUG}
1635 {$R+}
1636 {$ENDIF}
1637
1638 procedure TSetting.SetBBSColumnWidth(index: Integer; value: Integer);
1639 begin
1640 if index in [0..Length(FBBSColumnWidth) - 1] then
1641 FBBSColumnWidth[index] := value;
1642 end;
1643
1644 procedure TSetting.SetCategoryColumnWidth(index: Integer; value: Integer);
1645 begin
1646 if index in [0..Length(FCategoryColumnWidth) - 1] then
1647 FCategoryColumnWidth[index] := value;
1648 end;
1649
1650 procedure TSetting.SetBoardColumnWidth(index: Integer; value: Integer);
1651 begin
1652 if index in [0..Length(FBoardColumnWidth) - 1] then
1653 FBoardColumnWidth[index] := value;
1654 end;
1655
1656 function TSetting.GetSoundCount: Integer;
1657 begin
1658 Result := Length(SOUND_NAME);
1659 end;
1660
1661 function TSetting.GetSoundName(Index: Integer): string;
1662 begin
1663 if (Index < GetSoundCount) and (Index >= 0) then
1664 Result := SOUND_NAME[Index].Name
1665 else
1666 Result := '';
1667 end;
1668
1669 function TSetting.GetSoundViewName(Index: Integer): string;
1670 begin
1671 if (Index < GetSoundCount) and (Index >= 0) then
1672 Result := SOUND_NAME[Index].ViewName
1673 else
1674 Result := '';
1675 end;
1676
1677 function TSetting.GetSoundFileName(Index: Integer): string;
1678 begin
1679 if (Index < GetSoundCount) and (Index >= 0) then
1680 Result := SOUND_NAME[Index].FileName
1681 else
1682 Result := '';
1683 end;
1684
1685 procedure TSetting.SetSoundFileName(Index: Integer; value: string);
1686 begin
1687 if (Index < GetSoundCount) and (Index >= 0) then
1688 SOUND_NAME[Index].FileName := value;
1689 end;
1690
1691 function TSetting.FindSoundFileName(Name: string): string;
1692 var
1693 i: Integer;
1694 begin
1695 for i := 0 to GetSoundCount - 1 do begin
1696 if SoundName[i] = Name then begin
1697 Result := SoundFileName[i];
1698 Exit;
1699 end;
1700 end;
1701 Result := '';
1702 end;
1703
1704 function TSetting.Encrypt(s: string): string;
1705 var
1706 cryptObj: THogeCryptAuto;
1707 inputStream, outputStream: TStringStream;
1708 begin
1709 inputStream := TStringStream.Create(s);
1710 outputStream := TStringStream.Create('');
1711 cryptObj := THogeCryptAuto.Create;
1712 try
1713 // ???桁??
1714 cryptObj.Encrypt(inputStream, GIKO_ENCRYPT_TEXT, outputStream);
1715
1716 // ???ゃ?????????у?荀?????????????鴻???????
1717 Result := HogeBase64Encode(outputStream.DataString);
1718 finally
1719 cryptObj.Free;
1720 outputStream.Free;
1721 inputStream.Free;
1722 end;
1723 end;
1724
1725 function TSetting.Decrypt(s: string): string;
1726 var
1727 cryptObj: THogeCryptAuto;
1728 inputStream, outputStream: TStringStream;
1729 begin
1730 try
1731 inputStream := TStringStream.Create(HogeBase64Decode(s));
1732 except
1733 Result := '';
1734 Exit;
1735 end;
1736 outputStream := TStringStream.Create('');
1737 cryptObj := THogeCryptAuto.Create;
1738 try
1739 // 緇??/span>
1740 cryptObj.Decrypt(inputStream, GIKO_ENCRYPT_TEXT, outputStream);
1741 Result := outputStream.DataString;
1742 finally
1743 cryptObj.Free;
1744 outputStream.Free;
1745 inputStream.Free;
1746 end;
1747 end;
1748
1749 function TSetting.GetMainCoolSet(Index: Integer): TCoolSet;
1750 begin
1751 if Index in [0..MAIN_COOLBAND_COUNT - 1] then
1752 Result := FMainCoolBar[Index]
1753 else begin
1754 Result.FCoolID := -1;
1755 Result.FCoolWidth := -1;
1756 Result.FCoolBreak := False;
1757 end;
1758 end;
1759
1760 function TSetting.GetBoardCoolSet(Index: Integer): TCoolSet;
1761 begin
1762 if Index in [0..LIST_COOLBAND_COUNT - 1] then
1763 Result := FListCoolBar[Index]
1764 else begin
1765 Result.FCoolID := -1;
1766 Result.FCoolWidth := -1;
1767 Result.FCoolBreak := False;
1768 end;
1769 end;
1770
1771 function TSetting.GetBrowserCoolSet(Index: Integer): TCoolSet;
1772 begin
1773 if Index in [0..BROWSER_COOLBAND_COUNT - 1] then
1774 Result := FBrowserCoolBar[Index]
1775 else begin
1776 Result.FCoolID := -1;
1777 Result.FCoolWidth := -1;
1778 Result.FCoolBreak := False;
1779 end;
1780 end;
1781
1782 procedure TSetting.SetMainCoolSet(Index: Integer; CoolSet: TCoolSet);
1783 begin
1784 if Index in [0..MAIN_COOLBAND_COUNT - 1] then
1785 FMainCoolBar[Index] := CoolSet;
1786 end;
1787
1788 procedure TSetting.SetBoardCoolSet(Index: Integer; CoolSet: TCoolSet);
1789 begin
1790 if Index in [0..LIST_COOLBAND_COUNT - 1] then
1791 FListCoolBar[Index] := CoolSet;
1792 end;
1793
1794 procedure TSetting.SetBrowserCoolSet(Index: Integer; CoolSet: TCoolSet);
1795 begin
1796 if Index in [0..BROWSER_COOLBAND_COUNT - 1] then
1797 FBrowserCoolBar[Index] := CoolSet;
1798 end;
1799
1800 //url.ini????????????????????
1801 procedure TSetting.MakeURLIniFile();
1802 var
1803 ini: TMemIniFile;
1804 begin
1805 ini := TMemIniFile.Create(GetBoardURLFileName());
1806 try
1807 ini.WriteInteger('URL','count',2);
1808 ini.WriteInteger('URL','selected',2);
1809 ini.WriteString('URL','1',DEFAULT_2CH_BOARD_URL1);
1810 ini.WriteString('URL','2',DEFAULT_2CH_BOARD_URL2);
1811 ini.UpdateFile;
1812 finally
1813 ini.Free;
1814 end;
1815 end;
1816
1817 (*************************************************************************
1818 *???若?????<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
1819 *************************************************************************)
1820 function TSetting.GetBoardFileName: string;
1821 begin
1822 Result := GetAppDir + CONFIG_DIR_NAME + '\' + BOARD_FILE_NAME;
1823 end;
1824
1825 (*************************************************************************
1826 *???若?????<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
1827 *************************************************************************)
1828 function TSetting.GetCustomBoardFileName: string;
1829 begin
1830 Result := GetAppDir + CONFIG_DIR_NAME + '\' + CUSTOMBOARD_FILE_NAME;
1831 end;
1832
1833 (*************************************************************************
1834 *???若?????c??????????
1835 *************************************************************************)
1836 function TSetting.GetBoardDir: string;
1837 begin
1838 Result := GetAppDir + CONFIG_DIR_NAME + '\' + BOARD_DIR_NAME + '\';
1839 end;
1840
1841 (*************************************************************************
1842 *???潟???????????????弱????緇?
1843 *************************************************************************)
1844 function TSetting.GetHtmlTempFileName: string;
1845 begin
1846 Result := TEMP_FOLDER;
1847 end;
1848
1849
1850 (*************************************************************************
1851 *絎?茵????<?ゃ????????????緇?
1852 *************************************************************************)
1853 function TSetting.GetAppDir: string;
1854 begin
1855 Result := ExtractFilePath(Application.ExeName);
1856 end;
1857
1858 (*************************************************************************
1859 *TempHtml???<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
1860 *************************************************************************)
1861 function TSetting.GetTempFolder: string;
1862 begin
1863 Result := GetAppDir + TEMP_FOLDER;
1864 end;
1865
1866 (*************************************************************************
1867 *sent.ini???<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
1868 *************************************************************************)
1869 function TSetting.GetSentFileName: string;
1870 begin
1871 Result := GetAppDir + SENT_FILE_NAME;
1872 end;
1873
1874 (*************************************************************************
1875 *outbox.ini???<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
1876 *************************************************************************)
1877 function TSetting.GetOutBoxFileName: string;
1878 begin
1879 Result := GetAppDir + OUTBOX_FILE_NAME;
1880 end;
1881
1882 (*************************************************************************
1883 *Config??????????緇?
1884 *************************************************************************)
1885 function TSetting.GetConfigDir: string;
1886 begin
1887 Result := IncludeTrailingPathDelimiter(GetAppDir + CONFIG_DIR_NAME);
1888 end;
1889
1890 function TSetting.GetStyleSheetDir: string;
1891 begin
1892 Result := IncludeTrailingPathDelimiter(GetConfigDir + CSS_DIR_NAME);
1893 end;
1894
1895 function TSetting.GetSkinDir: string;
1896 begin
1897 Result := IncludeTrailingPathDelimiter(GetConfigDir + SKIN_DIR_NAME);
1898 end;
1899
1900 function TSetting.GetSkinHeaderFileName: string;
1901 begin
1902 Result := CSSFileName + SKIN_HEADER_FILE_NAME;
1903 end;
1904
1905 function TSetting.GetSkinFooterFileName: string;
1906 begin
1907 Result := CSSFileName + SKIN_FOOTER_FILE_NAME;
1908 end;
1909
1910 function TSetting.GetSkinNewResFileName: string;
1911 begin
1912 Result := CSSFileName + SKIN_NEWRES_FILE_NAME;
1913 end;
1914
1915 function TSetting.GetSkinResFileName: string;
1916 begin
1917 Result := CSSFileName + SKIN_RES_FILE_NAME;
1918 end;
1919
1920 function TSetting.GetSkinBookmarkFileName: string;
1921 begin
1922 Result := CSSFileName + SKIN_BOOKMARK_FILE_NAME;
1923 end;
1924
1925 function TSetting.GetSkinNewmarkFileName: string;
1926 begin
1927 Result := CSSFileName + SKIN_NEWMARK_FILE_NAME;
1928 end;
1929
1930 function TSetting.GetNGWordsDir: string;
1931 begin
1932 Result := IncludeTrailingPathDelimiter(GetConfigDir + NGWORDs_DIR_NAME);
1933 end;
1934
1935 function TSetting.GetBoardPlugInDir: string;
1936 begin
1937 Result := IncludeTrailingPathDelimiter(GetConfigDir + BOARD_PLUGIN_DIR_NAME);
1938 end;
1939
1940 procedure TSetting.SetUseCSS( value: Boolean );
1941 begin
1942
1943 FUseCSS := value;
1944
1945 FUseSkin :=
1946 UseCSS and
1947 (Pos( GetSkinDir, CSSFileName ) > 0) and
1948 FileExists( GetSkinHeaderFileName );
1949
1950 end;
1951
1952 procedure TSetting.SetCSSFileName( fileName: string );
1953 begin
1954
1955 FCSSFileName := fileName;
1956
1957 FUseSkin :=
1958 UseCSS and
1959 (Pos( GetSkinDir, CSSFileName ) > 0) and
1960 FileExists( GetSkinHeaderFileName );
1961
1962 end;
1963
1964 function TSetting.GetSambaFileName: string;
1965 begin
1966 Result := GetAppDir + SAMBATIME_FILE_NAME;
1967 end;
1968 //?炊?贋?育?ゅ??????眼?????鴻??篆?絖????<?ゃ??/span>
1969 function TSetting.GetIgnoreFileName: string;
1970 begin
1971 Result := GetConfigDir + IGNORE_FILE_NAME;
1972 end;
1973
1974 end.
1975
1976

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