Develop and Download Open Source Software

Browse CVS Repository

Annotation of /gikonavigoeson/gikonavi/Setting.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.77 - (hide annotations) (download) (as text)
Sun Oct 17 16:09:42 2004 UTC (19 years, 6 months ago) by genyakun
Branch: MAIN
Changes since 1.76: +23 -2 lines
File MIME type: text/x-pascal
ローカル・リモートフシアナ警告オプションを追加

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

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