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.120.2.2 - (show annotations) (download) (as text)
Wed May 30 15:46:59 2007 UTC (16 years, 10 months ago) by h677
Branch: bRESPOPUP
CVS Tags: v1_56_0_711, v1_56_0_712
Changes since 1.120.2.1: +1 -1 lines
File MIME type: text/x-pascal
デフォルトを右上に変更

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

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