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.127 - (show annotations) (download) (as text)
Sun Aug 19 07:18:39 2007 UTC (16 years, 8 months ago) by h677
Branch: MAIN
CVS Tags: v1_57_0_725, v1_57_0_726
Changes since 1.126: +5 -1 lines
File MIME type: text/x-pascal
同IDレスアンカー表示の制限数越えのメッセージを非表示にするオプションを追加

1 unit Setting;
2
3
4 interface
5
6 uses
7 SysUtils, Classes, Graphics, Forms, {Math, IniFiles, UCryptAuto, UBase64,}
8 ComCtrls, GestureModel, IniFiles, SkinFiles;
9
10 const
11 MAIN_COOLBAND_COUNT = 4; //?<?ゃ??oolBand????/span>
12 LIST_COOLBAND_COUNT = 2; //??oolBand????/span>
13 BROWSER_COOLBAND_COUNT = 3; //????????oolBand????/span>
14
15
16 type
17 TGikoTabPosition = (gtpTop, gtpBottom); // ?帥??篏?臀?/span>
18 TGikoTabAppend = (gtaFirst, gtaLast, gtaRight, gtaLeft); // ?帥??菴遵??篏?臀?/span>
19 TGikoTabStyle = (gtsTab, gtsButton, gtsFlat); // ?帥???鴻?帥?ゃ??/span>
20 TGikoListOrientation = (gloHorizontal, gloVertical); // ???鴻?????眼?紙梓綛?/span>
21 TGikoListState = (glsMax, glsNormal, glsMin); // ???鴻???泣?ゃ?榊?倶??
22 // ???????≪????茵?ず篏?臀?/span>
23 TGikoPopupPosition = (gppLeftTop = 0, gppTop, gppRightTop,
24 gppLeft, gppCenter, gppRight,
25 gppLeftBottom, gppBottom, gppRightBottom);
26 //???????ャ?若?泣?ゃ??/span>
27 TGikoPreviewSize = (gpsXLarge, gpsLarge, gpsMedium, gpsSmall, gpsXSmall);
28 TGikoBrowserAutoMaximize = (gbmNone, gbmClick, gbmDoubleClick);
29 // ???????吟????????????紊у???????>散
30 /// ???壕;腓榊??蚊??10 ?? 65535 ????? n ???号?宴????
31 /// 絨?? 201-300 ??????????蚊?????????????醇?с?????????篏? 2 byte ???膣???
32 TGikoResRange = (grrAll, grrSelect, grrKoko, grrNew);
33
34 /// ?鴻??????筝?荀ц;腓榊???/span>
35 TGikoThreadRange = (gtrAll, gtrSelect, gtrLog, gtrNew, gtrLive, gtrArch);
36
37 //! ?鴻???????c???帥?若?≪???眼???冴??
38 TGikoSpamFilterAlgorithm = (
39 gsfaNone, gsfaPaulGraham, gsfaGaryRobinson, gsfaGaryRobinsonFisher);
40
41
42 /// ?????眼?????鴻?????????? ID
43 type TGikoBBSColumnID = (gbbscTitle);
44 /// ?????眼?????鴻????????????
45 const GikoBBSColumnCaption : array[0..0] of string =
46 ( '?????眼????' );
47 /// ?????眼?????鴻????????????
48 type TGikoBBSColumnList = class( TList )
49 private
50 function GetItem( index : integer ) : TGikoBBSColumnID;
51 procedure SetItem( index : integer; value : TGikoBBSColumnID);
52 public
53 constructor Create;
54 destructor Destroy; override;
55 function Add( value : TGikoBBSColumnID ) : Integer;
56 property Items[index : integer]: TGikoBBSColumnID read GetItem write SetItem; default;
57 end;
58 /// ?帥???鴻?????????? ID
59 type TGikoCategoryColumnID = (gccTitle, gccRoundName, gccLastModified);
60 /// ?帥???鴻????????????
61 const GikoCategoryColumnCaption : array[0..2] of string =
62 ( '?水??', '綏≦??篋?膣?', '??緇??ユ??' );
63 /// ?帥???鴻????????????
64 type TGikoCategoryColumnList = class( TList )
65 private
66 function GetItem( index : integer ) : TGikoCategoryColumnID;
67 procedure SetItem( index : integer; value : TGikoCategoryColumnID);
68 public
69 constructor Create;
70 destructor Destroy; override;
71 function Add( value : TGikoCategoryColumnID ) : Integer;
72 property Items[index : integer]: TGikoCategoryColumnID read GetItem write SetItem; default;
73 end;
74 /// ?鴻?????鴻?????????? ID
75 type TGikoBoardColumnID = (gbcTitle, gbcAllCount, gbcLocalCount, gbcNonAcqCount,
76 gbcNewCount, gbcUnReadCount, gbcRoundName, gbcRoundDate, gbcCreated, gbcLastModified, gbcVigor );{gbcLastModified,}
77 /// ?鴻?????鴻????????????
78 const GikoBoardColumnCaption : array[0..10] of string =
79 ( '?鴻????????', '?????潟??', '??緇?', '????', '?亥??',
80 '???', '綏≦??篋?膣?', '??緇??ユ??', '?鴻??????ユ??', '??腟??贋?井?ユ??', '?≪??' );
81 const GikoBoardColumnAlignment : array[0..10] of TAlignment = (
82 taLeftJustify, taRightJustify, taRightJustify, taRightJustify,
83 taRightJustify, taRightJustify, taLeftJustify, taLeftJustify,
84 taLeftJustify, taLeftJustify, taRightJustify);
85 /// ?鴻?????鴻????????????
86 type TGikoBoardColumnList = class( TList )
87 private
88 function GetItem( index : integer ) : TGikoBoardColumnID;
89 procedure SetItem( index : integer; value : TGikoBoardColumnID);
90 public
91 constructor Create;
92 destructor Destroy; override;
93 function Add( value : TGikoBoardColumnID ) : Integer;
94 property Items[index : integer]: TGikoBoardColumnID read GetItem write SetItem; default;
95 end;
96
97 type
98 //CoolBar荐?????潟?若??
99 TCoolSet = record
100 FCoolID: Integer;
101 FCoolWidth: Integer;
102 FCoolBreak: Boolean;
103 end;
104
105 TSetting = class(TObject)
106 private
107 //??篆<???????<?泣?ゃ??/span>
108 FRecvBufferSize: Integer;
109 //HTTP1.1篏睡??/span>
110 FProtocol: Boolean;
111 //???????傑・膓?HTTP1.1篏睡??/span>
112 FProxyProtocol: Boolean;
113
114 //???????件?茯?昭???
115 FReadProxy: Boolean;
116 FReadProxyAddress: string;
117 FReadProxyPort: Integer;
118 FReadProxyUserID: string;
119 FReadProxyPassword: string;
120
121 //???????件??梧昭???
122 FWriteProxy: Boolean;
123 FWriteProxyAddress: string;
124 FWriteProxyPort: Integer;
125 FWriteProxyUserID: string;
126 FWriteProxyPassword: string;
127
128 //???c????????
129 FCabinetFontName: string;
130 FCabinetFontSize: Integer;
131 FCabinetFontBold: Boolean;
132 FCabinetFontItalic: Boolean;
133 FCabinetFontColor: TColor;
134 FCabinetBackColor: TColor;
135
136 //???鴻??
137 FListFontName: string;
138 FListFontSize: Integer;
139 FListFontBold: Boolean;
140 FListFontItalic: Boolean;
141 FListFontColor: TColor;
142 FListBackColor: TColor;
143
144 //????????/span>
145 FBrowserFontName: string; // ''...default
146 FBrowserFontSize: Integer; // 0...default
147 FBrowserFontBold: Integer; // 0...default, -1...False, 1...True
148 FBrowserFontItalic: Integer; // 筝???????
149 FBrowserFontColor: Integer; // -1...default
150 FBrowserBackColor: Integer; // 筝???????
151
152 //?????c??/span>
153 FEditorFontName: string;
154 FEditorFontSize: Integer;
155 FEditorFontBold: Boolean;
156 FEditorFontItalic: Boolean;
157 FEditorFontColor: TColor;
158 FEditorBackColor: TColor;
159
160 //?帥???????潟??
161 FBrowserTabFontName: string;
162 FBrowserTabFontSize: Integer;
163 FBrowserTabFontBold: Boolean;
164 FBrowserTabFontItalic: Boolean;
165
166 //???潟?????c?潟????/span>
167 FHintFontName: string;
168 FHintFontSize: Integer;
169 //FHintFontBold: Boolean;
170 //FHintFontItalic: Boolean;
171 FHintFontColor: TColor;
172 FHintBackColor: TColor;
173
174 //???c?潟?????泣?ゃ??/span>
175 FWindowTop: Integer;
176 FWindowLeft: Integer;
177 FWindowHeight: Integer;
178 FWindowWidth: Integer;
179 FWindowMax: Boolean;
180 //???鴻?????ャ?若?鴻?帥?ゃ??/span>
181 FListStyle: TViewStyle;
182
183 //???若?????取;腓?/span>
184 FStdToolBarVisible: Boolean;
185 FAddressBarVisible: Boolean;
186 FLinkBarVisible: Boolean;
187 FListToolBarVisible: Boolean;
188 FListNameBarVisible: Boolean;
189 FBrowserToolBarVisible: Boolean;
190 FBrowserNameBarVisible: Boolean;
191
192 //???????吟?帥??
193 FBrowserTabVisible: Boolean;
194 FBrowserTabPosition: TGikoTabPosition;
195 FBrowserTabAppend: TGikoTabAppend;
196 FBrowserTabStyle: TGikoTabStyle;
197
198 //?<???祉?若?吾????/span>
199 FMessageBarVisible: Boolean;
200 FMessegeBarHeight: Integer;
201
202 //?鴻???若?帥?鴻????/span>
203 FStatusBarVisible: Boolean;
204
205 //???c????????????祉?泣?ゃ??/span>
206 FCabinetVisible: Boolean;
207 FCabinetWidth: Integer;
208
209 //???鴻???祉???????吟?泣?ゃ??/span>
210 FListOrientation: TGikoListOrientation;
211 FListHeight: Integer;
212 FListHeightState: TGikoListState;
213 FListWidth: Integer;
214 FListWidthState: TGikoListState;
215 // FListHeightMax: Boolean;
216 // FListWidthMax: Boolean;
217
218 //??篆∞???????祉?<?若??/span>
219 FNameList: TStringList;
220 FMailList: TStringList;
221
222 //?????c?帥?若???c?潟?????泣?ゃ??/span>
223 FEditWindowTop: Integer;
224 FEditWindowLeft: Integer;
225 FEditWindowHeight: Integer;
226 FEditWindowWidth: Integer;
227 FEditWindowMax: Boolean;
228 FEditWindowStay: Boolean;
229 FEditWindowTranslucent: Boolean;
230
231 //???鴻????埈;腓?/span>
232 FListViewNo: Boolean;
233 //CSS茵?ず
234 FUseCSS: Boolean;
235 // ?鴻???活;腓?筝???????????? ini ???絖???????????)
236 FUseSkin: Boolean;
237 //???<????????????kin????????????
238 FUseKatjushaType : Boolean;
239 //mail罨?茵?ず
240 FShowMail: Boolean;
241 /// ???壕;腓榊???/span>
242 FResRange : Longint;
243 /// 莎桁???????壕;腓榊??蚊???阪?
244 FResRangeHold : Boolean;
245 /// ?鴻??????筝?荀ц;腓榊???/span>
246 FThreadRange : TGikoThreadRange;
247 //???≪?????c???????鴻???????≪????茵?ず
248 FUnActivePopup: Boolean;
249 //???鴻???????≪???????????若???若????
250 FResPopupHeaderBold: Boolean;
251
252 //???違????????
253 FLogFolder: string;
254 FLogFolderP: string; //???劫???????劫?阪????荐??激?х???c????????
255 FNewLogFolder: string;
256
257 //???鴻???????????????若?泣?ゃ??/span>
258 FBBSColumnWidth: array[0..0] of Integer;
259 FCategoryColumnWidth: array[0..2] of Integer;
260 FBoardColumnWidth: array[0..10] of Integer;
261
262 /// ?????眼?????鴻??????????綺?span>
263 FBBSColumnOrder : TGikoBBSColumnList;
264 /// ?帥???鴻??????????綺?span>
265 FCategoryColumnOrder : TGikoCategoryColumnList;
266 /// ?鴻?????鴻??????????綺?span>
267 FBoardColumnOrder : TGikoBoardColumnList;
268
269 //?純?若????
270 FBBSSortIndex: Integer;
271 FBBSSortOrder: Boolean;
272 FCategorySortIndex: Integer;
273 FCategorySortOrder: Boolean;
274 FBoardSortIndex: Integer;
275 FBoardSortOrder: Boolean;
276
277 //Dat?純?<?鴻???純?若????
278 FDatOchiSortIndex: Integer;
279 FDatOchiSortOrder: Boolean;
280
281 //腟?莨若?炊??絖???
282 FSelectTextList: TStringList;
283
284 //?推?荀?RL
285 //FBoardURL2ch: string;
286 FBoardURLs: TStringList;
287 FBoardURLSelected: Integer;
288
289 //???若??D?祉???鴻???若??
290 FUserID: string;
291 FPassword: string;
292 FAutoLogin: Boolean;
293 FForcedLogin: Boolean;
294 FDolibURL: string;
295
296 //URL??????????莎桁???≪????/span>
297 FURLApp: Boolean;
298 FURLAppFile: string;
299
300 //mailto????????????篏?
301 FOpenMailer: Boolean;
302
303 //???ょ∈茯?
304 FDeleteMsg: Boolean;
305
306 //CoolBar鐚??<?ゃ?潟?紙?帥?祉???????駈?
307 FMainCoolBar: array[0..MAIN_COOLBAND_COUNT - 1] of TCoolSet;
308 FListCoolBar: array[0..LIST_COOLBAND_COUNT - 1] of TCoolSet;
309 FBrowserCoolBar: array[0..BROWSER_COOLBAND_COUNT - 1] of TCoolSet;
310
311 //ToolBar Wrapable
312 FListToolBarWrapable: Boolean;
313 FBrowserToolBarWrapable: Boolean;
314
315 //???????≪????篏?臀?/span>
316 FPopupPosition: TGikoPopupPosition;
317
318 //?≪?????鴻????/span>
319 FURLDisplay: Boolean;
320 FAddressBarTabStop: Boolean;
321 FLinkAddAddressBar: Boolean;
322 FAddressHistoryCount: Integer;
323
324 //?糸????????ャ??/span>
325 FPreviewVisible: Boolean;
326 FPreviewSize: TGikoPreviewSize;
327 FPreviewWait: Integer;
328
329 // ????????/span>
330 FBrowserAutoMaximize: TGikoBrowserAutoMaximize;
331
332 //?鴻??????筝?荀ф?贋?違?≪?ゃ?潟?活;腓?/span>
333 FListIconVisible: Boolean;
334
335 //?鴻??????筝?荀с??og???????鴻?????????帥?鴻??????ャ??茵?ず??????
336 FCreationTimeLogs: Boolean;
337 //?鴻??????筝?荀с???鴻???????ャ?ф???ャ???鴻?????????ャ??茵?ず??????
338 FFutureThread: Boolean;
339
340 //?吾??莨若?炊?????激?恰????篏睡??┃絎?
341 FUseMachineTime: Boolean;
342 FTimeAdjustSec: Integer;
343 FTimeAdjust: Boolean;
344
345 //???若????
346 FAbonDeleterlo : Boolean; //&rlo;????????
347 FAbonReplaceul : Boolean; //<ul>?帥?違??<br>?帥?違??舟????????
348 FPopUpAbon : Boolean; //???鴻???????≪???????????若????????/span>
349 FShowNGLinesNum : Boolean; //荅峨?????鐚?磁???若?????<?ゃ??????違??茵?ず
350 FAddResAnchor : Boolean; //NG???鴻?吾?????鴻?≪?潟???若??菴遵??????
351 FDeleteSyria : Boolean; //?激???∵??????????膈?
352 FIgnoreKana : Boolean; //????茹??蚊???????????????∴???????
353
354 // ?鴻??????腟?莨若???c?若???????
355 FSelectComboBoxWidth : Integer;
356
357 // ??緇????御?????????????激?с?潟???ゃ?≪???違???帥??
358 FOptionDialogTabIndex: Integer;
359
360 // ??緇????御???????????c????????
361 FCabinetIndex: Integer;
362
363 //腟?篋?????∈茯????ゃ?≪???違??茵?ず??????
364 FShowDialogForEnd : Boolean;
365 //???????帥????????????????∈茯????ゃ?≪???違??茵?ず????
366 FShowDialogForAllTabClose: Boolean;
367 //??緇????号?違???鴻???????????号?違???違???c??????????絽梧?????蚊?????c???蚊???????蚊??篏睡????????
368 FUseOddColorOddResNum: Boolean;
369 FOddColor: TColor;
370 //???号?医?羝?綣決????????御???≪?ゃ???????????若???鴻???<????????お絖?????????
371 FUnFocusedBold : Boolean;
372
373 //Samba24絲丞?罘??純??篏帥????
374 FUseSamba: Boolean;
375
376 //???鴻?≪?潟???若???????????????吾?c?潟????????
377 FResAnchorJamp: Boolean;
378
379 //Tab????篆?絖?
380 FTabAutoLoadSave : Boolean;
381 //??緇??????????????鴻????????RL
382 FLastCloseTabURL: String;
383 //???<????茯?罅????泣???若??罘???/span>
384 F2chSupport : Boolean;
385
386 // ?????c??/span>
387 FSpaceToNBSP : Boolean; ///< ??茹??鴻???若?鴻??Tab ?? &nbsp; ??舟??
388 FAmpToCharRef : Boolean; ///< '&' ?? &amp; ??舟??
389
390 //???????吟?帥????茵?ず???????鴻???荀с?с?????若?純?????主Щ?????≦??????
391 FSelectInterval : Integer;
392
393 //KuroutSettingTab 荅括完荐???帥????ctiveTab
394 FKuroutSettingTabIndex: Integer;
395
396 //! ?????鴻?吾?с?鴻???c??/span>
397 FGestures : TGestureModel;
398 //! ?????鴻?吾?с?鴻???c?若??篏睡??????????????
399 FGestureEnabled : Boolean;
400 //! ?????鴻?吾?с?鴻???c?若???潟?潟?????鴻??膈?????х?≦??/span>
401 FGestureIgnoreContext : Boolean;
402 //???激?≪??????????荐??
403 FLocalTrapAtt : Boolean;
404 FRemoteTrapAtt : Boolean;
405 FReadTimeOut: Integer;
406
407 //! 篏睡???????鴻???????c???帥??/span>
408 FSpamFilterAlgorithm : TGikoSpamFilterAlgorithm;
409 //???ャ?若??????????
410 FMute: Boolean;
411 //?鴻???莨若?帥?ф??∈絎???絖??????鴻????????
412 FUseUndecided: Boolean;
413
414 //Be2ch
415 //茯?荐主?????若??D?祉???鴻???若??
416 FBeUserID: String;
417 FBeCode: String;
418 FBeAutoLogin: Boolean;
419 FBeLogin: Boolean;
420 //絮ユ?????紊т?絖?篁倶??/span>
421 FMaxRecordCount : Integer;
422
423 //?鴻??????筝?荀с???????潟???若??緇????純?若????????
424 FAutoSortThreadList : Boolean;
425
426 //InputAssist?????若?????臀?/span>
427 FInputAssistFormLeft :Integer;
428 FInputAssistFormTop :Integer;
429 //InputAssist?????若?????泣?ゃ??/span>
430 FInputAssistFormWidth: Integer;
431 FInputAssistFormHeight: Integer;
432
433 //! Cookie??????????阪??潟?若??
434 FFixedCookie: String;
435 //! ???潟??Щ??絮ユ????????/span>
436 FMoveHistorySize : Integer;
437 //! ??絨?????????????帥?鴻???????ゃ???主???????
438 FStoredTaskTray : Boolean;
439 //! ?帥????Щ???с???若????荐怨?????
440 FLoopBrowserTabs : Boolean;
441 //! 100???壕;腓冴??????;腓冴???号??/span>
442 FHeadResCount : Integer;
443 //! ?∫?c???若???若??菴遵????????/span>
444 FAddKeywordLink: Boolean;
445 //! dat臀???????鴻??????
446 FReplaceDat: Boolean;
447 //! sent.ini???<?ゃ?????泣?ゃ?削???篏?MB鐚?
448 FSentIniFileSize: Integer;
449 //! ???潟??RL??緇????莟≧?≦宍絖?
450 FExtList: String;
451 //! Skin?∫??/span>
452 FSkinFiles: TSkinFiles;
453 //! index???<?ゃ????茯??炊????at??罎?膣≪????
454 FCheckDatFile: Boolean;
455 //! ??ID???鴻?≪?潟???取;腓?/span>
456 FLimitResCountMessage: Boolean;
457 function GetMainCoolSet(Index: Integer): TCoolSet;
458 function GetBoardCoolSet(Index: Integer): TCoolSet;
459 function GetBrowserCoolSet(Index: Integer): TCoolSet;
460 procedure SetMainCoolSet(Index: Integer; CoolSet: TCoolSet);
461 procedure SetBoardCoolSet(Index: Integer; CoolSet: TCoolSet);
462 procedure SetBrowserCoolSet(Index: Integer; CoolSet: TCoolSet);
463
464 function GetBBSColumnWidth(index: Integer): Integer;
465 function GetCategoryColumnWidth(index: Integer): Integer;
466 function GetBoardColumnWidth(index: Integer): Integer;
467 procedure SetBBSColumnWidth(index: Integer; value: Integer);
468 procedure SetCategoryColumnWidth(index: Integer; value: Integer);
469 procedure SetBoardColumnWidth(index: Integer; value: Integer);
470
471 function GetSoundName(Index: Integer): string;
472 function GetSoundViewName(Index: Integer): string;
473 function GetSoundFileName(Index: Integer): string;
474 procedure SetSoundFileName(Index: Integer; value: string);
475 function Encrypt(s: string): string;
476 function Decrypt(s: string): string;
477
478 procedure MakeURLIniFile();
479
480 procedure SetUseCSS( value: Boolean );
481 procedure SetCSSFileName( fileName: string );
482 function GetCSSFileName: string;
483 //! ???????決┃絎?茯??粋昭??/span>
484 procedure ReadProxySettings(memIni: TMemIniFile);
485 //! ??腮????c?潟????┃絎?茯??粋昭??/span>
486 procedure ReadWindowSettings(memIni: TMemIniFile);
487 //! ?ュ??絮ユ?茯??粋昭?随?罎?膣???<?若???鐚?????鐚?
488 procedure ReadInputHisotrys(memIni: TMemIniFile);
489 //! ???鴻????????綛?茯??粋昭??/span>
490 procedure ReadListColumnWidth(memIni: TMemIniFile);
491 //! ?????眼?????鴻??????????綺顄??粋昭??/span>
492 procedure ReadOrdColumn(memIni: TMemIniFile);
493 protected
494
495 public
496 constructor Create;
497 destructor Destroy; override;
498 function GetFileName: string;
499 function GetBoardURLFileName: string;
500 procedure ReadSettingFile;
501 procedure ReadBoardURLsFile;
502 procedure WriteSystemSettingFile;
503 procedure WriteWindowSettingFile;
504 procedure WriteNameMailSettingFile;
505 procedure WriteFolderSettingFile();
506 procedure WriteBoardURLSettingFile;
507 function GetSoundCount: Integer;
508 function FindSoundFileName(Name: string): string;
509
510 function GetBoardFileName: string;
511 function GetCustomBoardFileName: string;
512 function GetBoardDir: string;
513 function GetHtmlTempFileName: string;
514 function GetAppDir: string;
515 function GetTempFolder: string;
516 function GetSentFileName: string;
517 function GetConfigDir: string;
518 function GetSkinDir: 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 GetCSSFileName 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 //?帥????奨????????/span>
762 property LastCloseTabURL: String read FLastCloseTabURL write FLastCloseTabURL;
763 //property Gengo: TStringList read F2chLanguage write F2chLanguage;
764 property GengoSupport : Boolean read F2chSupport write F2chSupport;
765 property KuroutSettingTabIndex: Integer read FKuroutSettingTabIndex write FKuroutSettingTabIndex;
766 //! ?????鴻?吾?с?鴻???c??/span>
767 property Gestures : TGestureModel read FGestures write FGestures;
768 //! ?????鴻?吾?с?鴻???c?若??篏睡??????????????
769 property GestureEnabled : Boolean read FGestureEnabled write FGestureEnabled;
770 property GestureIgnoreContext : Boolean read FGestureIgnoreContext write FGestureIgnoreContext;
771 //???激?≪??????????荐??
772 property LocalTrapAtt : Boolean read FLocalTrapAtt write FLocalTrapAtt;
773 property RemoteTrapAtt : Boolean read FRemoteTrapAtt write FRemoteTrapAtt;
774 property ReadTimeOut: Integer read FReadTimeOut write FReadTimeOut;
775 //! 篏睡???????鴻???????c????/span>
776 property SpamFilterAlgorithm : TGikoSpamFilterAlgorithm
777 read FSpamFilterAlgorithm write FSpamFilterAlgorithm;
778 property Mute: Boolean read FMute write FMute;
779 property UseUndecided: Boolean read FUseUndecided write FUseUndecided;
780
781 property BeUserID: string read FBeUserID write FBeUserID;
782 property BeCode: string read FBeCode write FBeCode;
783 property BeAutoLogin: Boolean read FBeAutoLogin write FBeAutoLogin;
784 property BeLogin: Boolean read FBeLogin write FBeLogin;
785 property MaxRecordCount : Integer read FMaxRecordCount write FMaxRecordCount;
786 //! ?鴻??????筝?荀с?????潟???若??緇????鴻?????????ф?????純?若????????
787 property AutoSortThreadList : Boolean read FAutoSortThreadList write FAutoSortThreadList;
788 //! InputAssist?????若?????臀?/span>
789 property InputAssistFormLeft :Integer read FInputAssistFormLeft write FInputAssistFormLeft;
790 property InputAssistFormTop :Integer read FInputAssistFormTop write FInputAssistFormTop;
791 //! InputAssist?????若?????泣?ゃ??/span>
792 property InputAssistFormWidth: Integer read FInputAssistFormWidth write FInputAssistFormWidth;
793 property InputAssistFormHeight: Integer read FInputAssistFormHeight write FInputAssistFormHeight;
794 //! Cookie??????????阪??潟?若??
795 property FixedCookie: String read FFixedCookie write FFixedCookie;
796 //! ???潟??Щ??絮ユ????????/span>
797 property MoveHistorySize : Integer read FMoveHistorySize write SetMoveHistorySize;
798 //! ??絨???????帥?鴻???????ゃ???主???????
799 property StoredTaskTray : Boolean read FStoredTaskTray write FStoredTaskTray;
800 //! ???????吟?帥???????若????荐怨?????
801 property LoopBrowserTabs : Boolean read FLoopBrowserTabs write FLoopBrowserTabs;
802 //! 100???壕;腓冴??????;腓冴???号??/span>
803 property HeadResCount : Integer read FHeadResCount write FHeadResCount;
804 //! ?∫?c???若???若??菴遵????????/span>
805 property AddKeywordLink: Boolean read FAddKeywordLink write FAddKeywordLink;
806 //! dat??舟???????鴻????????
807 property ReplaceDat: Boolean read FReplaceDat write FReplaceDat;
808 //! sent.ini???<?ゃ?????泣?ゃ?削???篏?MB鐚?
809 property SentIniFileSize: Integer read FSentIniFileSize write FSentIniFileSize;
810 //! ???潟??RL??緇????莟≧?≦宍絖?
811 property ExtList: String read FExtList write FExtList;
812 //! Skin???<?ゃ?????
813 property SkinFiles: TSkinFiles read FSkinFiles;
814 //! ?ゃ?潟???????壕??粋昭?炊??dat???<?ゃ?????с????/span>
815 property CheckDatFile: Boolean read FCheckDatFile write FCheckDatFile;
816 property LimitResCountMessage: Boolean read FLimitResCountMessage write FLimitResCountMessage;
817 end;
818
819
820 const
821 // MAIN_COOLBAND_COUNT = 4; //?<?ゃ??oolBand????/span>
822 // LIST_COOLBAND_COUNT = 2; //??oolBand????/span>
823 // BROWSER_COOLBAND_COUNT = 3; //????????oolBand????/span>
824
825 BOARD_FILE_NAME = 'board.2ch';
826 CUSTOMBOARD_FILE_NAME = 'custom.2ch';
827 BOARD_DIR_NAME = 'Board';
828 KEY_SETTING_FILE_NAME = 'key.ini';
829 EKEY_SETTING_FILE_NAME = 'Ekey.ini';
830 TEMP_FOLDER = 'Temp';
831 OUTBOX_FILE_NAME = 'outbox.ini';
832 SENT_FILE_NAME = 'sent.ini';
833 CONFIG_DIR_NAME = 'config';
834 CSS_DIR_NAME = 'css';
835 SKIN_DIR_NAME = 'skin';
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 FSkinFiles := TSkinFiles.Create;
970 FNameList.Duplicates := dupIgnore;
971 FMailList.Duplicates := dupIgnore;
972 FBoardURLs.Duplicates := dupIgnore;
973 FSelectTextList.Duplicates := dupIgnore;
974 ReadSettingFile();
975 ReadBoardURLsFile();
976 end;
977
978 //???鴻????????/span>
979 destructor TSetting.Destroy();
980 begin
981 inherited;
982 FBoardColumnOrder.Free;
983 FCategoryColumnOrder.Free;
984 FBBSColumnOrder.Free;
985 FSelectTextList.Free;
986 FBoardURLs.Free;
987 FMailList.Free;
988 FNameList.Free;
989 FGestures.Free;
990 end;
991
992 //?????????<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
993 function TSetting.GetFileName(): string;
994 begin
995 Result := GetAppDir + INI_FILE_NAME;
996 end;
997
998 //?炊?贋?亥??RL荐?????<?ゃ????鐚????刻????<?ゃ????鐚?
999 function TSetting.GetBoardURLFileName(): string;
1000 begin
1001 Result := GetAppDir + BOARD_URL_INI_FILE_NAME;
1002 end;
1003
1004 //荐?????<?ゃ???莨?/span>
1005 procedure TSetting.ReadSettingFile();
1006 var
1007 ini: TMemIniFile;
1008 i: Integer;
1009 Exists: Boolean;
1010 s: string;
1011 CoolSet: TCoolSet;
1012 msg: String;
1013 begin
1014 Exists := FileExists(GetFileName);
1015 ini := TMemIniFile.Create(GetFileName);
1016 try
1017 //??篆<???????<?泣?ゃ??/span>
1018 FRecvBufferSize := ini.ReadInteger('HTTP', 'RecvBufferSize', 4096);
1019 //HTTP1.1篏睡??/span>
1020 FProtocol := ini.ReadBool('HTTP', 'Protocol', True);
1021 //???????傑・膓?HTTP1.1篏睡??/span>
1022 FProxyProtocol := ini.ReadBool('HTTP', 'ProxyProtocol', False);
1023
1024 // ???????決┃絎?茯??粋昭??/span>
1025 ReadProxySettings( ini );
1026
1027 // ??腮????c?潟??????┃絎?茯??粋昭??/span>
1028 ReadWindowSettings( ini );
1029
1030 FWindowTop := ini.ReadInteger('WindowSize', 'Top', -1);
1031 FWindowLeft := ini.ReadInteger('WindowSize', 'Left', -1);
1032 FWindowHeight := ini.ReadInteger('WindowSize', 'Height', -1);
1033 FWindowWidth := ini.ReadInteger('WindowSize', 'Width', -1);
1034 FWindowMax := ini.ReadBool('WindowSize', 'Max', false);
1035
1036 if FWindowHeight <= 0 then FWindowHeight := 400;
1037 if FWindowWidth <= 0 then FWindowWidth := 600;
1038
1039 FListStyle := TViewStyle(ini.ReadInteger('ViewStyle', 'ListView', Ord(vsReport)));
1040
1041 FEditWindowTop := ini.ReadInteger('EditorWindowSize', 'Top', -1);
1042 FEditWindowLeft := ini.ReadInteger('EditorWindowSize', 'Left', -1);
1043 FEditWindowHeight := ini.ReadInteger('EditorWindowSize', 'Height', -1);
1044 FEditWindowWidth := ini.ReadInteger('EditorWindowSize', 'Width', -1);
1045 FEditWindowMax := ini.ReadBool('EditorWindowSize', 'Max', False);
1046 FEditWindowStay := ini.ReadBool('EditorWindowSize', 'Stay', False);
1047 FEditWindowTranslucent := ini.ReadBool('EditorWindowSize', 'Translucent', False);
1048
1049 FOptionDialogTabIndex := ini.ReadInteger('OptionDialog', 'TabIndex', 0);
1050
1051 //???若??????/span>
1052 FStdToolBarVisible := ini.ReadBool('ToolBar', 'StdVisible', True);
1053 FAddressBarVisible := ini.ReadBool('ToolBar', 'AddressVisible', True);
1054 FLinkBarVisible := ini.ReadBool('ToolBar', 'LinkVisible', True);
1055 FListToolBarVisible := ini.ReadBool('ToolBar', 'ListVisible', True);
1056 FListNameBarVisible := ini.ReadBool('ToolBar', 'ListNameVisible', True);
1057 FBrowserToolBarVisible := ini.ReadBool('ToolBar', 'BrowserVisible', True);
1058 FBrowserNameBarVisible := ini.ReadBool('ToolBar', 'BrowserNameVisible', True);
1059 //???若??????rapable
1060 FListToolBarWrapable := ini.ReadBool('ToolBar', 'ListWrapable', False);
1061 FBrowserToolBarWrapable := ini.ReadBool('ToolBar', 'BrowserWrapable', False);
1062
1063 FBrowserTabVisible := ini.ReadBool('Tab', 'BrowserTabVisible', True);
1064 FBrowserTabPosition := TGikoTabPosition(ini.ReadInteger('Tab', 'BrowserTabPosition', Ord(gtpTop)));
1065 FBrowserTabAppend := TGikoTabAppend(ini.ReadInteger('Tab', 'BrowserTabAppend', Ord(gtaFirst)));
1066 FBrowserTabStyle := TGikoTabStyle(ini.ReadInteger('Tab', 'BrowserTabStyle', Ord(gtsFlat)));
1067
1068 FMessageBarVisible := ini.ReadBool('MessageBar', 'Visible', True);
1069 FMessegeBarHeight := ini.ReadInteger('MessageBar', 'Height', 30);
1070
1071 FStatusBarVisible := ini.ReadBool('StatusBar', 'Visible', True);
1072
1073 FCabinetVisible := ini.ReadBool('Cabinet', 'Visible', True);
1074 FCabinetWidth := ini.ReadInteger('Cabinet', 'Width', 200);
1075 FCabinetIndex := ini.ReadInteger('Cabinet', 'Index', 0);
1076
1077 FListOrientation := TGikoListOrientation(ini.ReadInteger('List', 'Orientation', Ord(gloHorizontal)));
1078 FListHeight := ini.ReadInteger('List', 'Height', 180);
1079 FListHeightState := TGikoListState(ini.ReadInteger('List', 'HeightState', Ord(glsNormal)));
1080 FListWidth := ini.ReadInteger('List', 'Width', 180);
1081 FListWidthState := TGikoListState(ini.ReadInteger('List', 'WidthState', Ord(glsNormal)));
1082 // FListHeightMax := ini.ReadBool('List', 'HeightMax', False);
1083 // FListWidthMax := ini.ReadBool('List', 'WidthMax', False);
1084
1085 // ?ュ????????吋罩眼??茯??粋昭??
1086 ReadInputHisotrys( ini );
1087
1088 // ???鴻????????綛?
1089 ReadListColumnWidth( ini );
1090
1091 // ?????眼?????鴻??????????綺?span>
1092 ReadOrdColumn( ini );
1093
1094 //???鴻?????/span>
1095 FListViewNo := ini.ReadBool('Function', 'ListViewNo', True);
1096 //CSS
1097 UseCSS := ini.ReadBool('CSS', 'UseCSS', True);
1098 //CSS???<?ゃ????
1099 CSSFileName := ini.ReadString('CSS', 'FileName', 'default.css');
1100 //???????????????鴻???潟??篏帥????
1101 FUseKatjushaType := ini.ReadBool('CSS', 'UseKatjushaType', false);
1102
1103 //Mail罨?茵?ず
1104 FShowMail := ini.ReadBool('Thread', 'ShowMail', True);
1105 // ???壕;腓榊???/span>
1106 if ini.ReadBool('Thread', 'OnlyAHundredRes',false) then
1107 FResRange := 100 // ?ゃ??荐?????????/span>
1108 else
1109 FResRange := ini.ReadInteger( 'Thread', 'ResRange', Ord( grrAll ) );
1110 FResRangeHold := ini.ReadBool( 'Thread', 'ResRangeHold', False );
1111 FHeadResCount := ini.ReadInteger('Thread', 'HeadResCount', 1);
1112 // ?鴻??????筝?荀ц;腓榊???/span>
1113 FThreadRange := TGikoThreadRange( ini.ReadInteger('ThreadList', 'ThreadRange', Ord( gtrAll )) );
1114 //???≪?????c???????鴻???????≪????茵?ず
1115 FUnActivePopup := ini.ReadBool('Thread', 'UnActivePopup', False);
1116 //???鴻???????≪???????????若???若????
1117 FResPopupHeaderBold := ini.ReadBool('Thread', 'ResPopupHeaderBold', True);
1118 //???ょ∈茯?
1119 FDeleteMsg := ini.ReadBool('Function', 'LogDeleteMessage', True);
1120 //腟?篋?腆肴?
1121 FShowDialogForEnd := ini.ReadBool('Function','ShowDialogForEnd',false);
1122 //AllTabClose
1123 FShowDialogForAllTabClose := ini.ReadBool('Function','ShowDialogForAllTabClose',false);
1124 //Samba
1125 FUseSamba := ini.ReadBool('Function','UseSamba', True);
1126 //ResAnchorjamp
1127 ResAnchorJamp := ini.ReadBool('Function', 'ResAnchoJamp', True);
1128 //???違????????
1129 LogFolder := ini.ReadString('Folder', 'LogFolder', GetAppDir + 'Log');
1130 NewLogFolder := '';
1131
1132 //??RL
1133 //茲??亥?脂?蚊?с??????????????BoardURLs????????2003/10/05
1134 //FBoardURL2ch := ini.ReadString('BoardURL', '2ch', DEFAULT_2CH_BOARD_URL);
1135
1136 //茯?荐主?????若??D?祉???鴻???若??
1137 FUserID := ini.ReadString('Attestation', 'UserID', '');
1138 FPassword := Decrypt(ini.ReadString('Attestation', 'Password', ''));
1139 FAutoLogin := ini.ReadBool('Attestation', 'AutoLogin', False);
1140 FForcedLogin := ini.ReadBool('Attestation', 'FForcedLogin', False);
1141 // FDolibURL := ini.ReadString('Attestation', 'FDolibURL', DOLIB_LOGIN_URL);
1142
1143 //URL??????????莎桁???≪????/span>
1144 FURLApp := ini.ReadBool('URLApp', 'Select', False);
1145 FURLAppFile := ini.ReadString('URLApp', 'File', '');
1146
1147 //mailto????????????篏?
1148 FOpenMailer := ini.ReadBool('Mailto', 'Open', True);
1149
1150 //???????≪????篏?臀?/span>
1151 FPopupPosition := TGikoPopupPosition(ini.ReadInteger('Browser', 'PopupPosition', Ord(gppRightTop)));
1152 // ????6篁ュ?????????≪???????若??絲丞?
1153 if (FPopupPosition = gppCenter) then begin
1154 FPopupPosition := gppTop;
1155 end;
1156 //?≪?????鴻????/span>
1157 FURLDisplay := ini.ReadBool('AddressBar', 'URLDisplay', False);
1158 FAddressBarTabStop := ini.ReadBool('AddressBar', 'TabStop', True);
1159 FLinkAddAddressBar := ini.ReadBool('AddressBar', 'LinkAdd', False);
1160 FAddressHistoryCount := ini.ReadInteger('AddressBar', 'HistoryCount', 100);
1161
1162 //?糸????????ャ??/span>
1163 FPreviewVisible := ini.ReadBool('Browser', 'PreviewVisible', True);
1164 FPreviewSize := TGikoPreviewSize(ini.ReadInteger('Browser', 'PreviewSize', Ord(gpsMedium)));
1165 FPreviewWait := ini.ReadInteger('Browser', 'PreviewWait', 500);
1166
1167 // ????????/span>
1168 FBrowserAutoMaximize := TGikoBrowserAutoMaximize(
1169 ini.ReadInteger('Window', 'BrowserAutoMaximize', Ord(gbmDoubleClick)) );
1170
1171 //?鴻??????筝?荀ф?贋?違?≪?ゃ?潟??/span>
1172 FListIconVisible := ini.ReadBool('ThreadList', 'StateIconVisible', True);
1173 FCreationTimeLogs := ini.ReadBool('ThreadList', 'CreationTimeLogs', True);
1174 FFutureThread := ini.ReadBool('ThreadList', 'FutureThread', True);
1175 FSelectInterval := ini.ReadInteger('ThreadList', 'SelectInterval', 110);
1176 //?純?若????
1177 FBBSSortIndex := ini.ReadInteger('ThreadList', 'BBSSortIndex', 0);
1178 FBBSSortOrder := ini.ReadBool('ThreadList', 'BBSSortOrder', True);
1179 FCategorySortIndex := ini.ReadInteger('ThreadList', 'CategorySortIndex', 0);
1180 FCategorySortOrder := ini.ReadBool('ThreadList', 'CategorySortOrder', True);
1181 FBoardSortIndex := ini.ReadInteger('ThreadList', 'BoardSortIndex', 0);
1182 FBoardSortOrder := ini.ReadBool('ThreadList', 'BoardSortOrder', True);
1183 // DL緇????????純?若??
1184 FAutoSortThreadList := ini.ReadBool('ThreadList', 'AutoSort', False);
1185 //Dat?純?<?鴻???純?若????
1186 FDatOchiSortIndex := ini.ReadInteger('ThreadList', 'DatOchiSortIndex', -1);
1187 FDatOchiSortOrder := ini.ReadBool('ThreadList', 'DatOchiSortOrder', False);
1188
1189 //?吾??莨若?炊?????激?恰???私戎??┃絎?
1190 FUseMachineTime := ini.ReadBool('PostTime', 'UseMachineTime', False);
1191 FTimeAdjustSec := ini.ReadInteger('PostTime', 'TimeAdjustSec', 0);
1192 FTimeAdjust := ini.ReadBool('PostTime', 'TimeAdjust', True);
1193
1194 //?泣???潟??
1195 if Exists then begin
1196 for i := 0 to GetSoundCount - 1 do begin
1197 SoundFileName[i] := ini.ReadString('Sound', SoundName[i], '');
1198 if not FileExists(SoundFileName[i]) then
1199 SoundFileName[i] := '';
1200 end;
1201 end else begin
1202 s := GetAppDir + '\sound\';
1203 SoundFileName[0] := s + '??緇?????.wav';
1204 SoundFileName[1] := s + '??緇?????(綏???).wav';
1205 SoundFileName[2] := s + '???贋??wav';
1206 SoundFileName[3] := '';
1207 SoundFileName[4] := s + '??????wav';
1208 end;
1209
1210 //???若??????/span>
1211 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1212 CoolSet.FCoolID := ini.ReadInteger('MainCoolBar', 'ID' + IntToStr(i), -1);
1213 CoolSet.FCoolWidth := ini.ReadInteger('MainCoolBar', 'Width' + IntToStr(i), -1);
1214 CoolSet.FCoolBreak := ini.ReadBool('MainCoolBar', 'Break' + IntToStr(i), False);
1215 MainCoolSet[i] := CoolSet;
1216 end;
1217 FSelectComboBoxWidth := ini.ReadInteger( 'ListCoolBar', 'SelectWidth', 127 );
1218 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1219 CoolSet.FCoolID := ini.ReadInteger('ListCoolBar', 'ID' + IntToStr(i), -1);
1220 CoolSet.FCoolWidth := ini.ReadInteger('ListCoolBar', 'Width' + IntToStr(i), -1);
1221 CoolSet.FCoolBreak := ini.ReadBool('ListCoolBar', 'Break' + IntToStr(i), False);
1222 ListCoolSet[i] := CoolSet;
1223 end;
1224 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1225 CoolSet.FCoolID := ini.ReadInteger('BrowserCoolBar', 'ID' + IntToStr(i), -1);
1226 CoolSet.FCoolWidth := ini.ReadInteger('BrowserCoolBar', 'Width' + IntToStr(i), -1);
1227 CoolSet.FCoolBreak := ini.ReadBool('BrowserCoolBar', 'Break' + IntToStr(i), False);
1228 BrowserCoolSet[i] := CoolSet;
1229 end;
1230
1231 //???若????
1232 FAbonDeleterlo := ini.ReadBool('Abon','Deleterlo',false);
1233 FAbonReplaceul := ini.ReadBool('Abon','Replaceul',false);
1234 FPopUpAbon := ini.ReadBool('Abon','Popup',false);
1235 FShowNGLinesNum := ini.ReadBool('Abon','ShowNGLines',false);
1236 FAddResAnchor := ini.ReadBool('Abon','AddResAnchor',false);
1237 FDeleteSyria := ini.ReadBool('Abon','DeleteSyria',false);
1238 FIgnoreKana := ini.ReadBool('Abon','IgnoreKana',false);
1239
1240 // ?????c??/span>
1241 FSpaceToNBSP := ini.ReadBool( 'Editor', 'SpaceToNBSP', False );
1242 FAmpToCharRef := ini.ReadBool( 'Editor', 'AmpToCharRef', False );
1243
1244 //Tab????篆?絖???茯??粋昭??/span>
1245 FTabAutoLoadSave := ini.ReadBool('TabAuto', 'TabAutoLoadSave', False);
1246 FLastCloseTabURL := ini.ReadString('Thread', 'LastCloseTabURL', '');
1247 FKuroutSettingTabIndex := ini.ReadInteger('OptionDialog', 'KuroutTabIndex' , 0);
1248
1249 // ?????鴻?吾?с?鴻???c??/span>
1250 FGestureEnabled := ini.ReadBool( 'Guesture', 'Enabled', False );
1251 FGestureIgnoreContext := ini.ReadBool( 'Guesture', 'IgnoreContext', False );
1252 //2ch荐?茯??泣??
1253 F2chSupport := ini.ReadBool('2chSupport', 'Support', False);
1254
1255 //FusianaTrap
1256 FLocalTrapAtt := ini.ReadBool('Trap', 'LocalTrap', False);
1257 FRemoteTrapAtt := ini.ReadBool('Trap', 'RemoteTrap', False);
1258 FReadTimeOut := ini.ReadInteger('HTTP', 'ReadTimeOut', 10000);
1259
1260 // 篏睡???????鴻???????c????/span>
1261 FSpamFilterAlgorithm := TGikoSpamFilterAlgorithm(
1262 ini.ReadInteger( 'Abon', 'SpamFilterAlgorithm', Ord( gsfaNone ) ) );
1263 FMute := ini.ReadBool('Function', 'Mute', false);
1264 FUseUndecided := ini.ReadBool('ThreadList', 'UseUndecided', False);
1265
1266 //Be2ch
1267 //茯?荐主?????若??D?肢?荐若?潟?若??
1268 FBeUserID := ini.ReadString('Be', 'UserID', '');
1269 FBeCode := Decrypt(ini.ReadString('Be', 'Code', ''));
1270 FBeAutoLogin := ini.ReadBool('Be', 'AutoLogin', False);
1271 //絮ユ?????紊т?絖?篁倶??/span>
1272 FMaxRecordCount := Max(ini.ReadInteger('Recode', 'Max', 100), 1);
1273
1274 // ?ュ???≪?激?鴻??
1275 FInputAssistFormTop := ini.ReadInteger('IAtWindowsSize', 'Top', 0);
1276 FInputAssistFormLeft := ini.ReadInteger('IAtWindowsSize', 'Left', 0);
1277 FInputAssistFormWidth := ini.ReadInteger('IAtWindowsSize', 'Width', 400);
1278 FInputAssistFormHeight := ini.ReadInteger('IAtWindowsSize', 'Height', 460);
1279
1280 // Cookie??????????阪??潟?若??
1281 FFixedCookie := ini.ReadString('Cookie', 'fixedString', FIXED_COOKIE);
1282
1283 // ???潟??Щ??絮ユ?????紊т?????/span>
1284 FMoveHistorySize := ini.ReadInteger('MoveHisotry', 'Max', 20);
1285
1286 FStoredTaskTray := ini.ReadBool('Function', 'StroedTaskTray', false);
1287 FLoopBrowserTabs := ini.ReadBool('Function', 'LoopBrowserTabs', false);
1288 FAddKeywordLink := ini.ReadBool('Thread', 'AddKeywordLink', false);
1289 if not (ini.ValueExists('Thread', 'ReplaceDat')) then begin
1290 msg := '?祉???ャ?????c?純?????????綽?絲丞??????障????鐚?'+ #13#10 +
1291 '鐚???エ:????鐚?'+ #13#10+'荅括完荐??????紊??眼?с???障????';
1292 if MsgBox(Application.Handle,
1293 msg, '???潟????', MB_YESNO or MB_ICONQUESTION) = IDYES then begin
1294 FReplaceDat := True;
1295 end;
1296 end else begin
1297 FReplaceDat := ini.ReadBool('Thread', 'ReplaceDat', False);
1298 end;
1299
1300 FSentIniFileSize := ini.ReadInteger('Function', 'SentIniFileSize', 3);
1301 FExtList := ini.ReadString('Function', 'ExtList', '*.gif;*.jpg;*.jpeg;*.png;*.zip;*.rar');
1302
1303 FCheckDatFile := ini.ReadBool('ThreadList', 'CheckDatFile', True);
1304 FLimitResCountMessage := ini.ReadBool('Thread', 'LimitResCountMessage', True);
1305 ini.UpdateFile;
1306 finally
1307 ini.Free;
1308 end;
1309 end;
1310 //?炊?贋?亥??RL茯??粋昭??/span>
1311 procedure TSetting.ReadBoardURLsFile();
1312 var
1313 ini: TMemIniFile;
1314 urlNum: Integer;
1315 i : Integer;
1316 begin
1317 if not FileExists(GetBoardURLFileName()) then
1318 MakeURLIniFile();
1319 ini := TMemIniFile.Create(GetBoardURLFileName());
1320 try
1321 urlNum := ini.ReadInteger('URL','count',0);
1322 BoardURLSelected := ini.ReadInteger('URL','selected',0);
1323 for i := 0 to urlNum - 1 do begin
1324 FBoardURLs.Append(ini.ReadString('URL',IntToStr(i+1),''));
1325 end;
1326 finally
1327 ini.Free;
1328 end;
1329
1330 end;
1331 //荐?????<?ゃ???絖?(system)
1332 procedure TSetting.WriteSystemSettingFile();
1333 var
1334 ini: TMemIniFile;
1335 begin
1336 ini := TMemIniFile.Create(GetFileName());
1337 try
1338 //??篆<???????<?泣?ゃ??/span>
1339 ini.WriteInteger('HTTP', 'RecvBufferSize', FRecvBufferSize);
1340 //HTTP1.1篏睡??/span>
1341 ini.WriteBool('HTTP', 'Protocol', FProtocol);
1342 //???????傑・膓?HTTP1.1篏睡??/span>
1343 ini.WriteBool('HTTP', 'ProxyProtocol', FProxyProtocol);
1344
1345 ini.WriteBool('ReadProxy', 'Proxy', FReadProxy);
1346 ini.WriteString('ReadProxy', 'Address', FReadProxyAddress);
1347 ini.WriteInteger('ReadProxy', 'Port', FReadProxyPort);
1348 ini.WriteString('ReadProxy', 'UserID', FReadProxyUserID);
1349 ini.WriteString('ReadProxy', 'Password', FReadProxyPassword);
1350
1351 ini.WriteBool('WriteProxy', 'Proxy', FWriteProxy);
1352 ini.WriteString('WriteProxy', 'Address', FWriteProxyAddress);
1353 ini.WriteInteger('WriteProxy', 'Port', FWriteProxyPort);
1354 ini.WriteString('WriteProxy', 'UserID', FWriteProxyUserID);
1355 ini.WriteString('WriteProxy', 'Password', FWriteProxyPassword);
1356
1357 ini.WriteString('Window', 'BrowserFontName', FBrowserFontName);
1358 ini.WriteInteger('Window', 'BrowserFontSize', FBrowserFontSize);
1359 ini.WriteInteger('Window', 'BrowserFontSize', FBrowserFontSize);
1360 ini.WriteInteger('Window', 'BrowserFontBold', FBrowserFontBold);
1361 ini.WriteInteger('Window', 'BrowserFontItalic', FBrowserFontItalic);
1362 ini.WriteInteger('Window', 'BrowserFontColor', FBrowserFontColor);
1363 ini.WriteInteger('Window', 'BrowserBackColor', FBrowserBackColor);
1364
1365 ini.WriteString('Window', 'CabinetFontName', FCabinetFontName);
1366 ini.WriteInteger('Window', 'CabinetFontSize', FCabinetFontSize);
1367 ini.WriteString('Window', 'CabinetFontColor', ColorToString(FCabinetFontColor));
1368 ini.WriteBool('Window', 'CabinetFontBold', FCabinetFontBold);
1369 ini.WriteBool('Window', 'CabinetFontItalic', FCabinetFontItalic);
1370 ini.WriteString('Window', 'CabinetBackColor', ColorToString(FCabinetBackColor));
1371
1372 ini.WriteString('Window', 'ListFontName', FListFontName);
1373 ini.WriteInteger('Window', 'ListFontSize', FListFontSize);
1374 ini.WriteString('Window', 'ListFontColor', ColorToString(FListFontColor));
1375 ini.WriteString('Window', 'ListBackColor', ColorToString(FListBackColor));
1376 ini.WriteBool('Window', 'ListFontBold', FListFontBold);
1377 ini.WriteBool('Window', 'ListFontItalic', FListFontItalic);
1378 ini.WriteBool('Window','UseOddColor',FUseOddColorOddResNum);
1379 ini.WriteString('Window', 'OddColor',ColorToString(FOddColor));
1380 ini.WriteBool('Window','UnFocusedBold', FUnFocusedBold);
1381
1382 ini.WriteString('Window', 'EditorFontName', FEditorFontName);
1383 ini.WriteInteger('Window', 'EditorFontSize', FEditorFontSize);
1384 ini.WriteString('Window', 'EditorFontColor', ColorToString(FEditorFontColor));
1385 ini.WriteString('Window', 'EditorBackColor', ColorToString(FEditorBackColor));
1386
1387 ini.WriteString('Window', 'BrowserTabFontName', FBrowserTabFontName);
1388 ini.WriteInteger('Window', 'BrowserTabFontSize', FBrowserTabFontSize);
1389 ini.WriteBool('Window', 'BrowserTabFontBold', FBrowserTabFontBold);
1390 ini.WriteBool('Window', 'BrowserTabFontItalic', FBrowserTabFontItalic);
1391
1392 ini.WriteString('Window', 'HintFontName', FHintFontName);
1393 ini.WriteInteger('Window', 'HintFontSize', FHintFontSize);
1394 ini.WriteString('Window', 'HintFontColor', ColorToString(FHintFontColor));
1395 ini.WriteString('Window', 'HintBackColor', ColorToString(FHintBackColor));
1396
1397 ini.UpdateFile;
1398 finally
1399 ini.Free;
1400 end;
1401 end;
1402
1403 //荐?????<?ゃ???絖?(window)
1404 procedure TSetting.WriteWindowSettingFile();
1405 var
1406 i: Integer;
1407 ini: TMemIniFile;
1408 CoolSet: TCoolSet;
1409 wkList : TStringList;
1410 begin
1411 ini := TMemIniFile.Create(GetFileName());
1412 try
1413 ini.WriteInteger('WindowSize', 'Top', WindowTop);
1414 ini.WriteInteger('WindowSize', 'Left', WindowLeft);
1415 ini.WriteInteger('WindowSize', 'Height', WindowHeight);
1416 ini.WriteInteger('WindowSize', 'Width', WindowWidth);
1417 ini.WriteBool('WindowSize', 'Max', WindowMax);
1418
1419 ini.WriteInteger('ViewStyle', 'ListView', Ord(ListStyle));
1420
1421 ini.WriteInteger('EditorWindowSize', 'Top', EditWindowTop);
1422 ini.WriteInteger('EditorWindowSize', 'Left', EditWindowLeft);
1423 ini.WriteInteger('EditorWindowSize', 'Height', EditWindowHeight);
1424 ini.WriteInteger('EditorWindowSize', 'Width', EditWindowWidth);
1425 ini.WriteBool('EditorWindowSize', 'Max', EditWindowMax);
1426 ini.WriteBool('EditorWindowSize', 'Stay', EditWindowStay);
1427 ini.WriteBool('EditorWindowSize', 'Translucent', EditWindowTranslucent);
1428
1429 ini.WriteInteger('OptionDialog', 'TabIndex', FOptionDialogTabIndex);
1430
1431 // ?ュ???≪?激?鴻??
1432 ini.WriteInteger('IAtWindowsSize', 'Top', FInputAssistFormTop);
1433 ini.WriteInteger('IAtWindowsSize', 'Left', FInputAssistFormLeft);
1434 ini.WriteInteger('IAtWindowsSize', 'Width', FInputAssistFormWidth);
1435 ini.WriteInteger('IAtWindowsSize', 'Height', FInputAssistFormHeight);
1436
1437 //???若??????/span>
1438 ini.WriteBool('ToolBar', 'StdVisible', FStdToolBarVisible);
1439 ini.WriteBool('ToolBar', 'AddressVisible', FAddressBarVisible);
1440 ini.WriteBool('ToolBar', 'LinkVisible', FLinkBarVisible);
1441 ini.WriteBool('ToolBar', 'ListVisible', FListToolBarVisible);
1442 ini.WriteBool('ToolBar', 'ListNameVisible', FListNameBarVisible);
1443 ini.WriteBool('ToolBar', 'BrowserVisible', FBrowserToolBarVisible);
1444 ini.WriteBool('ToolBar', 'BrowserNameVisible', FBrowserNameBarVisible);
1445 //???若??????rapable
1446 ini.WriteBool('ToolBar', 'ListWrapable', FListToolBarWrapable);
1447 ini.WriteBool('ToolBar', 'BrowserWrapable', FBrowserToolBarWrapable);
1448
1449 //?帥??
1450 ini.WriteBool('Tab', 'BrowserTabVisible', FBrowserTabVisible);
1451 ini.WriteInteger('Tab', 'BrowserTabPosition', Ord(FBrowserTabPosition));
1452 ini.WriteInteger('Tab', 'BrowserTabAppend', Ord(FBrowserTabAppend));
1453 ini.WriteInteger('Tab', 'BrowserTabStyle', Ord(FBrowserTabStyle));
1454
1455 //?<???祉?若?吾????/span>
1456 ini.WriteBool('MessageBar', 'Visible', FMessageBarVisible);
1457 ini.WriteInteger('MessageBar', 'Height', FMessegeBarHeight);
1458
1459 //?鴻???若?帥?鴻????/span>
1460 ini.WriteBool('StatusBar', 'Visible', FStatusBarVisible);
1461
1462 //???c????????
1463 ini.WriteBool('Cabinet', 'Visible', FCabinetVisible);
1464 ini.WriteInteger('Cabinet', 'Width', FCabinetWidth);
1465 ini.WriteInteger('Cabinet', 'Index', FCabinetIndex);
1466
1467 //???鴻?????泣?ゃ?冴?????贋梓綛?/span>
1468 ini.WriteInteger('List', 'Orientation', Ord(FListOrientation));
1469 ini.WriteInteger('List', 'Height', FListHeight);
1470 ini.WriteInteger('List', 'HeightState', Ord(FListHeightState));
1471 ini.WriteInteger('List', 'Width', FListWidth);
1472 ini.WriteInteger('List', 'WidthState', Ord(FListWidthState));
1473 // ini.WriteBool('List', 'HeightMax', FListHeightMax);
1474 // ini.WriteBool('List', 'WidthMax', FListWidthMax);
1475
1476
1477 // ini.WriteInteger('Window', 'BrowserFontSize', BrowserFontSize);
1478
1479 //???鴻????埈;腓?/span>
1480 ini.WriteBool('Function', 'ListViewNo', FListViewNo);
1481 //CSS篏睡??/span>
1482 ini.WriteBool('CSS', 'UseCSS', FUseCSS);
1483 //???????????????鴻???潟??篏帥????
1484 ini.WriteBool('CSS', 'UseKatjushaType', FUseKatjushaType);
1485 //CSS???<?ゃ????
1486 ini.WriteString('CSS', 'FileName', FSkinFiles.FileName);
1487 //Mail罨?茵?ず
1488 ini.WriteBool('Thread', 'ShowMail', FShowMail);
1489 // ???壕;腓榊???/span>
1490 ini.DeleteKey( 'Thread', 'OnlyAHundredRes' ); // ?ゃ??荐????????/span>
1491 ini.WriteInteger('Thread', 'ResRange', FResRange);
1492 ini.WriteBool('Thread', 'ResRangeHold', FResRangeHold);
1493 ini.WriteInteger('Thread', 'HeadResCount', FHeadResCount);
1494 // ?鴻??????筝?荀ц;腓榊???/span>
1495 ini.WriteInteger('ThreadList', 'ThreadRange', Ord( FThreadRange ));
1496 //???医???ょ∈茯?
1497 ini.WriteBool('Function', 'LogDeleteMessage', FDeleteMsg);
1498 //腟?篋?腆肴?
1499 ini.WriteBool('Function','ShowDialogForEnd',FShowDialogForEnd);
1500 //AllTabClose
1501 ini.WriteBool('Function','ShowDialogForAllTabClose', FShowDialogForAllTabClose);
1502 //Samba
1503 ini.WriteBool('Function','UseSamba', FUseSamba);
1504 //ResAnchorjamp
1505 ini.WriteBool('Function', 'ResAnchoJamp', ResAnchorJamp);
1506
1507 //???≪?????c???????????≪????茵?ず
1508 ini.WriteBool('Thread', 'UnActivePopup', FUnActivePopup);
1509 //???鴻???????≪???????????若???若????
1510 ini.WriteBool('Thread', 'ResPopupHeaderBold', FResPopupHeaderBold);
1511 //ini.WriteString('BoardURL', '2ch', FBoardURL2ch);
1512
1513 //茯?荐主?????若??D?祉???鴻???若??
1514 ini.WriteString('Attestation', 'UserID', FUserID);
1515 ini.WriteString('Attestation', 'Password', Encrypt(FPassword));
1516 ini.WriteBool('Attestation', 'AutoLogin', FAutoLogin);
1517 ini.WriteBool('Attestation', 'FForcedLogin', FForcedLogin);
1518 ini.WriteString('Attestation', 'FDolibURL', FDolibURL);
1519
1520 //URL??????????莎桁???≪????/span>
1521 ini.WriteBool('URLApp', 'Select', FURLApp);
1522 ini.WriteString('URLApp', 'File', FURLAppFile);
1523
1524 //mailto????????????篏?
1525 ini.WriteBool('Mailto', 'Open', FOpenMailer);
1526
1527 //???????≪????篏?臀?/span>
1528 ini.WriteInteger('Browser', 'PopupPosition', Ord(FPopupPosition));
1529
1530 //?≪?????鴻????/span>
1531 ini.WriteBool('AddressBar', 'URLDisplay', FURLDisplay);
1532 ini.WriteBool('AddressBar', 'TabStop', FAddressBarTabStop);
1533 ini.WriteBool('AddressBar', 'LinkAdd', FLinkAddAddressBar);
1534 ini.WriteInteger('AddressBar', 'HistoryCount', FAddressHistoryCount);
1535
1536 //?糸????????ャ??/span>
1537 ini.WriteBool('Browser', 'PreviewVisible', FPreviewVisible);
1538 ini.WriteInteger('Browser', 'PreviewSize', Ord(FPreviewSize));
1539 ini.WriteInteger('Browser', 'PreviewWait', FPreviewWait);
1540
1541 ini.WriteInteger('Window', 'BrowserAutoMaximize', Ord( BrowserAutoMaximize ) );
1542
1543 //?鴻??????筝?荀ф?贋?違?≪?ゃ?潟??/span>
1544 ini.WriteBool('ThreadList', 'StateIconVisible', FListIconVisible);
1545 ini.WriteBool('ThreadList', 'CreationTimeLogs',FCreationTimeLogs);
1546 ini.WriteBool('ThreadList', 'FutureThread', FFutureThread);
1547 ini.WriteInteger('ThreadList', 'SelectInterval', FSelectInterval);
1548 //?純?若????
1549 ini.WriteInteger('ThreadList', 'BBSSortIndex', FBBSSortIndex);
1550 ini.WriteBool('ThreadList', 'BBSSortOrder', FBBSSortOrder);
1551 ini.WriteInteger('ThreadList', 'CategorySortIndex', FCategorySortIndex);
1552 ini.WriteBool('ThreadList', 'CategorySortOrder', FCategorySortOrder);
1553 ini.WriteInteger('ThreadList', 'BoardSortIndex', FBoardSortIndex);
1554 ini.WriteBool('ThreadList', 'BoardSortOrder', FBoardSortOrder);
1555 ini.WriteInteger('ThreadList', 'DatOchiSortIndex', FDatOchiSortIndex);
1556 ini.WriteBool('ThreadList', 'DatOchiSortOrder', FDatOchiSortOrder);
1557 // DL緇????????純?若??
1558 ini.WriteBool('ThreadList', 'AutoSort', FAutoSortThreadList);
1559
1560 //?吾??莨若?炊?????激?恰???私戎??┃絎?
1561 ini.WriteBool('PostTime', 'UseMachineTime', FUseMachineTime);
1562 ini.WriteInteger('PostTime', 'TimeAdjustSec', FTimeAdjustSec);
1563 ini.WriteBool('PostTime', 'TimeAdjust', FTimeAdjust);
1564
1565 // ???鴻????????綛?
1566 for i := 0 to Length(FBBSColumnWidth) - 1 do begin
1567 ini.WriteInteger('BBSColumnWidth', 'ID' + IntToStr(i), FBBSColumnWidth[i]);
1568 end;
1569 for i := 0 to Length(FCategoryColumnWidth) - 1 do begin
1570 ini.WriteInteger('CategoryColumnWidth', 'ID' + IntToStr(i), FCategoryColumnWidth[i]);
1571 end;
1572 for i := 0 to Length(FBoardColumnWidth) - 1 do begin
1573 ini.WriteInteger('BoardColumnWidth', 'ID' + IntToStr(i), FBoardColumnWidth[i]);
1574 end;
1575
1576 wkList := TStringList.Create;
1577 try
1578 // ?????眼?????鴻????綺?span>
1579 ini.ReadSection( 'BBSColumnOrder', wkList );
1580 for i := wkList.Count - 1 downto 0 do
1581 ini.DeleteKey( 'BBSColumnOrder', wkList[ i ] );
1582 for i := 0 to FBBSColumnOrder.Count - 1 do
1583 ini.WriteInteger( 'BBSColumnOrder', 'ID' + IntToStr( i ), Ord( FBBSColumnOrder[ i ] ) );
1584
1585 // ?帥???鴻????綺?span>
1586 ini.ReadSection( 'CategoryColumnOrder', wkList );
1587 for i := wkList.Count - 1 downto 0 do
1588 ini.DeleteKey( 'CategoryColumnOrder', wkList[ i ] );
1589 for i := 0 to FCategoryColumnOrder.Count - 1 do
1590 ini.WriteInteger( 'CategoryColumnOrder', 'ID' + IntToStr( i ), Ord( FCategoryColumnOrder[ i ] ) );
1591
1592 // ?鴻?????鴻????綺?span>
1593 ini.ReadSection( 'BoardColumnOrder', wkList );
1594 for i := wkList.Count - 1 downto 0 do
1595 ini.DeleteKey( 'BoardColumnOrder', wkList[ i ] );
1596 for i := 0 to FBoardColumnOrder.Count - 1 do
1597 ini.WriteInteger( 'BoardColumnOrder', 'ID' + IntToStr( i ), Ord( FBoardColumnOrder[ i ] ) );
1598 finally
1599 wkList.Free;
1600 end;
1601
1602 //?泣???潟??
1603 for i := 0 to GetSoundCount - 1 do begin
1604 if not FileExists(SoundFileName[i]) then
1605 SoundFileName[i] := '';
1606 ini.WriteString('Sound', SoundName[i], SoundFileName[i]);
1607 end;
1608
1609 //CoolBar
1610 ini.EraseSection('MainCoolBar');
1611 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1612 CoolSet := MainCoolSet[i];
1613 ini.WriteInteger('MainCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
1614 ini.WriteInteger('MainCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
1615 ini.WriteBool('MainCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
1616 end;
1617 ini.EraseSection('ListCoolBar');
1618 ini.WriteInteger( 'ListCoolBar', 'SelectWidth', FSelectComboBoxWidth );
1619 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1620 CoolSet := ListCoolSet[i];
1621 ini.WriteInteger('ListCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
1622 ini.WriteInteger('ListCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
1623 ini.WriteBool('ListCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
1624 end;
1625 ini.EraseSection('BrowserCoolBar');
1626 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1627 CoolSet := BrowserCoolSet[i];
1628 ini.WriteInteger('BrowserCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
1629 ini.WriteInteger('BrowserCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
1630 ini.WriteBool('BrowserCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
1631 end;
1632
1633 //???若????
1634 ini.WriteBool('Abon','Deleterlo',FAbonDeleterlo);
1635 ini.WriteBool('Abon','Replaceul',FAbonReplaceul);
1636 ini.WriteBool('Abon','Popup',FPopUpAbon);
1637 ini.WriteBool('Abon','ShowNGLines',FShowNGLinesNum);
1638 ini.WriteBool('Abon','AddResAnchor',FAddResAnchor);
1639 ini.WriteBool('Abon','DeleteSyria',FDeleteSyria);
1640 ini.WriteBool('Abon','IgnoreKana', FIgnoreKana);
1641
1642 // ?????c??/span>
1643 ini.WriteBool( 'Editor', 'SpaceToNBSP', FSpaceToNBSP );
1644 ini.WriteBool( 'Editor', 'AmpToCharRef', FAmpToCharRef );
1645
1646 //?帥??????篆?絖?
1647 ini.WriteBool('TabAuto', 'TabAutoLoadSave', FTabAutoLoadSave);
1648 ini.WriteString('Thread', 'LastCloseTabURL', FLastCloseTabURL);
1649 //荅括完荐??
1650 ini.WriteInteger('OptionDialog', 'KuroutTabIndex', FKuroutSettingTabIndex);
1651
1652 //???<????茯?罅???罘???/span>
1653 ini.WriteBool('2chSupport', 'Support', F2chSupport);
1654
1655 // ?????鴻?吾?с?鴻???c?若??篏睡??????????????
1656 ini.WriteBool( 'Guesture', 'Enabled', FGestureEnabled );
1657 ini.WriteBool( 'Guesture', 'IgnoreContext', FGestureIgnoreContext );
1658 //FusianaTrap
1659 ini.WriteBool('Trap', 'LocalTrap', FLocalTrapAtt);
1660 ini.WriteBool('Trap', 'RemoteTrap', FRemoteTrapAtt);
1661 ini.WriteInteger('HTTP', 'ReadTimeOut', FReadTimeOut);
1662
1663 // 篏睡???????鴻???????c????/span>
1664 ini.WriteInteger( 'Abon', 'SpamFilterAlgorithm', Ord( FSpamFilterAlgorithm ) );
1665 ini.WriteBool('Function', 'Mute', FMute);
1666 ini.WriteBool('ThreadList', 'UseUndecided', FUseUndecided);
1667
1668 //茯?荐主?????若??D?祉???鴻???若??
1669 ini.WriteString('Be', 'UserID', FBeUserID);
1670 ini.WriteString('Be', 'Code', Encrypt(FBeCode));
1671 ini.WriteBool('Be', 'AutoLogin', FBeAutoLogin);
1672
1673 //絮ユ?????紊т?絖?篁倶??/span>
1674 ini.WriteInteger('Recode', 'Max', FMaxRecordCount);
1675 // ?阪???ookie??絖???
1676 ini.WriteString('Cookie', 'fixedString', FFixedCookie);
1677
1678 // ???潟??Щ??絮ユ?????紊т?????/span>
1679 ini.WriteInteger('MoveHisotry', 'Max', FMoveHistorySize);
1680
1681 ini.WriteBool('Function', 'StroedTaskTray', FStoredTaskTray);
1682 ini.WriteBool('Function', 'LoopBrowserTabs', FLoopBrowserTabs);
1683 ini.WriteBool('Thread', 'AddKeywordLink', FAddKeywordLink);
1684 ini.WriteBool('Thread', 'ReplaceDat', FReplaceDat);
1685 ini.WriteInteger('Function', 'SentIniFileSize', FSentIniFileSize);
1686 ini.WriteString('Function', 'ExtList', FExtList);
1687 ini.WriteBool('ThreadList', 'CheckDatFile', FCheckDatFile);
1688 ini.WriteBool('Thread', 'LimitResCountMessage', FLimitResCountMessage);
1689 ini.UpdateFile;
1690 finally
1691 ini.Free;
1692 end;
1693 end;
1694
1695 //荐?????<?ゃ???絖?(name & mail)
1696 procedure TSetting.WriteNameMailSettingFile();
1697 var
1698 i: Integer;
1699 ini: TMemIniFile;
1700 begin
1701 ini := TMemIniFile.Create(GetFileName());
1702 try
1703 ini.EraseSection('Name');
1704 ini.EraseSection('Mail');
1705 ini.EraseSection('SelectText');
1706 for i := 0 to FNameList.Count - 1 do begin
1707 ini.WriteString('Name', Format('%.2d', [i + 1]), FNameList[i]);
1708 if i >= 39 then
1709 Break;
1710 end;
1711 for i := 0 to FMailList.Count - 1 do begin
1712 ini.WriteString('Mail', Format('%.2d', [i + 1]), FMailList[i]);
1713 if i >= 39 then
1714 Break;
1715 end;
1716 for i := 0 to FSelectTextList.Count - 1 do begin
1717 ini.WriteString('SelectText', Format('%.2d', [i + 1]), FSelectTextList[i]);
1718 if i >= 39 then
1719 Break;
1720 end;
1721 ini.UpdateFile;
1722 finally
1723 ini.Free;
1724 end;
1725 end;
1726
1727 procedure TSetting.WriteFolderSettingFile();
1728 var
1729 ini: TMemIniFile;
1730 begin
1731 ini := TMemIniFile.Create(GetFileName());
1732 try
1733 if GetAppDir + 'Log' = NewLogFolder then
1734 ini.DeleteKey('Folder', 'LogFolder')
1735 else
1736 ini.WriteString('Folder', 'LogFolder', NewLogFolder);
1737 ini.UpdateFile;
1738 finally
1739 ini.Free;
1740 end;
1741 end;
1742 //?炊?贋?亥??oardURL??篆?絖?
1743 procedure TSetting.WriteBoardURLSettingFile();
1744 var
1745 ini: TMemIniFile;
1746 i : Integer;
1747 oldcount : Integer;
1748 begin
1749 ini := TMemIniFile.Create(GetBoardURLFileName());
1750 try
1751 oldcount := ini.ReadInteger('URL','count',FBoardURLs.Count);
1752 ini.WriteInteger('URL','count',FBoardURLs.Count);
1753 ini.WriteInteger('URL','selected',BoardURLSelected);
1754 for i := 0 to FBoardURLs.Count -1 do begin
1755 ini.WriteString('URL',IntToStr(i+1),FBoardURLs.Strings[i]);
1756 end;
1757 if oldcount > FBoardURLs.Count then begin
1758 for i := FBoardURLs.Count to oldcount do begin
1759 ini.DeleteKey('URL',IntToStr(i+1));
1760 end;
1761 end;
1762 ini.UpdateFile;
1763 finally
1764 ini.Free;
1765 end;
1766 end;
1767
1768 {$R-}
1769 //???鴻????????????????/span>
1770 function TSetting.GetBBSColumnWidth(index: Integer): Integer;
1771 begin
1772 Result := IfThen(index in [0..Length(FBBSColumnWidth) - 1], FBBSColumnWidth[index], 0);
1773 end;
1774
1775 function TSetting.GetCategoryColumnWidth(index: Integer): Integer;
1776 begin
1777 Result := IfThen(index in [0..Length(FCategoryColumnWidth) - 1], FCategoryColumnWidth[index], 0);
1778 end;
1779
1780 function TSetting.GetBoardColumnWidth(index: Integer): Integer;
1781 begin
1782 Result := IfThen(index in [0..Length(FBoardColumnWidth) - 1], FBoardColumnWidth[index], 0);
1783 end;
1784 {$IFDEF DEBUG}
1785 {$R+}
1786 {$ENDIF}
1787
1788 procedure TSetting.SetBBSColumnWidth(index: Integer; value: Integer);
1789 begin
1790 if index in [0..Length(FBBSColumnWidth) - 1] then
1791 FBBSColumnWidth[index] := value;
1792 end;
1793
1794 procedure TSetting.SetCategoryColumnWidth(index: Integer; value: Integer);
1795 begin
1796 if index in [0..Length(FCategoryColumnWidth) - 1] then
1797 FCategoryColumnWidth[index] := value;
1798 end;
1799
1800 procedure TSetting.SetBoardColumnWidth(index: Integer; value: Integer);
1801 begin
1802 if index in [0..Length(FBoardColumnWidth) - 1] then
1803 FBoardColumnWidth[index] := value;
1804 end;
1805
1806 function TSetting.GetSoundCount: Integer;
1807 begin
1808 Result := Length(SOUND_NAME);
1809 end;
1810
1811 function TSetting.GetSoundName(Index: Integer): string;
1812 begin
1813 if (Index < GetSoundCount) and (Index >= 0) then
1814 Result := SOUND_NAME[Index].Name
1815 else
1816 Result := '';
1817 end;
1818
1819 function TSetting.GetSoundViewName(Index: Integer): string;
1820 begin
1821 if (Index < GetSoundCount) and (Index >= 0) then
1822 Result := SOUND_NAME[Index].ViewName
1823 else
1824 Result := '';
1825 end;
1826
1827 function TSetting.GetSoundFileName(Index: Integer): string;
1828 begin
1829 if (Index < GetSoundCount) and (Index >= 0) then
1830 Result := SOUND_NAME[Index].FileName
1831 else
1832 Result := '';
1833 end;
1834
1835 procedure TSetting.SetSoundFileName(Index: Integer; value: string);
1836 begin
1837 if (Index < GetSoundCount) and (Index >= 0) then
1838 SOUND_NAME[Index].FileName := value;
1839 end;
1840
1841 function TSetting.FindSoundFileName(Name: string): string;
1842 var
1843 i: Integer;
1844 begin
1845 for i := 0 to GetSoundCount - 1 do begin
1846 if SoundName[i] = Name then begin
1847 Result := SoundFileName[i];
1848 Exit;
1849 end;
1850 end;
1851 Result := '';
1852 end;
1853
1854 function TSetting.Encrypt(s: string): string;
1855 var
1856 cryptObj: THogeCryptAuto;
1857 inputStream, outputStream: TStringStream;
1858 begin
1859 inputStream := TStringStream.Create(s);
1860 outputStream := TStringStream.Create('');
1861 cryptObj := THogeCryptAuto.Create;
1862 try
1863 // ???桁??
1864 cryptObj.Encrypt(inputStream, GIKO_ENCRYPT_TEXT, outputStream);
1865
1866 // ???ゃ?????????у?荀?????????????鴻???????
1867 Result := HogeBase64Encode(outputStream.DataString);
1868 finally
1869 cryptObj.Free;
1870 outputStream.Free;
1871 inputStream.Free;
1872 end;
1873 end;
1874
1875 function TSetting.Decrypt(s: string): string;
1876 var
1877 cryptObj: THogeCryptAuto;
1878 inputStream, outputStream: TStringStream;
1879 begin
1880 try
1881 inputStream := TStringStream.Create(HogeBase64Decode(s));
1882 except
1883 Result := '';
1884 Exit;
1885 end;
1886 outputStream := TStringStream.Create('');
1887 cryptObj := THogeCryptAuto.Create;
1888 try
1889 // 緇??/span>
1890 cryptObj.Decrypt(inputStream, GIKO_ENCRYPT_TEXT, outputStream);
1891 Result := outputStream.DataString;
1892 finally
1893 cryptObj.Free;
1894 outputStream.Free;
1895 inputStream.Free;
1896 end;
1897 end;
1898
1899 function TSetting.GetMainCoolSet(Index: Integer): TCoolSet;
1900 begin
1901 if Index in [0..MAIN_COOLBAND_COUNT - 1] then
1902 Result := FMainCoolBar[Index]
1903 else begin
1904 Result.FCoolID := -1;
1905 Result.FCoolWidth := -1;
1906 Result.FCoolBreak := False;
1907 end;
1908 end;
1909
1910 function TSetting.GetBoardCoolSet(Index: Integer): TCoolSet;
1911 begin
1912 if Index in [0..LIST_COOLBAND_COUNT - 1] then
1913 Result := FListCoolBar[Index]
1914 else begin
1915 Result.FCoolID := -1;
1916 Result.FCoolWidth := -1;
1917 Result.FCoolBreak := False;
1918 end;
1919 end;
1920
1921 function TSetting.GetBrowserCoolSet(Index: Integer): TCoolSet;
1922 begin
1923 if Index in [0..BROWSER_COOLBAND_COUNT - 1] then
1924 Result := FBrowserCoolBar[Index]
1925 else begin
1926 Result.FCoolID := -1;
1927 Result.FCoolWidth := -1;
1928 Result.FCoolBreak := False;
1929 end;
1930 end;
1931
1932 procedure TSetting.SetMainCoolSet(Index: Integer; CoolSet: TCoolSet);
1933 begin
1934 if Index in [0..MAIN_COOLBAND_COUNT - 1] then
1935 FMainCoolBar[Index] := CoolSet;
1936 end;
1937
1938 procedure TSetting.SetBoardCoolSet(Index: Integer; CoolSet: TCoolSet);
1939 begin
1940 if Index in [0..LIST_COOLBAND_COUNT - 1] then
1941 FListCoolBar[Index] := CoolSet;
1942 end;
1943
1944 procedure TSetting.SetBrowserCoolSet(Index: Integer; CoolSet: TCoolSet);
1945 begin
1946 if Index in [0..BROWSER_COOLBAND_COUNT - 1] then
1947 FBrowserCoolBar[Index] := CoolSet;
1948 end;
1949
1950 //url.ini????????????????????
1951 procedure TSetting.MakeURLIniFile();
1952 var
1953 ini: TMemIniFile;
1954 begin
1955 ini := TMemIniFile.Create(GetBoardURLFileName());
1956 try
1957 //?贋??RL????/span>
1958 ini.WriteInteger('URL','count',1);
1959 //???????????т戎??????鐚居鴫鐚????ゃ?潟????????/span>
1960 ini.WriteInteger('URL','selected',1);
1961 //篁ヤ?綽?荀????違???????贋?逸宍鐚駕蒔??菴遵??
1962 ini.WriteString('URL','1',DEFAULT_2CH_BOARD_URL1);
1963 //ini.WriteString('URL','2',DEFAULT_2CH_BOARD_URL2);
1964 ini.UpdateFile;
1965 finally
1966 ini.Free;
1967 end;
1968 end;
1969
1970 (*************************************************************************
1971 *???若?????<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
1972 *************************************************************************)
1973 function TSetting.GetBoardFileName: string;
1974 begin
1975 Result := GetConfigDir + BOARD_FILE_NAME;
1976 end;
1977
1978 (*************************************************************************
1979 *???若?????<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
1980 *************************************************************************)
1981 function TSetting.GetCustomBoardFileName: string;
1982 begin
1983 Result := GetConfigDir + CUSTOMBOARD_FILE_NAME;
1984 end;
1985
1986 (*************************************************************************
1987 *???若?????c??????????(\?х????)
1988 *************************************************************************)
1989 function TSetting.GetBoardDir: string;
1990 begin
1991 Result := IncludeTrailingPathDelimiter(GetConfigDir + BOARD_DIR_NAME);
1992 end;
1993
1994 (*************************************************************************
1995 *???潟???????????????弱????緇?
1996 *************************************************************************)
1997 function TSetting.GetHtmlTempFileName: string;
1998 begin
1999 Result := TEMP_FOLDER;
2000 end;
2001
2002
2003 (*************************************************************************
2004 *絎?茵????<?ゃ????????????緇?(??緇?????????)
2005 *************************************************************************)
2006 function TSetting.GetAppDir: string;
2007 begin
2008 Result := ExtractFilePath(Application.ExeName);
2009 end;
2010
2011 (*************************************************************************
2012 *TempHtml???<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
2013 *************************************************************************)
2014 function TSetting.GetTempFolder: string;
2015 begin
2016 Result := GetAppDir + TEMP_FOLDER;
2017 end;
2018
2019 (*************************************************************************
2020 *sent.ini???<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
2021 *************************************************************************)
2022 function TSetting.GetSentFileName: string;
2023 begin
2024 Result := GetAppDir + SENT_FILE_NAME;
2025 end;
2026
2027 (*************************************************************************
2028 *outbox.ini???<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
2029 *************************************************************************)
2030 function TSetting.GetOutBoxFileName: string;
2031 begin
2032 Result := GetAppDir + OUTBOX_FILE_NAME;
2033 end;
2034
2035 (*************************************************************************
2036 *Config??????????緇?(\?х????)
2037 *************************************************************************)
2038 function TSetting.GetConfigDir: string;
2039 begin
2040 Result := IncludeTrailingPathDelimiter(GetAppDir + CONFIG_DIR_NAME);
2041 end;
2042 (*************************************************************************
2043 *CSS??????????緇?(\?х????)
2044 *************************************************************************)
2045 function TSetting.GetStyleSheetDir: string;
2046 begin
2047 Result := IncludeTrailingPathDelimiter(GetConfigDir + CSS_DIR_NAME);
2048 end;
2049 (*************************************************************************
2050 *skin??????????緇?(\?х????)
2051 *************************************************************************)
2052 function TSetting.GetSkinDir: string;
2053 begin
2054 Result := IncludeTrailingPathDelimiter(GetConfigDir + SKIN_DIR_NAME);
2055 end;
2056 (*************************************************************************
2057 *NG???若?????c??????????(\?х????)
2058 *************************************************************************)
2059 function TSetting.GetNGWordsDir: string;
2060 begin
2061 Result := IncludeTrailingPathDelimiter(GetConfigDir + NGWORDs_DIR_NAME);
2062 end;
2063 (*************************************************************************
2064 *Board?????違?ゃ?潟???c??????????(\?х????)
2065 *************************************************************************)
2066 function TSetting.GetBoardPlugInDir: string;
2067 begin
2068 Result := IncludeTrailingPathDelimiter(GetConfigDir + BOARD_PLUGIN_DIR_NAME);
2069 end;
2070
2071 procedure TSetting.SetUseCSS( value: Boolean );
2072 begin
2073
2074 FUseCSS := value;
2075 // Windows???????<?ゃ?????鴻??ぇ??絖?絨??絖??????????∴??????????с??
2076 // ?潟?潟?с???ゅ??с??紊ф??絖?絨??絖??????????∴???????
2077 FUseSkin :=
2078 UseCSS and
2079 (Pos( AnsiLowerCase(GetSkinDir), AnsiLowerCase(FSkinFiles.FileName) ) > 0) and
2080 FileExists( FSkinFiles.GetSkinHeaderFileName );
2081
2082 end;
2083
2084 procedure TSetting.SetCSSFileName( fileName: string );
2085 begin
2086 FSkinFiles.FileName := fileName;
2087 // Windows???????<?ゃ?????鴻??ぇ??絖?絨??絖??????????∴??????????с??
2088 // ?潟?潟?с???ゅ??с??紊ф??絖?絨??絖??????????∴???????
2089 FUseSkin :=
2090 UseCSS and
2091 (Pos( AnsiLowerCase(GetSkinDir), AnsiLowerCase(FSkinFiles.FileName) ) > 0) and
2092 FileExists( FSkinFiles.GetSkinHeaderFileName );
2093
2094 end;
2095 (*************************************************************************
2096 *samba荐?????<?ゃ??????緇?
2097 *************************************************************************)
2098 function TSetting.GetSambaFileName: string;
2099 begin
2100 Result := GetAppDir + SAMBATIME_FILE_NAME;
2101 end;
2102 //?炊?贋?育?ゅ??????眼?????鴻??篆?絖????<?ゃ??/span>
2103 function TSetting.GetIgnoreFileName: string;
2104 begin
2105 Result := GetConfigDir + IGNORE_FILE_NAME;
2106 end;
2107
2108 //! ?????鴻?吾?с?鴻???c?若???<?ゃ??????/span>
2109 function TSetting.GetGestureFileName: string;
2110 begin
2111 Result := GetConfigDir + GESTURE_FILE_NAME;
2112 end;
2113
2114 //! ?鴻???????c???水?膺?絮ユ????<?ゃ??????/span>
2115 function TSetting.GetSpamFilterFileName: string;
2116 begin
2117 Result := GetConfigDir + SPAMFILTER_FILE_NAME;
2118 end;
2119
2120 function TSetting.GetLanguageFileName: string;
2121 begin
2122 Result := GetConfigDir + LANGUAGE_FILE_NAME;
2123 end;
2124 procedure TSetting.WriteLogFolder(AVal : String);
2125 begin
2126 FLogFolder := AVal;
2127 FLogFolderP := IncludeTrailingPathDelimiter(LogFolder);
2128 end;
2129 function TSetting.GetMainKeyFileName: String;
2130 begin
2131 Result := GetConfigDir + KEY_SETTING_FILE_NAME;
2132 end;
2133 function TSetting.GetEditorKeyFileName: String;
2134 begin
2135 Result := GetConfigDir + EKEY_SETTING_FILE_NAME;
2136 end;
2137 function TSetting.GetInputAssistFileName : String;
2138 begin
2139 Result := GetConfigDir + INPUTASSIST_FILE_NAME;
2140 end;
2141 function TSetting.GetReplaceFileName: String;
2142 begin
2143 Result := GetConfigDir + REPLACE_FILE_NAME;
2144 end;
2145 procedure TSetting.SetMoveHistorySize(AVal : Integer);
2146 begin
2147 if (AVal > 0) then begin
2148 FMoveHistorySize := AVal;
2149 end;
2150 end;
2151 {
2152 \brief ???????決┃絎?茯??粋昭??/span>
2153 \param memIni ini???<?ゃ??/span>
2154 }
2155 procedure TSetting.ReadProxySettings(memIni: TMemIniFile);
2156 const
2157 READ_SECTION = 'ReadProxy';
2158 WRITE_SECTION= 'WriteProxy';
2159 PROXY_KEY = 'Proxy';
2160 ADDRE_KEY = 'Address';
2161 PORT_KEY = 'Port';
2162 UID_KEY = 'UserID';
2163 PASS_KEY = 'Password';
2164 begin
2165 if (memIni <> nil) then begin
2166 FReadProxy := memIni.ReadBool(READ_SECTION, PROXY_KEY, false);
2167 FReadProxyAddress := memIni.ReadString(READ_SECTION, ADDRE_KEY, '');
2168 FReadProxyPort := memIni.ReadInteger(READ_SECTION, PORT_KEY, 0);
2169 FReadProxyUserID := memIni.ReadString(READ_SECTION, UID_KEY, '');
2170 FReadProxyPassword := memIni.ReadString(READ_SECTION, PASS_KEY, '');
2171
2172 FWriteProxy := memIni.ReadBool(WRITE_SECTION, PROXY_KEY, false);
2173 FWriteProxyAddress := memIni.ReadString(WRITE_SECTION, ADDRE_KEY, '');
2174 FWriteProxyPort := memIni.ReadInteger(WRITE_SECTION, PORT_KEY, 0);
2175 FWriteProxyUserID := memIni.ReadString(WRITE_SECTION, UID_KEY, '');
2176 FWriteProxyPassword := memIni.ReadString(WRITE_SECTION, PASS_KEY, '');
2177 end;
2178 end;
2179 {
2180 \brief ??腮????c?潟????┃絎?茯??粋昭??/span>
2181 \param menIni ini???<?ゃ??/span>
2182 }
2183 procedure TSetting.ReadWindowSettings(memIni: TMemIniFile);
2184 const
2185 WINDOW_SECTION = 'Window';
2186 begin
2187 if (memIni <> nil) then begin
2188 FBrowserFontName := memIni.ReadString(WINDOW_SECTION, 'BrowserFontName', '');
2189 FBrowserFontSize := memIni.ReadInteger(WINDOW_SECTION, 'BrowserFontSize', 0);
2190 FBrowserFontBold := memIni.ReadInteger(WINDOW_SECTION, 'BrowserFontBold', 0);
2191 FBrowserFontItalic := memIni.ReadInteger(WINDOW_SECTION, 'BrowserFontItalic', 0);
2192 FBrowserFontColor := memIni.ReadInteger(WINDOW_SECTION, 'BrowserFontColor', -1);
2193 FBrowserBackColor := memIni.ReadInteger(WINDOW_SECTION, 'BrowserBackColor', -1);
2194
2195 FCabinetFontName := memIni.ReadString(WINDOW_SECTION, 'CabinetFontName', DEFAULT_FONT_NAME);
2196 FCabinetFontSize := memIni.ReadInteger(WINDOW_SECTION, 'CabinetFontSize', DEFAULT_FONT_SIZE);
2197 FCabinetFontBold := memIni.ReadBool(WINDOW_SECTION, 'CabinetFontBold', False);
2198 FCabinetFontItalic := memIni.ReadBool(WINDOW_SECTION, 'CabinetFontItalic', False);
2199 FCabinetFontColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'CabinetFontColor', DEFAULT_FONT_COLOR));
2200 FCabinetBackColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'CabinetBackColor', DEFAULT_WINDOW_COLOR));
2201
2202 FListFontName := memIni.ReadString(WINDOW_SECTION, 'ListFontName', DEFAULT_FONT_NAME);
2203 FListFontSize := memIni.ReadInteger(WINDOW_SECTION, 'ListFontSize', DEFAULT_FONT_SIZE);
2204 FListFontBold := memIni.ReadBool(WINDOW_SECTION, 'ListFontBold', False);
2205 FListFontItalic := memIni.ReadBool(WINDOW_SECTION, 'ListFontItalic', False);
2206 FListFontColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'ListFontColor', DEFAULT_FONT_COLOR));
2207 FListBackColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'ListBackColor', DEFAULT_WINDOW_COLOR));
2208 FUseOddColorOddResNum := memIni.ReadBool(WINDOW_SECTION,'UseOddColor', False);
2209 FOddColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'OddColor', DEFAULT_WINDOW_COLOR));
2210 FUnFocusedBold := memIni.ReadBool(WINDOW_SECTION,'UnFocusedBold', False);
2211
2212 FEditorFontName := memIni.ReadString(WINDOW_SECTION, 'EditorFontName', DEFAULT_FONT_NAME);
2213 FEditorFontSize := memIni.ReadInteger(WINDOW_SECTION, 'EditorFontSize', DEFAULT_FONT_SIZE);
2214 FEditorFontBold := memIni.ReadBool(WINDOW_SECTION, 'EditorFontBold', False);
2215 FEditorFontItalic := memIni.ReadBool(WINDOW_SECTION, 'EditorFontItalic', False);
2216 FEditorFontColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'EditorFontColor', DEFAULT_FONT_COLOR));
2217 FEditorBackColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'EditorBackColor', DEFAULT_WINDOW_COLOR));
2218
2219 FBrowserTabFontName := memIni.ReadString(WINDOW_SECTION, 'BrowserTabFontName', DEFAULT_TAB_FONT_NAME);
2220 FBrowserTabFontSize := memIni.ReadInteger(WINDOW_SECTION, 'BrowserTabFontSize', DEFAULT_TAB_FONT_SIZE);
2221 FBrowserTabFontBold := memIni.ReadBool(WINDOW_SECTION, 'BrowserTabFontBold', False);
2222 FBrowserTabFontItalic := memIni.ReadBool(WINDOW_SECTION, 'BrowserTabFontItalic', False);
2223
2224 FHintFontName := memIni.ReadString(WINDOW_SECTION, 'HintFontName', Screen.HintFont.Name);
2225 FHintFontSize := memIni.ReadInteger(WINDOW_SECTION, 'HintFontSize', Screen.HintFont.Size);
2226 //FHintFontBold := memIni.ReadBool(WINDOW_SECTION, 'HintFontBold', False);
2227 //FHintFontItalic := memIni.ReadBool(WINDOW_SECTION, 'HintFontItalic', False);
2228 FHintFontColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'HintFontColor', DEFAULT_FONT_COLOR));
2229 FHintBackColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'HintBackColor', 'clInfoBk'));
2230 end;
2231 end;
2232 {
2233 \brief ?ュ??絮ユ?茯??粋昭?随?罎?膣???<?若???鐚?????鐚?
2234 \param memIni ini???<?ゃ??/span>
2235 }
2236 procedure TSetting.ReadInputHisotrys(memIni: TMemIniFile);
2237 const
2238 SECTIONS : array[0..2] of string = ('Name', 'Mail', 'SelectText');
2239 var
2240 wkList : TStringList;
2241 wkStr : string;
2242 i, j : Integer;
2243 listArray : array[0..2] of TStringList;
2244 begin
2245 if (memIni <> nil) then begin
2246 listArray[0] := FNameList;
2247 listArray[1] := FMailList;
2248 listArray[2] := FSelectTextList;
2249 wkList := TStringList.Create;
2250 try
2251 for i := 0 to High(listArray) do begin
2252 memIni.ReadSection(SECTIONS[i], wkList);
2253 for j := 0 to wkList.Count -1 do begin
2254 wkStr := memIni.ReadString(SECTIONS[i], wkList[j], '');
2255 if (wkStr <> '') and
2256 (listArray[i].IndexOf(wkStr) = -1) then begin
2257 listArray[i].Add(wkStr);
2258 end;
2259 end;
2260 end;
2261 finally
2262 wkList.Free;
2263 end;
2264 end;
2265 end;
2266 {
2267 \breif ???鴻????????綛?茯??粋昭??/span>
2268 \param memIni ini???<?ゃ??/span>
2269 }
2270 procedure TSetting.ReadListColumnWidth(memIni: TMemIniFile);
2271 const
2272 SECTIONS : array[0..2] of string =
2273 ('BBSColumnWidth', 'CategoryColumnWidth', 'BoardColumnWidth');
2274 DEFAULT_BBS_WIDTH: array[0..0] of Integer = (140);
2275 DEFAULT_CATEGORY_WIDTH: array[0..2] of Integer = (150, 80, 130);
2276 DEFAULT_BOARD_WIDTH: array[0..10] of Integer = (350, 60, 60, 60, 60, 60, 80, 130, 130, 130, 60);
2277 MAX_WIDTH: Integer = 2000;
2278 var
2279 wkList : TStringList;
2280 i : Integer;
2281 begin
2282 if (memIni <> nil) then begin
2283 // ???鴻????????綛?
2284 wkList := TStringList.Create;
2285 try
2286 memIni.ReadSection(SECTIONS[0], wkList);
2287 if Length(FBBSColumnWidth) <> wkList.Count then begin
2288 memIni.EraseSection(SECTIONS[0]);
2289 end;
2290 for i := 0 to High(FBBSColumnWidth) do begin
2291 BBSColumnWidth[i] := memIni.ReadInteger(SECTIONS[0],
2292 'ID' + IntToStr(i), DEFAULT_BBS_WIDTH[i]);
2293 if BBSColumnWidth[i] > MAX_WIDTH then
2294 BBSColumnWidth[i] := DEFAULT_BBS_WIDTH[i];
2295 end;
2296 memIni.ReadSection(SECTIONS[1], wkList);
2297 if Length(FCategoryColumnWidth) <> wkList.Count then begin
2298 memIni.EraseSection(SECTIONS[1]);
2299 end;
2300 for i := 0 to High(FCategoryColumnWidth) do begin
2301 CategoryColumnWidth[i] := memIni.ReadInteger(SECTIONS[1],
2302 'ID' + IntToStr(i), DEFAULT_CATEGORY_WIDTH[i]);
2303 if CategoryColumnWidth[i] > MAX_WIDTH then
2304 CategoryColumnWidth[i] := DEFAULT_CATEGORY_WIDTH[i];
2305 end;
2306 memIni.ReadSection(SECTIONS[2], wkList);
2307 if Length(FBoardColumnWidth) <> wkList.Count then begin
2308 memIni.EraseSection(SECTIONS[2]);
2309 end;
2310 for i := 0 to High(FBoardColumnWidth) do begin
2311 BoardColumnWidth[i] := memIni.ReadInteger(SECTIONS[2],
2312 'ID' + IntToStr(i), DEFAULT_BOARD_WIDTH[i]);
2313 if BoardColumnWidth[i] > MAX_WIDTH then
2314 BoardColumnWidth[i] := DEFAULT_BOARD_WIDTH[i];
2315 end;
2316 finally
2317 wkList.Free;
2318 end;
2319 end;
2320 end;
2321 //! ?????眼?????鴻??????????綺顄??粋昭??/span>
2322 procedure TSetting.ReadOrdColumn(memIni: TMemIniFile);
2323 var
2324 wkList : TStringList;
2325 wkStr : string;
2326 i, id, code : Integer;
2327 begin
2328 if (memIni <> nil) then begin
2329 wkList := TStringList.Create;
2330 try
2331 memIni.ReadSection( 'BBSColumnOrder', wkList );
2332 for i := 0 to wkList.Count - 1 do begin
2333 wkStr := memIni.ReadString( 'BBSColumnOrder', 'ID' + IntToStr( i ), '' );
2334 Val( wkStr, id, code );
2335 if code = 0 then
2336 FBBSColumnOrder.Add( TGikoBBSColumnID( id ) );
2337 end;
2338 if FBBSColumnOrder.Count = 0 then begin
2339 // 荐?????<?????т???
2340 for i := 0 to Integer( High( TGikoBBSColumnID ) ) do
2341 FBBSColumnOrder.Add( TGikoBBSColumnID( i ) );
2342 end;
2343
2344 memIni.ReadSection( 'CategoryColumnOrder', wkList );
2345 for i := 0 to wkList.Count - 1 do begin
2346 wkStr := memIni.ReadString( 'CategoryColumnOrder', 'ID' + IntToStr( i ), '' );
2347 Val( wkStr, id, code );
2348 if code = 0 then
2349 FCategoryColumnOrder.Add( TGikoCategoryColumnID( id ) );
2350 end;
2351 if FCategoryColumnOrder.Count = 0 then begin
2352 // 荐?????<?????т???
2353 for i := 0 to Integer( High( TGikoCategoryColumnID ) ) do
2354 FCategoryColumnOrder.Add( TGikoCategoryColumnID( i ) );
2355 end;
2356
2357 memIni.ReadSection( 'BoardColumnOrder', wkList );
2358 for i := 0 to wkList.Count - 1 do begin
2359 wkStr := memIni.ReadString( 'BoardColumnOrder', 'ID' + IntToStr( i ), '' );
2360 Val( wkStr, id, code );
2361 if code = 0 then
2362 FBoardColumnOrder.Add( TGikoBoardColumnID( id ) );
2363 end;
2364 if FBoardColumnOrder.Count = 0 then begin
2365 // 荐?????<?????т???
2366 for i := 0 to Integer( High( TGikoBoardColumnID ) ) do begin
2367 // ?≪???????????????????????ч??茵?ず??????
2368 if ( i <> Ord(gbcVigor) ) then begin
2369 FBoardColumnOrder.Add( TGikoBoardColumnID( i ) );
2370 end;
2371 end;
2372 end;
2373 finally
2374 wkList.Free;
2375 end;
2376 end;
2377 end;
2378
2379 function TSetting.GetCSSFileName: string;
2380 begin
2381 Result := FSkinFiles.FileName;
2382 end;
2383
2384 end.
2385

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