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.31 - (hide annotations) (download) (as text)
Tue Mar 23 15:27:56 2004 UTC (20 years, 1 month ago) by h677
Branch: MAIN
Changes since 1.30: +6 -1 lines
File MIME type: text/x-pascal
Samba24対策

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

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