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.47 - (hide annotations) (download) (as text)
Tue Jul 13 14:05:21 2004 UTC (19 years, 9 months ago) by genyakun
Branch: MAIN
Changes since 1.46: +14 -1 lines
File MIME type: text/x-pascal
Tab自動保存・復元ルーチン追加(復元機能は未完全)

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

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