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.144 - (show annotations) (download) (as text)
Sun Feb 27 01:25:25 2011 UTC (13 years, 1 month ago) by h677
Branch: MAIN
CVS Tags: v1_63_1_819, v1_62_0_812, v1_63_0_818, v1_63_0_817, v1_63_0_816, v1_63_0_815, v1_62_1_813, HEAD
Branch point for: Bb62, Bb63
Changes since 1.143: +15 -0 lines
File MIME type: text/x-pascal
冒険の書→忍法帖
すいとんされた時に、Cookieを削除するように修正

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

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