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.75 - (show annotations) (download) (as text)
Mon Oct 11 15:59:17 2004 UTC (19 years, 6 months ago) by yoffy
Branch: MAIN
Changes since 1.74: +9 -0 lines
File MIME type: text/x-pascal
- マウスジェスチャーを使うか設定できるようになった。
- レスエディタもマウスジェスチャに対応。
※todo:メインとレスエディタの両方のジェスチャを混在させると AV が発生するので、
 GikoSys.Setting.Gestures をそれぞれのウィンドウ用に用意する必要がありそう。

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

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