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.43 - (show annotations) (download) (as text)
Sat Jun 19 13:37:23 2004 UTC (19 years, 10 months ago) by h677
Branch: MAIN
CVS Tags: v1_48_0_510
Changes since 1.42: +10 -1 lines
File MIME type: text/x-pascal
ブラウザタブ非表示の時のスレ一覧選択のTimerの秒数の設定項目追加

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

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