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.105 - (show annotations) (download) (as text)
Sat Feb 18 15:31:13 2006 UTC (18 years, 2 months ago) by h677
Branch: MAIN
CVS Tags: v1_52_0_646, v1_52_0_645
Changes since 1.104: +1 -1 lines
File MIME type: text/x-pascal
スレッド一覧DL後のソートのデフォルト設定を”しない”に変更

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

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