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.91.2.3 - (show annotations) (download) (as text)
Mon Oct 3 15:34:35 2005 UTC (18 years, 6 months ago) by genyakun
Branch: Bb50
Changes since 1.91.2.2: +6 -5 lines
File MIME type: text/x-pascal
板一覧URLで更新されていないOCNのアドレスを削除

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

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