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.132 - (show annotations) (download) (as text)
Sun Feb 3 15:00:55 2008 UTC (16 years, 2 months ago) by h677
Branch: MAIN
CVS Tags: v1_57_0_739, v1_57_0_738, v1_57_1_744, v1_57_2_749, v1_57_0_742, v1_57_0_743, v1_57_0_740, v1_57_0_741, v1_57_0_744
Branch point for: Bb57
Changes since 1.131: +9 -9 lines
File MIME type: text/x-pascal
デストラクタの処理順昔に戻した

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

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