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.123 - (show annotations) (download) (as text)
Tue Jun 26 15:49:25 2007 UTC (16 years, 9 months ago) by h677
Branch: MAIN
Changes since 1.122: +44 -22 lines
File MIME type: text/x-pascal
直接Exeのファイルパスを参照している部分をGikoSystem経由に変更
パス取得関連の整理

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

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