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.29 - (hide annotations) (download) (as text)
Wed Mar 10 12:22:44 2004 UTC (20 years, 1 month ago) by h677
Branch: MAIN
Changes since 1.28: +11 -0 lines
File MIME type: text/x-pascal
スレ作成日をログアリのみ、未来スレは表示しないというオプションを追加

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

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