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.82 - (show annotations) (download) (as text)
Mon Oct 25 13:51:55 2004 UTC (19 years, 5 months ago) by h677
Branch: MAIN
Changes since 1.81: +1 -1 lines
File MIME type: text/x-pascal
TimeOutのデフォルトを10秒に変更

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

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