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.17 - (hide annotations) (download) (as text)
Thu Nov 6 07:53:08 2003 UTC (20 years, 5 months ago) by yoffy
Branch: MAIN
Changes since 1.16: +2 -2 lines
File MIME type: text/x-pascal
・初期設定の読み出し時に UseSkin プロパティが更新されないバグを修正。

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

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