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.34 - (hide annotations) (download) (as text)
Fri Apr 9 04:00:35 2004 UTC (20 years ago) by yoffy
Branch: MAIN
CVS Tags: b47
Branch point for: BRANCH_TORA
Changes since 1.33: +7 -7 lines
File MIME type: text/x-pascal
・過去ログの URL が正しく扱えない問題を修正(?)。

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

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