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.21 - (hide annotations) (download) (as text)
Sun Dec 14 15:55:52 2003 UTC (20 years, 4 months ago) by h677
Branch: MAIN
Changes since 1.20: +4 -0 lines
File MIME type: text/x-pascal
証明書切れ問題用強制ログインモード作成

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

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