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

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