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

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