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.76 - (show annotations) (download) (as text)
Tue Oct 12 01:21:04 2004 UTC (19 years, 6 months ago) by genyakun
Branch: MAIN
Changes since 1.75: +5 -1 lines
File MIME type: text/x-pascal
2ch言語機構を一部搭載

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

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