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.96.2.1 - (show annotations) (download) (as text)
Sun Oct 30 04:34:37 2005 UTC (18 years, 5 months ago) by h677
Branch: Bdraw
CVS Tags: v1_51_0_612, v1_51_0_611, v1_51_0_616, v1_51_0_614, v1_51_0_615, v1_51_0_613
Changes since 1.96: +7 -1 lines
File MIME type: text/x-pascal
WebBrowserへの書き込みを直接ではなく、メモリストリーム経由に変更。
かちゅ〜しゃ用のスキンの使用をオプションに変更

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

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