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.138 - (show annotations) (download) (as text)
Sat Mar 28 05:59:56 2009 UTC (15 years ago) by h677
Branch: MAIN
CVS Tags: v1_60_0_788, v1_60_0_789, v1_60_0_787, v1_60_0_792, v1_60_0_791, v1_60_0_790
Changes since 1.137: +4 -13 lines
File MIME type: text/x-pascal
サウンドの設定ファイルの指定で、デフォルトを相対パスに変更。
実行ディレクトリより下のファイルを指定した場合、相対パスで保存するように変更。

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

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