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.24 - (hide annotations) (download) (as text)
Wed Jan 7 12:07:27 2004 UTC (20 years, 3 months ago) by h677
Branch: MAIN
Changes since 1.23: +1 -0 lines
File MIME type: text/x-pascal
Editor(書き込みフォーム)のショートカットキーの設定を行えるようにした。

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

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