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.62 - (hide annotations) (download) (as text)
Tue Sep 7 14:52:26 2004 UTC (19 years, 7 months ago) by yoffy
Branch: MAIN
Changes since 1.61: +69 -0 lines
File MIME type: text/x-pascal
スレリストカラムの ID を追加。
将来的には、ここにカラムの順序を保存するようにする。

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

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