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

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