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.128 - (show annotations) (download) (as text)
Wed Aug 22 15:04:23 2007 UTC (16 years, 8 months ago) by h677
Branch: MAIN
CVS Tags: v1_57_0_727, v1_57_0_728, v1_57_0_729
Changes since 1.127: +19 -0 lines
File MIME type: text/x-pascal
レスポップアップ位置の調整を設定可能にした。
レスポップアップのアンカーはずれから消えるまでのWaitを設定可能にした。

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

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