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.107 - (show annotations) (download) (as text)
Sun Feb 26 16:40:51 2006 UTC (18 years, 1 month ago) by h677
Branch: MAIN
CVS Tags: v1_52_0_651, v1_52_0_650, v1_52_0_652
Changes since 1.106: +27 -0 lines
File MIME type: text/x-pascal
DAT中にnullがあっても切れないように修正。
取得済みのスレッドへのJumpを修正。
入力アシストのフォーム位置保存。

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

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