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

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