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.73 - (hide annotations) (download) (as text)
Wed Sep 29 16:05:06 2004 UTC (19 years, 6 months ago) by h677
Branch: MAIN
CVS Tags: b49, v1_49_0_548, v1_49_0_554, v1_49_0_551, v1_49_0_552, v1_49_0_553, v1_49_2_569
Branch point for: Bb49
Changes since 1.72: +1 -1 lines
File MIME type: text/x-pascal
「Space-> 」機能のデフォルトをOFFに設定

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 yoffy 1.34 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.34 SAMBATIME_FILE_NAME : String = 'Samba.ini';
34 h677 1.35 IGNORE_FILE_NAME : String = 'Ignore.txt';
35 h677 1.37 // DOLIB_LOGIN_URL = '/~tora3n2c/futen.cgi';
36 q9_ 1.45 MAX_POPUP_RES : Integer = 10;
37 hi_ 1.1 type
38     TGikoTabPosition = (gtpTop, gtpBottom); // ?帥??篏?臀?/span>
39     TGikoTabAppend = (gtaFirst, gtpLast); // ?帥??菴遵??篏?臀?/span>
40     TGikoTabStyle = (gtsTab, gtsButton, gtsFlat); // ?帥???鴻?帥?ゃ??/span>
41     TGikoListOrientation = (gloHorizontal, gloVertical); // ???鴻?????眼?紙梓綛?/span>
42     TGikoListState = (glsMax, glsNormal, glsMin); // ???鴻???泣?ゃ?榊?倶??
43     // ???????≪????茵?ず篏?臀?/span>
44     TGikoPopupPosition = (gppRightTop, gppTop, gppLeftTop,
45     gppRight, gppCenter, gppLeft,
46     gppRightBottom, gppBottom, gppLeftBottom);
47     //???????ャ?若?泣?ゃ??/span>
48     TGikoPreviewSize = (gpsXLarge, gpsLarge, gpsMedium, gpsSmall, gpsXSmall);
49 yoffy 1.39 TGikoBrowserAutoMaximize = (gbmNone, gbmClick, gbmDoubleClick);
50     // ???????吟????????????紊у???????>散
51 yoffy 1.49 /// ???壕;腓榊??蚊??10 ?? 65535 ????? n ???号?宴????
52     /// 絨?? 201-300 ??????????蚊?????????????醇?с?????????篏? 2 byte ???膣???
53     TGikoResRange = (grrAll, grrSelect, grrKoko, grrNew);
54 hi_ 1.1
55 yoffy 1.55 /// ?鴻??????筝?荀ц;腓榊???/span>
56     TGikoThreadRange = (gtrAll, gtrSelect, gtrLog, gtrNew);
57    
58 yoffy 1.62 /// ?????眼?????鴻?????????? ID
59     type TGikoBBSColumnID = (gbbscTitle);
60 yoffy 1.63 /// ?????眼?????鴻????????????
61 yoffy 1.65 const GikoBBSColumnCaption : array[0..0] of string =
62 yoffy 1.62 ( '?????眼????' );
63 yoffy 1.63 /// ?????眼?????鴻????????????
64     type TGikoBBSColumnList = class( TList )
65     private
66     function GetItem( index : integer ) : TGikoBBSColumnID;
67     procedure SetItem( index : integer; value : TGikoBBSColumnID);
68     public
69     constructor Create;
70 yoffy 1.68 destructor Destroy; override;
71 yoffy 1.63 function Add( value : TGikoBBSColumnID ) : Integer;
72 yoffy 1.64 property Items[index : integer]: TGikoBBSColumnID read GetItem write SetItem; default;
73 yoffy 1.63 end;
74 yoffy 1.62 /// ?帥???鴻?????????? ID
75 yoffy 1.65 type TGikoCategoryColumnID = (gccTitle, gccRoundName, gccLastModified);
76 yoffy 1.62 /// ?帥???鴻????????????
77 yoffy 1.65 const GikoCategoryColumnCaption : array[0..2] of string =
78     ( '?水??', '綏≦??篋?膣?', '??緇??ユ??' );
79 yoffy 1.63 /// ?帥???鴻????????????
80     type TGikoCategoryColumnList = class( TList )
81     private
82     function GetItem( index : integer ) : TGikoCategoryColumnID;
83     procedure SetItem( index : integer; value : TGikoCategoryColumnID);
84     public
85     constructor Create;
86 yoffy 1.68 destructor Destroy; override;
87 yoffy 1.63 function Add( value : TGikoCategoryColumnID ) : Integer;
88 yoffy 1.64 property Items[index : integer]: TGikoCategoryColumnID read GetItem write SetItem; default;
89 yoffy 1.63 end;
90 yoffy 1.62 /// ?鴻?????鴻?????????? ID
91     type TGikoBoardColumnID = (gbcTitle, gbcAllCount, gbcLocalCount, gbcNonAcqCount,
92 h677 1.70 gbcNewCount, gbcUnReadCount, gbcRoundName, gbcRoundDate, gbcCreated, gbcLastModified );{gbcLastModified,}
93 yoffy 1.62 /// ?鴻?????鴻????????????
94 h677 1.70 const GikoBoardColumnCaption : array[0..9] of string =
95 yoffy 1.62 ( '?鴻????????', '?????潟??', '??緇?', '????', '?亥??',
96 h677 1.70 '???', '綏≦??篋?膣?', '??緇??ユ??', '?鴻??????ユ??', '??腟??贋?井?ユ??' );
97     const GikoBoardColumnAlignment : array[0..9] of TAlignment = (
98 yoffy 1.65 taLeftJustify, taRightJustify, taRightJustify, taRightJustify,
99     taRightJustify, taRightJustify, taLeftJustify, taLeftJustify,
100 h677 1.70 taLeftJustify, taLeftJustify);
101 yoffy 1.63 /// ?鴻?????鴻????????????
102     type TGikoBoardColumnList = class( TList )
103     private
104     function GetItem( index : integer ) : TGikoBoardColumnID;
105     procedure SetItem( index : integer; value : TGikoBoardColumnID);
106     public
107     constructor Create;
108 yoffy 1.68 destructor Destroy; override;
109 yoffy 1.63 function Add( value : TGikoBoardColumnID ) : Integer;
110 yoffy 1.64 property Items[index : integer]: TGikoBoardColumnID read GetItem write SetItem; default;
111 yoffy 1.63 end;
112 yoffy 1.62
113     type
114 hi_ 1.1 //CoolBar荐?????潟?若??
115     TCoolSet = record
116     FCoolID: Integer;
117     FCoolWidth: Integer;
118     FCoolBreak: Boolean;
119     end;
120    
121     TSetting = class(TObject)
122     private
123     //??篆<???????<?泣?ゃ??/span>
124     FRecvBufferSize: Integer;
125     //HTTP1.1篏睡??/span>
126     FProtocol: Boolean;
127     //???????傑・膓?HTTP1.1篏睡??/span>
128     FProxyProtocol: Boolean;
129    
130     //???????件?茯?昭???
131     FReadProxy: Boolean;
132     FReadProxyAddress: string;
133     FReadProxyPort: Integer;
134     FReadProxyUserID: string;
135     FReadProxyPassword: string;
136    
137     //???????件??梧昭???
138     FWriteProxy: Boolean;
139     FWriteProxyAddress: string;
140     FWriteProxyPort: Integer;
141     FWriteProxyUserID: string;
142     FWriteProxyPassword: string;
143    
144     //???c????????
145     FCabinetFontName: string;
146     FCabinetFontSize: Integer;
147     FCabinetFontBold: Boolean;
148     FCabinetFontItalic: Boolean;
149     FCabinetFontColor: TColor;
150     FCabinetBackColor: TColor;
151    
152     //???鴻??
153     FListFontName: string;
154     FListFontSize: Integer;
155     FListFontBold: Boolean;
156     FListFontItalic: Boolean;
157     FListFontColor: TColor;
158     FListBackColor: TColor;
159    
160     //????????/span>
161 yoffy 1.6 FBrowserFontName: string; // ''...default
162     FBrowserFontSize: Integer; // 0...default
163     FBrowserFontBold: Integer; // 0...default, -1...False, 1...True
164     FBrowserFontItalic: Integer; // 筝???????
165 yoffy 1.14 FBrowserFontColor: Integer; // -1...default
166     FBrowserBackColor: Integer; // 筝???????
167 hi_ 1.1
168     //?????c??/span>
169     FEditorFontName: string;
170     FEditorFontSize: Integer;
171     FEditorFontBold: Boolean;
172     FEditorFontItalic: Boolean;
173     FEditorFontColor: TColor;
174     FEditorBackColor: TColor;
175    
176     //?帥???????潟??
177     FBrowserTabFontName: string;
178     FBrowserTabFontSize: Integer;
179     FBrowserTabFontBold: Boolean;
180     FBrowserTabFontItalic: Boolean;
181    
182     //???潟?????c?潟????/span>
183     FHintFontName: string;
184     FHintFontSize: Integer;
185     //FHintFontBold: Boolean;
186     //FHintFontItalic: Boolean;
187     FHintFontColor: TColor;
188     FHintBackColor: TColor;
189    
190     //???c?潟?????泣?ゃ??/span>
191     FWindowTop: Integer;
192     FWindowLeft: Integer;
193     FWindowHeight: Integer;
194     FWindowWidth: Integer;
195     FWindowMax: Boolean;
196     //???鴻?????ャ?若?鴻?帥?ゃ??/span>
197     FListStyle: TViewStyle;
198    
199     //???若?????取;腓?/span>
200     FStdToolBarVisible: Boolean;
201     FAddressBarVisible: Boolean;
202     FLinkBarVisible: Boolean;
203     FListToolBarVisible: Boolean;
204     FListNameBarVisible: Boolean;
205     FBrowserToolBarVisible: Boolean;
206     FBrowserNameBarVisible: Boolean;
207    
208     //???????吟?帥??
209     FBrowserTabVisible: Boolean;
210     FBrowserTabPosition: TGikoTabPosition;
211     FBrowserTabAppend: TGikoTabAppend;
212     FBrowserTabStyle: TGikoTabStyle;
213    
214     //?<???祉?若?吾????/span>
215     FMessageBarVisible: Boolean;
216     FMessegeBarHeight: Integer;
217    
218     //?鴻???若?帥?鴻????/span>
219     FStatusBarVisible: Boolean;
220    
221     //???c????????????祉?泣?ゃ??/span>
222     FCabinetVisible: Boolean;
223     FCabinetWidth: Integer;
224    
225     //???鴻???祉???????吟?泣?ゃ??/span>
226     FListOrientation: TGikoListOrientation;
227     FListHeight: Integer;
228     FListHeightState: TGikoListState;
229     FListWidth: Integer;
230     FListWidthState: TGikoListState;
231     // FListHeightMax: Boolean;
232     // FListWidthMax: Boolean;
233    
234     //??篆∞???????祉?<?若??/span>
235     FNameList: TStringList;
236     FMailList: TStringList;
237    
238     //?????c?帥?若???c?潟?????泣?ゃ??/span>
239     FEditWindowTop: Integer;
240     FEditWindowLeft: Integer;
241     FEditWindowHeight: Integer;
242     FEditWindowWidth: Integer;
243     FEditWindowMax: Boolean;
244 deux 1.20 FEditWindowStay: Boolean;
245     FEditWindowTranslucent: Boolean;
246 hi_ 1.1
247     //???鴻????埈;腓?/span>
248     FListViewNo: Boolean;
249     //CSS茵?ず
250     FUseCSS: Boolean;
251     //CSS???<?ゃ????
252     FCSSFileName: string;
253 yoffy 1.14 // ?鴻???活;腓?筝???????????? ini ???絖???????????)
254     FUseSkin: Boolean;
255 hi_ 1.1 //mail罨?茵?ず
256     FShowMail: Boolean;
257 yoffy 1.49 /// ???壕;腓榊???/span>
258 yoffy 1.51 FResRange : Longint;
259     /// 莎桁???????壕;腓榊??蚊???阪?
260     FResRangeHold : Boolean;
261 yoffy 1.55 /// ?鴻??????筝?荀ц;腓榊???/span>
262     FThreadRange : TGikoThreadRange;
263 yoffy 1.2 //???≪?????c???????鴻???????≪????茵?ず
264 hi_ 1.1 FUnActivePopup: Boolean;
265 yoffy 1.2 //???鴻???????≪???????????若???若????
266     FResPopupHeaderBold: Boolean;
267 hi_ 1.1
268     //???違????????
269     FLogFolder: string;
270     FNewLogFolder: string;
271    
272     //???鴻???????????????若?泣?ゃ??/span>
273     FBBSColumnWidth: array[0..0] of Integer;
274 yoffy 1.65 FCategoryColumnWidth: array[0..2] of Integer;
275 h677 1.70 FBoardColumnWidth: array[0..9] of Integer;
276 hi_ 1.1
277 yoffy 1.62 /// ?????眼?????鴻??????????綺?span>
278 yoffy 1.63 FBBSColumnOrder : TGikoBBSColumnList;
279 yoffy 1.62 /// ?帥???鴻??????????綺?span>
280 yoffy 1.63 FCategoryColumnOrder : TGikoCategoryColumnList;
281 yoffy 1.62 /// ?鴻?????鴻??????????綺?span>
282 yoffy 1.63 FBoardColumnOrder : TGikoBoardColumnList;
283 yoffy 1.62
284 q9_ 1.46 //?純?若????
285     FBBSSortIndex: Integer;
286     FBBSSortOrder: Boolean;
287     FCategorySortIndex: Integer;
288     FCategorySortOrder: Boolean;
289     FBoardSortIndex: Integer;
290     FBoardSortOrder: Boolean;
291    
292 q9_ 1.53 //Dat?純?<?鴻???純?若????
293     FDatOchiSortIndex: Integer;
294     FDatOchiSortOrder: Boolean;
295    
296 hi_ 1.1 //腟?莨若?炊??絖???
297     FSelectTextList: TStringList;
298    
299     //?推?荀?RL
300 h677 1.11 //FBoardURL2ch: string;
301 yoffy 1.14 FBoardURLs: TStringList;
302     FBoardURLSelected: Integer;
303 hi_ 1.1
304     //???若??D?祉???鴻???若??
305     FUserID: string;
306     FPassword: string;
307     FAutoLogin: Boolean;
308 h677 1.21 FForcedLogin: Boolean;
309 h677 1.36 FDolibURL: string;
310 hi_ 1.1
311     //URL??????????莎桁???≪????/span>
312     FURLApp: Boolean;
313     FURLAppFile: string;
314    
315     //mailto????????????篏?
316     FOpenMailer: Boolean;
317    
318     //???ょ∈茯?
319     FDeleteMsg: Boolean;
320    
321     //CoolBar鐚??<?ゃ?潟?紙?帥?祉???????駈?
322     FMainCoolBar: array[0..MAIN_COOLBAND_COUNT - 1] of TCoolSet;
323 yoffy 1.2 FListCoolBar: array[0..LIST_COOLBAND_COUNT - 1] of TCoolSet;
324 hi_ 1.1 FBrowserCoolBar: array[0..BROWSER_COOLBAND_COUNT - 1] of TCoolSet;
325    
326     //ToolBar Wrapable
327     FListToolBarWrapable: Boolean;
328     FBrowserToolBarWrapable: Boolean;
329    
330     //???????≪????篏?臀?/span>
331     FPopupPosition: TGikoPopupPosition;
332    
333     //?≪?????鴻????/span>
334     FURLDisplay: Boolean;
335     FAddressBarTabStop: Boolean;
336     FLinkAddAddressBar: Boolean;
337     FAddressHistoryCount: Integer;
338    
339     //?糸????????ャ??/span>
340     FPreviewVisible: Boolean;
341     FPreviewSize: TGikoPreviewSize;
342     FPreviewWait: Integer;
343    
344 yoffy 1.39 // ????????/span>
345     FBrowserAutoMaximize: TGikoBrowserAutoMaximize;
346    
347 hi_ 1.1 //?鴻??????筝?荀ф?贋?違?≪?ゃ?潟?活;腓?/span>
348     FListIconVisible: Boolean;
349    
350 yoffy 1.51 //?鴻??????筝?荀с??og???????鴻?????????帥?鴻??????ャ??茵?ず??????
351     FCreationTimeLogs: Boolean;
352 h677 1.29 //?鴻??????筝?荀с???鴻???????ャ?ф???ャ???鴻?????????ャ??茵?ず??????
353 q9_ 1.44 FFutureThread: Boolean;
354 h677 1.29
355 hi_ 1.1 //?吾??莨若?炊?????激?恰????篏睡??┃絎?
356     FUseMachineTime: Boolean;
357     FTimeAdjustSec: Integer;
358     FTimeAdjust: Boolean;
359    
360 h677 1.11 //???若????
361     FAbonDeleterlo : Boolean; //&rlo;????????
362     FAbonReplaceul : Boolean; //<ul>?帥?違??<br>?帥?違??舟????????
363 yoffy 1.14 FPopUpAbon : Boolean; //???鴻???????≪???????????若????????/span>
364 h677 1.11 FShowNGLinesNum : Boolean; //荅峨?????鐚?磁???若?????<?ゃ??????違??茵?ず
365     FAddResAnchor : Boolean; //NG???鴻?吾?????鴻?≪?潟???若??菴遵??????
366 h677 1.32 FDeleteSyria : Boolean; //?激???∵??????????膈?
367 h677 1.3
368 h677 1.11 // ?鴻??????腟?莨若???c?若???????
369     FSelectComboBoxWidth : Integer;
370 yoffy 1.5
371 h677 1.11 // ??緇????御?????????????激?с?潟???ゃ?≪???違???帥??
372     FOptionDialogTabIndex: Integer;
373 yoffy 1.8
374 h677 1.11 // ??緇????御???????????c????????
375     FCabinetIndex: Integer;
376 yoffy 1.8
377 yoffy 1.14 //腟?篋?????∈茯????ゃ?≪???違??茵?ず??????
378     FShowDialogForEnd : Boolean;
379 h677 1.38 //???????帥????????????????∈茯????ゃ?≪???違??茵?ず????
380     FShowDialogForAllTabClose: Boolean;
381 h677 1.19 //??緇????号?違???鴻???????????号?違???違???c??????????絽梧?????蚊?????c???蚊???????蚊??篏睡????????
382     FUseOddColorOddResNum: Boolean;
383     FOddColor: TColor;
384 h677 1.13
385 h677 1.33 //Samba24絲丞?罘??純??篏帥????
386     FUseSamba: Boolean;
387 h677 1.36
388 h677 1.38 //???鴻?≪?潟???若???????????????吾?c?潟????????
389     FResAnchorJamp: Boolean;
390    
391 genyakun 1.47 //Tab????篆?絖?
392 genyakun 1.56 FTabAutoLoadSave : Boolean;
393 genyakun 1.71
394     //???<????茯?罅????泣???若??罘???/span>
395     F2chSupport : Boolean;
396    
397 yoffy 1.40 // ?????c??/span>
398 yoffy 1.41 FSpaceToNBSP : Boolean; ///< ??茹??鴻???若?鴻??Tab ?? &nbsp; ??舟??
399     FAmpToCharRef : Boolean; ///< '&' ?? &amp; ??舟??
400 h677 1.43
401     //???????吟?帥????茵?ず???????鴻???荀с?с?????若?純?????主Щ?????≦??????
402     FSelectInterval : Integer;
403 h677 1.67
404     //KuroutSettingTab 荅括完荐???帥????ctiveTab
405     FKuroutSettingTabIndex: Integer;
406 yoffy 1.40
407 hi_ 1.1 function GetMainCoolSet(Index: Integer): TCoolSet;
408     function GetBoardCoolSet(Index: Integer): TCoolSet;
409     function GetBrowserCoolSet(Index: Integer): TCoolSet;
410     procedure SetMainCoolSet(Index: Integer; CoolSet: TCoolSet);
411     procedure SetBoardCoolSet(Index: Integer; CoolSet: TCoolSet);
412     procedure SetBrowserCoolSet(Index: Integer; CoolSet: TCoolSet);
413    
414     function GetBBSColumnWidth(index: Integer): Integer;
415     function GetCategoryColumnWidth(index: Integer): Integer;
416     function GetBoardColumnWidth(index: Integer): Integer;
417     procedure SetBBSColumnWidth(index: Integer; value: Integer);
418     procedure SetCategoryColumnWidth(index: Integer; value: Integer);
419     procedure SetBoardColumnWidth(index: Integer; value: Integer);
420    
421     function GetSoundName(Index: Integer): string;
422     function GetSoundViewName(Index: Integer): string;
423     function GetSoundFileName(Index: Integer): string;
424     procedure SetSoundFileName(Index: Integer; value: string);
425     function Encrypt(s: string): string;
426     function Decrypt(s: string): string;
427 h677 1.11
428 yoffy 1.14 procedure MakeURLIniFile();
429    
430     procedure SetUseCSS( value: Boolean );
431     procedure SetCSSFileName( fileName: string );
432 hi_ 1.1 protected
433    
434     public
435     constructor Create;
436     destructor Destroy; override;
437     function GetFileName: string;
438 yoffy 1.14 function GetBoardURLFileName: string;
439 hi_ 1.1 procedure ReadSettingFile;
440 yoffy 1.14 procedure ReadBoardURLsFile;
441 hi_ 1.1 procedure WriteSystemSettingFile;
442     procedure WriteWindowSettingFile;
443     procedure WriteNameMailSettingFile;
444     procedure WriteFolderSettingFile();
445 yoffy 1.14 procedure WriteBoardURLSettingFile;
446 hi_ 1.1 function GetSoundCount: Integer;
447     function FindSoundFileName(Name: string): string;
448    
449 yoffy 1.14 function GetBoardFileName: string;
450     function GetCustomBoardFileName: string;
451 yoffy 1.18 function GetBoardDir: string;
452 yoffy 1.14 function GetHtmlTempFileName: string;
453     function GetAppDir: string;
454     function GetTempFolder: string;
455     function GetSentFileName: string;
456     function GetConfigDir: string;
457     function GetSkinDir: string;
458     function GetSkinHeaderFileName: string;
459     function GetSkinFooterFileName: string;
460     function GetSkinResFileName: string;
461     function GetSkinNewResFileName: string;
462     function GetSkinBookmarkFileName: string;
463     function GetSkinNewmarkFileName: string;
464     function GetStyleSheetDir: string;
465     function GetOutBoxFileName: string;
466 yoffy 1.15 function GetNGWordsDir: string;
467 yoffy 1.16 function GetBoardPlugInDir: string;
468 h677 1.35 function GetSambaFileName: string;
469     function GetIgnoreFileName: string;
470 yoffy 1.14
471 hi_ 1.1 //??篆<???????<?泣?ゃ??/span>
472     property RecvBufferSize: Integer read FRecvBufferSize write FRecvBufferSize;
473     //HTTP1.1篏睡??/span>
474     property Protocol: Boolean read FProtocol write FProtocol;
475     //???????傑・膓?HTTP1.1篏睡??/span>
476     property ProxyProtocol: Boolean read FProxyProtocol write FProxyProtocol;
477    
478     property ReadProxy: Boolean read FReadProxy write FReadProxy;
479     property ReadProxyAddress: string read FReadProxyAddress write FReadProxyAddress;
480     property ReadProxyPort: Integer read FReadProxyPort write FReadProxyPort;
481     property ReadProxyUserID: string read FReadProxyUserID write FReadProxyUserID;
482     property ReadProxyPassword: string read FReadProxyPassword write FReadProxyPassword;
483    
484     property WriteProxy: Boolean read FWriteProxy write FWriteProxy;
485     property WriteProxyAddress: string read FWriteProxyAddress write FWriteProxyAddress;
486     property WriteProxyPort: Integer read FWriteProxyPort write FWriteProxyPort;
487     property WriteProxyUserID: string read FWriteProxyUserID write FWriteProxyUserID;
488     property WriteProxyPassword: string read FWriteProxyPassword write FWriteProxyPassword;
489    
490     property CabinetFontName: string read FCabinetFontName write FCabinetFontName;
491     property CabinetFontSize: Integer read FCabinetFontSize write FCabinetFontSize;
492     property CabinetFontBold: Boolean read FCabinetFontBold write FCabinetFontBold;
493     property CabinetFontItalic: Boolean read FCabinetFontItalic write FCabinetFontItalic;
494     property CabinetFontColor: TColor read FCabinetFontColor write FCabinetFontColor;
495     property CabinetBackColor: TColor read FCabinetBackColor write FCabinetBackColor;
496    
497     property ListFontName: string read FListFontName write FListFontName;
498     property ListFontSize: Integer read FListFontSize write FListFontSize;
499     property ListFontBold: Boolean read FListFontBold write FListFontBold;
500     property ListFontItalic: Boolean read FListFontItalic write FListFontItalic;
501     property ListFontColor: TColor read FListFontColor write FListFontColor;
502     property ListBackColor: TColor read FListBackColor write FListBackColor;
503    
504 yoffy 1.6 property BrowserFontName: string read FBrowserFontName write FBrowserFontName;
505     property BrowserFontSize: Integer read FBrowserFontSize write FBrowserFontSize;
506     property BrowserFontBold: Integer read FBrowserFontBold write FBrowserFontBold;
507     property BrowserFontItalic: Integer read FBrowserFontItalic write FBrowserFontItalic;
508     property BrowserFontColor: Integer read FBrowserFontColor write FBrowserFontColor;
509     property BrowserBackColor: Integer read FBrowserBackColor write FBrowserBackColor;
510 hi_ 1.1
511     property EditorFontName: string read FEditorFontName write FEditorFontName;
512     property EditorFontSize: Integer read FEditorFontSize write FEditorFontSize;
513     property EditorFontBold: Boolean read FEditorFontBold write FEditorFontBold;
514     property EditorFontItalic: Boolean read FEditorFontItalic write FEditorFontItalic;
515     property EditorFontColor: TColor read FEditorFontColor write FEditorFontColor;
516     property EditorBackColor: TColor read FEditorBackColor write FEditorBackColor;
517    
518     property BrowserTabFontName: string read FBrowserTabFontName write FBrowserTabFontName;
519     property BrowserTabFontSize: Integer read FBrowserTabFontSize write FBrowserTabFontSize;
520     property BrowserTabFontBold: Boolean read FBrowserTabFontBold write FBrowserTabFontBold;
521     property BrowserTabFontItalic: Boolean read FBrowserTabFontItalic write FBrowserTabFontItalic;
522    
523     property HintFontName: string read FHintFontName write FHintFontName;
524     property HintFontSize: Integer read FHintFontSize write FHintFontSize;
525     //property HintFontBold: Boolean read FHintFontBold write FHintFontBold;
526     //property HintFontItalic: Boolean read FHintFontItalic write FHintFontItalic;
527     property HintFontColor: TColor read FHintFontColor write FHintFontColor;
528     property HintBackColor: TColor read FHintBackColor write FHintBackColor;
529    
530     property WindowTop: Integer read FWindowTop write FWindowTop;
531     property WindowLeft: Integer read FWindowLeft write FWindowLeft;
532     property WindowHeight: Integer read FWindowHeight write FWindowHeight;
533     property WindowWidth: Integer read FWindowWidth write FWindowWidth;
534     property WindowMax: Boolean read FWindowMax write FWindowMax;
535     property ListStyle: TViewStyle read FListStyle write FListStyle;
536    
537     property StdToolBarVisible: Boolean read FStdToolBarVisible write FStdToolBarVisible;
538     property AddressBarVisible: Boolean read FAddressBarVisible write FAddressBarVisible;
539     property LinkBarVisible: Boolean read FLinkBarVisible write FLinkBarVisible;
540     property ListToolBarVisible: Boolean read FListToolBarVisible write FListToolBarVisible;
541     property ListNameBarVisible: Boolean read FListNameBarVisible write FListNameBarVisible;
542     property BrowserToolBarVisible: Boolean read FBrowserToolBarVisible write FBrowserToolBarVisible;
543     property BrowserNameBarVisible: Boolean read FBrowserNameBarVisible write FBrowserNameBarVisible;
544    
545     property BrowserTabVisible: Boolean read FBrowserTabVisible write FBrowserTabVisible;
546     property BrowserTabPosition: TGikoTabPosition read FBrowserTabPosition write FBrowserTabPosition;
547     property BrowserTabAppend: TGikoTabAppend read FBrowserTabAppend write FBrowserTabAppend;
548     property BrowserTabStyle: TGikoTabStyle read FBrowserTabStyle write FBrowserTabStyle;
549    
550     property MessageBarVisible: Boolean read FMessageBarVisible write FMessageBarVisible;
551     property MessegeBarHeight: Integer read FMessegeBarHeight write FMessegeBarHeight;
552    
553     property StatusBarVisible: Boolean read FStatusBarVisible write FStatusBarVisible;
554    
555     property CabinetVisible: Boolean read FCabinetVisible write FCabinetVisible;
556     property CabinetWidth: Integer read FCabinetWidth write FCabinetWidth;
557    
558     property ListOrientation: TGikoListOrientation read FListOrientation write FListOrientation;
559     property ListHeight: Integer read FListHeight write FListHeight;
560     property ListHeightState: TGikoListState read FListHeightState write FListHeightState;
561     property ListWidth: Integer read FListWidth write FListWidth;
562     property ListWidthState: TGikoListState read FListWidthState write FListWidthState;
563     // property ListHeightMax: Boolean read FListHeightMax write FListHeightMax;
564     // property ListWidthMax: Boolean read FListWidthMax write FListWidthMax;
565    
566     property NameList: TStringList read FNameList write FNameList;
567     property MailList: TStringList read FMailList write FMailList;
568     property SelectTextList: TStringList read FSelectTextList write FSelectTextList;
569    
570     property EditWindowTop: Integer read FEditWindowTop write FEditWindowTop;
571     property EditWindowLeft: Integer read FEditWindowLeft write FEditWindowLeft;
572     property EditWindowHeight: Integer read FEditWindowHeight write FEditWindowHeight;
573     property EditWindowWidth: Integer read FEditWindowWidth write FEditWindowWidth;
574     property EditWindowMax: Boolean read FEditWindowMax write FEditWindowMax;
575 deux 1.20 property EditWindowStay: Boolean read FEditWindowStay write FEditWindowStay;
576 h677 1.38 property EditWindowTranslucent: Boolean read FEditWindowTranslucent write FEditWindowTranslucent;
577 hi_ 1.1
578     property ListViewNo: Boolean read FListViewNo write FListViewNo;
579 yoffy 1.14 property UseCSS: Boolean read FUseCSS write SetUseCSS;
580     property CSSFileName: string read FCSSFileName write SetCSSFileName;
581     property UseSkin: Boolean read FUseSkin;
582 hi_ 1.1
583     property ShowMail: Boolean read FShowMail write FShowMail;
584 yoffy 1.49 property ResRange : Longint read FResRange write FResRange;
585 yoffy 1.51 property ResRangeHold : Boolean read FResRangeHold write FResRangeHold;
586 yoffy 1.55 property ThreadRange : TGikoThreadRange read FThreadRange write FThreadRange;
587 hi_ 1.1 property UnActivePopup: Boolean read FUnActivePopup write FUnActivePopup;
588 yoffy 1.2 property ResPopupHeaderBold: Boolean read FResPopupHeaderBold write FResPopupHeaderBold;
589 hi_ 1.1
590     property LogFolder: string read FLogFolder write FLogFolder;
591     property NewLogFolder: string read FNewLogFolder write FNewLogFolder;
592    
593     property BBSColumnWidth[index: Integer]: Integer read GetBBSColumnWidth write SetBBSColumnWidth;
594     property CategoryColumnWidth[index: Integer]: Integer read GetCategoryColumnWidth write SetCategoryColumnWidth;
595     property BoardColumnWidth[index: Integer]: Integer read GetBoardColumnWidth write SetBoardColumnWidth;
596    
597 yoffy 1.63 property BBSColumnOrder : TGikoBBSColumnList read FBBSColumnOrder write FBBSColumnOrder;
598     property CategoryColumnOrder : TGikoCategoryColumnList read FCategoryColumnOrder write FCategoryColumnOrder;
599     property BoardColumnOrder : TGikoBoardColumnList read FBoardColumnOrder write FBoardColumnOrder;
600 yoffy 1.62
601 hi_ 1.1 property SoundName[index: Integer]: string read GetSoundName;
602     property SoundViewName[index: Integer]: string read GetSoundViewName;
603     property SoundFileName[index: Integer]: string read GetSoundFileName write SetSoundFileName;
604    
605 q9_ 1.46 property BBSSortIndex: Integer read FBBSSortIndex write FBBSSortIndex;
606     property BBSSortOrder: Boolean read FBBSSortOrder write FBBSSortOrder;
607     property CategorySortIndex: Integer read FCategorySortIndex write FCategorySortIndex;
608     property CategorySortOrder: Boolean read FCategorySortOrder write FCategorySortOrder;
609     property BoardSortIndex: Integer read FBoardSortIndex write FBoardSortIndex;
610     property BoardSortOrder: Boolean read FBoardSortOrder write FBoardSortOrder;
611    
612 q9_ 1.53 property DatOchiSortIndex: Integer read FDatOchiSortIndex write FDatOchiSortIndex;
613     property DatOchiSortOrder: Boolean read FDatOchiSortOrder write FDatOchiSortOrder;
614    
615 h677 1.11 //property BoardURL2ch: string read FBoardURL2ch write FBoardURL2ch;
616     property BoardURLs: TStringList read FBoardURLs write FBoardURLs;
617 yoffy 1.14 property BoardURLSelected: Integer read FBoardURLSelected write FBoardURLSelected;
618 hi_ 1.1 property UserID: string read FUserID write FUserID;
619     property Password: string read FPassword write FPassword;
620     property AutoLogin: Boolean read FAutoLogin write FAutoLogin;
621 h677 1.38 property ForcedLogin: Boolean read FForcedLogin write FForcedLogin;
622 h677 1.36 property DolibURL: string read FDolibURL write FDolibURL;
623 hi_ 1.1
624     property URLApp: Boolean read FURLApp write FURLApp;
625     property URLAppFile: string read FURLAppFile write FURLAppFile;
626    
627     property OpenMailer: Boolean read FOpenMailer write FOpenMailer;
628    
629     property DeleteMsg: Boolean read FDeleteMsg write FDeleteMsg;
630    
631     property MainCoolSet[Index: Integer]: TCoolSet read GetMainCoolSet write SetMainCoolSet;
632     property ListCoolSet[Index: Integer]: TCoolSet read GetBoardCoolSet write SetBoardCoolSet;
633     property BrowserCoolSet[Index: Integer]: TCoolSet read GetBrowserCoolSet write SetBrowserCoolSet;
634    
635     property ListToolBarWrapable: Boolean read FListToolBarWrapable write FListToolBarWrapable;
636     property BrowserToolBarWrapable: Boolean read FBrowserToolBarWrapable write FBrowserToolBarWrapable;
637    
638     property PopupPosition: TGikoPopupPosition read FPopupPosition write FPopupPosition;
639    
640     property URLDisplay: Boolean read FURLDisplay write FURLDisplay;
641     property AddressBarTabStop: Boolean read FAddressBarTabStop write FAddressBarTabStop;
642     property LinkAddAddressBar: Boolean read FLinkAddAddressBar write FLinkAddAddressBar;
643     property AddressHistoryCount: Integer read FAddressHistoryCount write FAddressHistoryCount;
644    
645     property PreviewVisible: Boolean read FPreviewVisible write FPreviewVisible;
646     property PreviewSize: TGikoPreviewSize read FPreviewSize write FPreviewSize;
647     property PreviewWait: Integer read FPreviewWait write FPreviewWait;
648 yoffy 1.39 property BrowserAutoMaximize: TGikoBrowserAutoMaximize read FBrowserAutoMaximize write FBrowserAutoMaximize;
649 hi_ 1.1
650     property ListIconVisible: Boolean read FListIconVisible write FListIconVisible;
651 h677 1.38 property CreationTimeLogs: Boolean read FCreationTimeLogs write FCreationTimeLogs;
652     property FutureThread: Boolean read FFutureThread write FFutureThread;
653 hi_ 1.1
654     property UseMachineTime: Boolean read FUseMachineTime write FUseMachineTime;
655     property TimeAdjustSec: Integer read FTimeAdjustSec write FTimeAdjustSec;
656     property TimeAdjust: Boolean read FTimeAdjust write FTimeAdjust;
657 h677 1.3
658 yoffy 1.14 //???若????
659     property AbonDeleterlo : Boolean read FAbonDeleterlo write FAbonDeleterlo;
660     property AbonReplaceul : Boolean read FAbonReplaceul write FAbonReplaceul;
661     property PopUpAbon : Boolean read FPopUpAbon write FPopUpAbon;
662     property ShowNGLinesNum : Boolean read FShowNGLinesNum write FShowNGLinesNum;
663     property AddResAnchor : Boolean read FAddResAnchor write FAddResAnchor;
664 h677 1.38 property DeleteSyria : Boolean read FDeleteSyria write FDeleteSyria;
665 yoffy 1.14 // ?鴻??????腟?莨若???c?若???????
666     property SelectComboBoxWidth : Integer read FSelectComboBoxWidth write FSelectComboBoxWidth;
667 yoffy 1.8
668 yoffy 1.14 // ??緇????御?????????????激?с?潟???ゃ?≪???違???帥??
669     property OptionDialogTabIndex : Integer read FOptionDialogTabIndex write FOptionDialogTabIndex;
670 yoffy 1.8
671 yoffy 1.14 // ??緇????御???????????c????????
672     property CabinetIndex : Integer read FCabinetIndex write FCabinetIndex;
673 h677 1.13
674 yoffy 1.14 //腟?篋?????∈茯????ゃ?≪???違??茵?ず??????
675     property ShowDialogForEnd : Boolean read FShowDialogForEnd write FShowDialogForEnd;
676 h677 1.38 property ShowDialogForAllTabClose: Boolean read FShowDialogForAllTabClose write FShowDialogForAllTabClose;
677     //??緇????号?違???鴻???????????号?違???違???c??????????絽梧?????蚊?????c???蚊???????蚊??篏睡????????
678     property UseOddColorOddResNum: Boolean read FUseOddColorOddResNum write FUseOddColorOddResNum;
679     property OddColor: TColor read FOddColor write FOddColor;
680 h677 1.36 property UseSamba: Boolean read FUseSamba write FUseSamba;
681 genyakun 1.47 property ResAnchorJamp: Boolean read FResAnchorJamp write FResAnchorJamp;
682 yoffy 1.40
683     // ?????c??/span>
684 yoffy 1.41 property SpaceToNBSP : Boolean read FSpaceToNBSP write FSpaceToNBSP;
685     property AmpToCharRef : Boolean read FAmpToCharRef write FAmpToCharRef;
686 h677 1.43
687     property SelectInterval : Integer read FSelectInterval write FSelectInterval;
688 h677 1.67 //Tab篆?絖?
689     property TabAutoLoadSave: Boolean read FTabAutoLoadSave write FTabAutoLoadSave;
690 genyakun 1.71 property GengoSupport : Boolean read F2chSupport write F2chSupport;
691 h677 1.67 property KuroutSettingTabIndex: Integer read FKuroutSettingTabIndex write FKuroutSettingTabIndex;
692 yoffy 1.40 end;
693 hi_ 1.1
694    
695 h677 1.3
696 hi_ 1.1 implementation
697    
698     type
699     TSoundName = record
700     Name: string;
701     ViewName: string;
702     FileName: string;
703     end;
704    
705     const
706 yoffy 1.14 INI_FILE_NAME: string = 'gikoNavi.ini';
707     BOARD_URL_INI_FILE_NAME: string = 'url.ini';
708     DEFAULT_FONT_NAME: string = '鐚?竺 鐚違?眼?激????#39;;
709     DEFAULT_FONT_SIZE: Integer = 9;
710     DEFAULT_FONT_COLOR: string = 'clWindowText';
711     DEFAULT_WINDOW_COLOR: string = 'clWindow';
712     DEFAULT_TAB_FONT_NAME: string = '鐚?竺 鐚違?眼?激????#39;;
713     DEFAULT_TAB_FONT_SIZE: Integer = 9;
714 h677 1.11 DEFAULT_2CH_BOARD_URL1: string = 'http://www6.ocn.ne.jp/~mirv/2chmenu.html';
715 h677 1.23 DEFAULT_2CH_BOARD_URL2: string = 'http://www.ff.iij4u.or.jp/~ch2/bbsmenu.html';
716 h677 1.22 //http://menu.2ch.net/bbsmenu.html //??????????????罩e????推?荀с??????????
717 hi_ 1.1 //'http://www.2ch.net/newbbsmenu.html';
718 yoffy 1.14 GIKO_ENCRYPT_TEXT: string = 'gikoNaviEncryptText';
719 hi_ 1.1
720     var
721     SOUND_NAME: array[0..4] of TSoundName = (
722 yoffy 1.14 (Name: 'New'; ViewName: '??緇?????'; FileName: ''),
723     (Name: 'NewDiff'; ViewName: '??緇?????(綏???)'; FileName: ''),
724     (Name: 'NoChange'; ViewName: '???贋??#39;; FileName: ''),
725     // (Name: 'RoundEnd'; ViewName: '綏≦??腟?篋?(??緇?????)'; FileName: ''),
726     // (Name: 'RoundNone'; ViewName: '綏≦??腟?篋?(??緇?????)'; FileName: ''),
727     (Name: 'ResEnd'; ViewName: '???拷??篆≦?篋?'; FileName: ''),
728     (Name: 'Error'; ViewName: '??????#39;; FileName: ''));
729 hi_ 1.1
730 yoffy 1.63 constructor TGikoBBSColumnList.Create;
731     begin
732     inherited;
733     end;
734    
735     destructor TGikoBBSColumnList.Destroy;
736     begin
737     inherited;
738     end;
739    
740     function TGikoBBSColumnList.GetItem( index : integer ) : TGikoBBSColumnID;
741     begin
742     Result := TGikoBBSColumnID( inherited Items[ index ] );
743     end;
744    
745     procedure TGikoBBSColumnList.SetItem( index : integer; value : TGikoBBSColumnID);
746     begin
747     inherited Items[ index ] := Pointer( value );
748     end;
749    
750     function TGikoBBSColumnList.Add( value : TGikoBBSColumnID ) : Integer;
751     begin
752     Result := inherited Add( Pointer( value ) );
753     end;
754    
755     constructor TGikoCategoryColumnList.Create;
756     begin
757     inherited;
758     end;
759    
760     destructor TGikoCategoryColumnList.Destroy;
761     begin
762     inherited;
763     end;
764    
765     function TGikoCategoryColumnList.GetItem( index : integer ) : TGikoCategoryColumnID;
766     begin
767     Result := TGikoCategoryColumnID( inherited Items[ index ] );
768     end;
769    
770     procedure TGikoCategoryColumnList.SetItem( index : integer; value : TGikoCategoryColumnID);
771     begin
772     inherited Items[ index ] := Pointer( value );
773     end;
774    
775     function TGikoCategoryColumnList.Add( value : TGikoCategoryColumnID ) : Integer;
776     begin
777     Result := inherited Add( Pointer( value ) );
778     end;
779    
780     constructor TGikoBoardColumnList.Create;
781     begin
782     inherited;
783     end;
784    
785     destructor TGikoBoardColumnList.Destroy;
786     begin
787     inherited;
788     end;
789    
790     function TGikoBoardColumnList.GetItem( index : integer ) : TGikoBoardColumnID;
791     begin
792     Result := TGikoBoardColumnID( inherited Items[ index ] );
793     end;
794    
795     procedure TGikoBoardColumnList.SetItem( index : integer; value : TGikoBoardColumnID);
796     begin
797     inherited Items[ index ] := Pointer( value );
798     end;
799    
800     function TGikoBoardColumnList.Add( value : TGikoBoardColumnID ) : Integer;
801     begin
802     Result := inherited Add( Pointer( value ) );
803     end;
804    
805 hi_ 1.1 //?潟?潟?鴻????????/span>
806     constructor TSetting.Create();
807     begin
808     FNameList := TStringList.Create;
809     FMailList := TStringList.Create;
810     FSelectTextList := TStringList.Create;
811 yoffy 1.14 FBoardURLs := TStringList.Create;
812 yoffy 1.64 FBBSColumnOrder := TGikoBBSColumnList.Create;
813     FCategoryColumnOrder := TGikoCategoryColumnList.Create;
814     FBoardColumnOrder := TGikoBoardColumnList.Create;
815 hi_ 1.1 FNameList.Duplicates := dupIgnore;
816     FMailList.Duplicates := dupIgnore;
817 yoffy 1.14 FBoardURLs.Duplicates := dupIgnore;
818 hi_ 1.1 FSelectTextList.Duplicates := dupIgnore;
819     ReadSettingFile();
820 yoffy 1.14 ReadBoardURLsFile();
821 hi_ 1.1 end;
822    
823     //???鴻????????/span>
824     destructor TSetting.Destroy();
825     begin
826     inherited;
827 yoffy 1.64 FBoardColumnOrder.Free;
828     FCategoryColumnOrder.Free;
829     FBBSColumnOrder.Free;
830 hi_ 1.1 FSelectTextList.Free;
831 yoffy 1.14 FBoardURLs.Free;
832 hi_ 1.1 FMailList.Free;
833     FNameList.Free;
834     end;
835    
836     //?????????<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
837     function TSetting.GetFileName(): string;
838     begin
839     Result := ExtractFilePath(Application.ExeName) + INI_FILE_NAME;
840     end;
841    
842 h677 1.11 //?炊?贋?亥??RL荐?????<?ゃ????鐚????刻????<?ゃ????鐚?
843     function TSetting.GetBoardURLFileName(): string;
844     begin
845     Result := ExtractFilePath(Application.ExeName) + BOARD_URL_INI_FILE_NAME;
846     end;
847    
848 hi_ 1.1 //荐?????<?ゃ???莨?/span>
849     procedure TSetting.ReadSettingFile();
850     const
851     DEFAULT_BBS_WIDTH: array[0..0] of Integer = (140);
852 yoffy 1.65 DEFAULT_CATEGORY_WIDTH: array[0..2] of Integer = (150, 80, 130);
853 h677 1.70 DEFAULT_BOARD_WIDTH: array[0..9] of Integer = (350, 60, 60, 60, 60, 60, 80, 130, 130, 130);
854 q9_ 1.30 MAX_WIDTH: Integer = 2000;
855 hi_ 1.1 var
856     ini: TMemIniFile;
857     i: Integer;
858 yoffy 1.64 id, code : Integer;
859 hi_ 1.1 wkList: TStringList;
860     wkStr: string;
861     Exists: Boolean;
862 yoffy 1.63 s: string;
863 hi_ 1.1 // id: Integer;
864     CoolSet: TCoolSet;
865     begin
866     Exists := FileExists(GetFileName);
867     ini := TMemIniFile.Create(GetFileName);
868     try
869     //??篆<???????<?泣?ゃ??/span>
870     FRecvBufferSize := ini.ReadInteger('HTTP', 'RecvBufferSize', 4096);
871     //HTTP1.1篏睡??/span>
872     FProtocol := ini.ReadBool('HTTP', 'Protocol', True);
873     //???????傑・膓?HTTP1.1篏睡??/span>
874     FProxyProtocol := ini.ReadBool('HTTP', 'ProxyProtocol', False);
875    
876     FReadProxy := ini.ReadBool('ReadProxy', 'Proxy', false);
877     FReadProxyAddress := ini.ReadString('ReadProxy', 'Address', '');
878     FReadProxyPort := ini.ReadInteger('ReadProxy', 'Port', 0);
879     FReadProxyUserID := ini.ReadString('ReadProxy', 'UserID', '');
880     FReadProxyPassword := ini.ReadString('ReadProxy', 'Password', '');
881    
882     FWriteProxy := ini.ReadBool('WriteProxy', 'Proxy', false);
883     FWriteProxyAddress := ini.ReadString('WriteProxy', 'Address', '');
884     FWriteProxyPort := ini.ReadInteger('WriteProxy', 'Port', 0);
885     FWriteProxyUserID := ini.ReadString('WriteProxy', 'UserID', '');
886     FWriteProxyPassword := ini.ReadString('WriteProxy', 'Password', '');
887    
888 yoffy 1.6 FBrowserFontName := ini.ReadString('Window', 'BrowserFontName', '');
889     FBrowserFontSize := ini.ReadInteger('Window', 'BrowserFontSize', 0);
890     FBrowserFontBold := ini.ReadInteger('Window', 'BrowserFontBold', 0);
891     FBrowserFontItalic := ini.ReadInteger('Window', 'BrowserFontItalic', 0);
892     FBrowserFontColor := ini.ReadInteger('Window', 'BrowserFontColor', -1);
893     FBrowserBackColor := ini.ReadInteger('Window', 'BrowserBackColor', -1);
894    
895 hi_ 1.1 FCabinetFontName := ini.ReadString('Window', 'CabinetFontName', DEFAULT_FONT_NAME);
896     FCabinetFontSize := ini.ReadInteger('Window', 'CabinetFontSize', DEFAULT_FONT_SIZE);
897     FCabinetFontBold := ini.ReadBool('Window', 'CabinetFontBold', False);
898     FCabinetFontItalic := ini.ReadBool('Window', 'CabinetFontItalic', False);
899     FCabinetFontColor := StringToColor(ini.ReadString('Window', 'CabinetFontColor', DEFAULT_FONT_COLOR));
900     FCabinetBackColor := StringToColor(ini.ReadString('Window', 'CabinetBackColor', DEFAULT_WINDOW_COLOR));
901    
902     FListFontName := ini.ReadString('Window', 'ListFontName', DEFAULT_FONT_NAME);
903     FListFontSize := ini.ReadInteger('Window', 'ListFontSize', DEFAULT_FONT_SIZE);
904     FListFontBold := ini.ReadBool('Window', 'ListFontBold', False);
905     FListFontItalic := ini.ReadBool('Window', 'ListFontItalic', False);
906     FListFontColor := StringToColor(ini.ReadString('Window', 'ListFontColor', DEFAULT_FONT_COLOR));
907     FListBackColor := StringToColor(ini.ReadString('Window', 'ListBackColor', DEFAULT_WINDOW_COLOR));
908 genyakun 1.48 FUseOddColorOddResNum := ini.ReadBool('Window','UseOddColor', False);
909     FOddColor := StringToColor(ini.ReadString('Window', 'OddColor', DEFAULT_WINDOW_COLOR));
910 hi_ 1.1
911     FEditorFontName := ini.ReadString('Window', 'EditorFontName', DEFAULT_FONT_NAME);
912     FEditorFontSize := ini.ReadInteger('Window', 'EditorFontSize', DEFAULT_FONT_SIZE);
913     FEditorFontBold := ini.ReadBool('Window', 'EditorFontBold', False);
914     FEditorFontItalic := ini.ReadBool('Window', 'EditorFontItalic', False);
915     FEditorFontColor := StringToColor(ini.ReadString('Window', 'EditorFontColor', DEFAULT_FONT_COLOR));
916     FEditorBackColor := StringToColor(ini.ReadString('Window', 'EditorBackColor', DEFAULT_WINDOW_COLOR));
917    
918     FBrowserTabFontName := ini.ReadString('Window', 'BrowserTabFontName', DEFAULT_TAB_FONT_NAME);
919     FBrowserTabFontSize := ini.ReadInteger('Window', 'BrowserTabFontSize', DEFAULT_TAB_FONT_SIZE);
920     FBrowserTabFontBold := ini.ReadBool('Window', 'BrowserTabFontBold', False);
921     FBrowserTabFontItalic := ini.ReadBool('Window', 'BrowserTabFontItalic', False);
922    
923     FHintFontName := ini.ReadString('Window', 'HintFontName', Screen.HintFont.Name);
924     FHintFontSize := ini.ReadInteger('Window', 'HintFontSize', Screen.HintFont.Size);
925     //FHintFontBold := ini.ReadBool('Window', 'HintFontBold', False);
926     //FHintFontItalic := ini.ReadBool('Window', 'HintFontItalic', False);
927     FHintFontColor := StringToColor(ini.ReadString('Window', 'HintFontColor', DEFAULT_FONT_COLOR));
928     FHintBackColor := StringToColor(ini.ReadString('Window', 'HintBackColor', 'clInfoBk'));
929    
930     FWindowTop := ini.ReadInteger('WindowSize', 'Top', -1);
931     FWindowLeft := ini.ReadInteger('WindowSize', 'Left', -1);
932     FWindowHeight := ini.ReadInteger('WindowSize', 'Height', -1);
933     FWindowWidth := ini.ReadInteger('WindowSize', 'Width', -1);
934     FWindowMax := ini.ReadBool('WindowSize', 'Max', false);
935    
936     if FWindowHeight <= 0 then FWindowHeight := 400;
937     if FWindowWidth <= 0 then FWindowWidth := 600;
938    
939     FListStyle := TViewStyle(ini.ReadInteger('ViewStyle', 'ListView', Ord(vsReport)));
940    
941     FEditWindowTop := ini.ReadInteger('EditorWindowSize', 'Top', -1);
942     FEditWindowLeft := ini.ReadInteger('EditorWindowSize', 'Left', -1);
943     FEditWindowHeight := ini.ReadInteger('EditorWindowSize', 'Height', -1);
944     FEditWindowWidth := ini.ReadInteger('EditorWindowSize', 'Width', -1);
945     FEditWindowMax := ini.ReadBool('EditorWindowSize', 'Max', False);
946 deux 1.20 FEditWindowStay := ini.ReadBool('EditorWindowSize', 'Stay', False);
947 genyakun 1.48 FEditWindowTranslucent := ini.ReadBool('EditorWindowSize', 'Translucent', False);
948 hi_ 1.1
949 yoffy 1.14 FOptionDialogTabIndex := ini.ReadInteger('OptionDialog', 'TabIndex', 0);
950 yoffy 1.8
951 hi_ 1.1 //???若??????/span>
952     FStdToolBarVisible := ini.ReadBool('ToolBar', 'StdVisible', True);
953     FAddressBarVisible := ini.ReadBool('ToolBar', 'AddressVisible', True);
954     FLinkBarVisible := ini.ReadBool('ToolBar', 'LinkVisible', True);
955     FListToolBarVisible := ini.ReadBool('ToolBar', 'ListVisible', True);
956     FListNameBarVisible := ini.ReadBool('ToolBar', 'ListNameVisible', True);
957     FBrowserToolBarVisible := ini.ReadBool('ToolBar', 'BrowserVisible', True);
958     FBrowserNameBarVisible := ini.ReadBool('ToolBar', 'BrowserNameVisible', True);
959     //???若??????rapable
960     FListToolBarWrapable := ini.ReadBool('ToolBar', 'ListWrapable', False);
961     FBrowserToolBarWrapable := ini.ReadBool('ToolBar', 'BrowserWrapable', False);
962    
963     FBrowserTabVisible := ini.ReadBool('Tab', 'BrowserTabVisible', True);
964     FBrowserTabPosition := TGikoTabPosition(ini.ReadInteger('Tab', 'BrowserTabPosition', Ord(gtpTop)));
965     FBrowserTabAppend := TGikoTabAppend(ini.ReadInteger('Tab', 'BrowserTabAppend', Ord(gtaFirst)));
966     FBrowserTabStyle := TGikoTabStyle(ini.ReadInteger('Tab', 'BrowserTabStyle', Ord(gtsFlat)));
967    
968     FMessageBarVisible := ini.ReadBool('MessageBar', 'Visible', True);
969     FMessegeBarHeight := ini.ReadInteger('MessageBar', 'Height', 30);
970    
971     FStatusBarVisible := ini.ReadBool('StatusBar', 'Visible', True);
972    
973     FCabinetVisible := ini.ReadBool('Cabinet', 'Visible', True);
974     FCabinetWidth := ini.ReadInteger('Cabinet', 'Width', 200);
975 yoffy 1.14 FCabinetIndex := ini.ReadInteger('Cabinet', 'Index', 0);
976 hi_ 1.1
977     FListOrientation := TGikoListOrientation(ini.ReadInteger('List', 'Orientation', Ord(gloHorizontal)));
978     FListHeight := ini.ReadInteger('List', 'Height', 180);
979     FListHeightState := TGikoListState(ini.ReadInteger('List', 'HeightState', Ord(glsNormal)));
980     FListWidth := ini.ReadInteger('List', 'Width', 180);
981     FListWidthState := TGikoListState(ini.ReadInteger('List', 'WidthState', Ord(glsNormal)));
982     // FListHeightMax := ini.ReadBool('List', 'HeightMax', False);
983     // FListWidthMax := ini.ReadBool('List', 'WidthMax', False);
984    
985     wkList := TStringList.Create;
986     try
987     ini.ReadSection('Name', wkList);
988     for i := 0 to wkList.Count - 1 do begin
989     wkStr := ini.ReadString('Name', wkList[i], '');
990     if (wkStr <> '') and (FNameList.IndexOf(wkStr) = -1) then
991     FNameList.Add(wkStr);
992     end;
993     ini.ReadSection('Mail', wkList);
994     for i := 0 to wkList.Count - 1 do begin
995     wkStr := ini.ReadString('Mail', wkList[i], '');
996     if (wkStr <> '') and (FMailList.IndexOf(wkStr) = -1) then
997     FMailList.Add(wkStr);
998     end;
999     ini.ReadSection('SelectText', wkList);
1000     for i := 0 to wkList.Count - 1 do begin
1001     wkStr := ini.ReadString('SelectText', wkList[i], '');
1002     if (wkStr <> '') and (FSelectTextList.IndexOf(wkStr) = -1) then
1003     FSelectTextList.Add(wkStr);
1004     end;
1005     finally
1006     wkList.Free;
1007     end;
1008    
1009 yoffy 1.64 // ???鴻????????綛?
1010 hi_ 1.1 wkList := TStringList.Create;
1011     try
1012     ini.ReadSection('BBSColumnWidth', wkList);
1013     if Length(FBBSColumnWidth) <> wkList.Count then begin
1014     ini.EraseSection('BBSColumnWidth');
1015     end;
1016     for i := 0 to Length(FBBSColumnWidth) - 1 do begin
1017     BBSColumnWidth[i] := ini.ReadInteger('BBSColumnWidth', 'ID' + IntToStr(i), DEFAULT_BBS_WIDTH[i]);
1018 q9_ 1.30 if BBSColumnWidth[i] > MAX_WIDTH then
1019     BBSColumnWidth[i] := DEFAULT_BBS_WIDTH[i];
1020 hi_ 1.1 end;
1021     ini.ReadSection('CategoryColumnWidth', wkList);
1022     if Length(FCategoryColumnWidth) <> wkList.Count then begin
1023     ini.EraseSection('CategoryColumnWidth');
1024     end;
1025     for i := 0 to Length(FCategoryColumnWidth) - 1 do begin
1026     CategoryColumnWidth[i] := ini.ReadInteger('CategoryColumnWidth', 'ID' + IntToStr(i), DEFAULT_CATEGORY_WIDTH[i]);
1027 q9_ 1.30 if CategoryColumnWidth[i] > MAX_WIDTH then
1028     CategoryColumnWidth[i] := DEFAULT_CATEGORY_WIDTH[i];
1029 hi_ 1.1 end;
1030     ini.ReadSection('BoardColumnWidth', wkList);
1031     if Length(FBoardColumnWidth) <> wkList.Count then begin
1032     ini.EraseSection('BoardColumnWidth');
1033     end;
1034     for i := 0 to Length(FBoardColumnWidth) - 1 do begin
1035     BoardColumnWidth[i] := ini.ReadInteger('BoardColumnWidth', 'ID' + IntToStr(i), DEFAULT_BOARD_WIDTH[i]);
1036 q9_ 1.30 if BoardColumnWidth[i] > MAX_WIDTH then
1037     BoardColumnWidth[i] := DEFAULT_BOARD_WIDTH[i];
1038 hi_ 1.1 end;
1039     finally
1040     wkList.Free;
1041     end;
1042    
1043 yoffy 1.64 // ?????眼?????鴻??????????綺?span>
1044     wkList := TStringList.Create;
1045     try
1046     ini.ReadSection( 'BBSColumnOrder', wkList );
1047     for i := 0 to wkList.Count - 1 do begin
1048     wkStr := ini.ReadString( 'BBSColumnOrder', 'ID' + IntToStr( i ), '' );
1049     Val( wkStr, id, code );
1050     if code = 0 then
1051     FBBSColumnOrder.Add( TGikoBBSColumnID( id ) );
1052     end;
1053     if FBBSColumnOrder.Count = 0 then begin
1054     // 荐?????<?????т???
1055     for i := 0 to Integer( High( TGikoBBSColumnID ) ) do
1056     FBBSColumnOrder.Add( TGikoBBSColumnID( i ) );
1057     end;
1058    
1059     ini.ReadSection( 'CategoryColumnOrder', wkList );
1060     for i := 0 to wkList.Count - 1 do begin
1061     wkStr := ini.ReadString( 'CategoryColumnOrder', 'ID' + IntToStr( i ), '' );
1062     Val( wkStr, id, code );
1063     if code = 0 then
1064     FCategoryColumnOrder.Add( TGikoCategoryColumnID( id ) );
1065     end;
1066     if FCategoryColumnOrder.Count = 0 then begin
1067     // 荐?????<?????т???
1068     for i := 0 to Integer( High( TGikoCategoryColumnID ) ) do
1069     FCategoryColumnOrder.Add( TGikoCategoryColumnID( i ) );
1070     end;
1071    
1072     ini.ReadSection( 'BoardColumnOrder', wkList );
1073     for i := 0 to wkList.Count - 1 do begin
1074     wkStr := ini.ReadString( 'BoardColumnOrder', 'ID' + IntToStr( i ), '' );
1075     Val( wkStr, id, code );
1076     if code = 0 then
1077     FBoardColumnOrder.Add( TGikoBoardColumnID( id ) );
1078     end;
1079     if FBoardColumnOrder.Count = 0 then begin
1080     // 荐?????<?????т???
1081     for i := 0 to Integer( High( TGikoBoardColumnID ) ) do
1082     FBoardColumnOrder.Add( TGikoBoardColumnID( i ) );
1083     end;
1084     finally
1085     wkList.Free;
1086     end;
1087    
1088 hi_ 1.1 //???鴻?????/span>
1089     FListViewNo := ini.ReadBool('Function', 'ListViewNo', True);
1090     //CSS
1091 yoffy 1.17 UseCSS := ini.ReadBool('CSS', 'UseCSS', True);
1092 hi_ 1.1 //CSS???<?ゃ????
1093 yoffy 1.17 CSSFileName := ini.ReadString('CSS', 'FileName', 'default.css');
1094 hi_ 1.1
1095     //Mail罨?茵?ず
1096     FShowMail := ini.ReadBool('Thread', 'ShowMail', True);
1097 yoffy 1.49 // ???壕;腓榊???/span>
1098     if ini.ReadBool('Thread', 'OnlyAHundredRes',false) then
1099     FResRange := 100 // ?ゃ??荐?????????/span>
1100     else
1101 h677 1.60 FResRange := ini.ReadInteger( 'Thread', 'ResRange', Ord( grrAll ) );
1102 yoffy 1.51 FResRangeHold := ini.ReadBool( 'Thread', 'ResRangeHold', False );
1103 yoffy 1.55 // ?鴻??????筝?荀ц;腓榊???/span>
1104     FThreadRange := TGikoThreadRange( ini.ReadInteger('ThreadList', 'ThreadRange', Ord( gtrAll )) );
1105 yoffy 1.2 //???≪?????c???????鴻???????≪????茵?ず
1106 hi_ 1.1 FUnActivePopup := ini.ReadBool('Thread', 'UnActivePopup', False);
1107 yoffy 1.2 //???鴻???????≪???????????若???若????
1108     FResPopupHeaderBold := ini.ReadBool('Thread', 'ResPopupHeaderBold', True);
1109 hi_ 1.1 //???ょ∈茯?
1110     FDeleteMsg := ini.ReadBool('Function', 'LogDeleteMessage', True);
1111 yoffy 1.14 //腟?篋?腆肴?
1112     FShowDialogForEnd := ini.ReadBool('Function','ShowDialogForEnd',false);
1113 h677 1.38 //AllTabClose
1114     FShowDialogForAllTabClose := ini.ReadBool('Function','ShowDialogForAllTabClose',false);
1115 genyakun 1.48 //Samba
1116 h677 1.38 FUseSamba := ini.ReadBool('Function','UseSamba', True);
1117     //ResAnchorjamp
1118     ResAnchorJamp := ini.ReadBool('Function', 'ResAnchoJamp', True);
1119 hi_ 1.1 //???違????????
1120     FLogFolder := ini.ReadString('Folder', 'LogFolder', ExtractFilePath(Application.ExeName) + 'Log');
1121     NewLogFolder := '';
1122    
1123     //??RL
1124 yoffy 1.14 //茲??亥?脂?蚊?с??????????????BoardURLs????????2003/10/05
1125 h677 1.11 //FBoardURL2ch := ini.ReadString('BoardURL', '2ch', DEFAULT_2CH_BOARD_URL);
1126 hi_ 1.1
1127     //茯?荐主?????若??D?祉???鴻???若??
1128     FUserID := ini.ReadString('Attestation', 'UserID', '');
1129     FPassword := Decrypt(ini.ReadString('Attestation', 'Password', ''));
1130     FAutoLogin := ini.ReadBool('Attestation', 'AutoLogin', False);
1131 h677 1.36 FForcedLogin := ini.ReadBool('Attestation', 'FForcedLogin', False);
1132 h677 1.37 // FDolibURL := ini.ReadString('Attestation', 'FDolibURL', DOLIB_LOGIN_URL);
1133 hi_ 1.1
1134     //URL??????????莎桁???≪????/span>
1135     FURLApp := ini.ReadBool('URLApp', 'Select', False);
1136     FURLAppFile := ini.ReadString('URLApp', 'File', '');
1137    
1138     //mailto????????????篏?
1139     FOpenMailer := ini.ReadBool('Mailto', 'Open', True);
1140    
1141     //???????≪????篏?臀?/span>
1142     FPopupPosition := TGikoPopupPosition(ini.ReadInteger('Browser', 'PopupPosition', Ord(gppLeftBottom)));
1143    
1144     //?≪?????鴻????/span>
1145     FURLDisplay := ini.ReadBool('AddressBar', 'URLDisplay', False);
1146     FAddressBarTabStop := ini.ReadBool('AddressBar', 'TabStop', True);
1147     FLinkAddAddressBar := ini.ReadBool('AddressBar', 'LinkAdd', False);
1148     FAddressHistoryCount := ini.ReadInteger('AddressBar', 'HistoryCount', 100);
1149    
1150     //?糸????????ャ??/span>
1151     FPreviewVisible := ini.ReadBool('Browser', 'PreviewVisible', True);
1152     FPreviewSize := TGikoPreviewSize(ini.ReadInteger('Browser', 'PreviewSize', Ord(gpsMedium)));
1153     FPreviewWait := ini.ReadInteger('Browser', 'PreviewWait', 500);
1154    
1155 yoffy 1.39 // ????????/span>
1156     FBrowserAutoMaximize := TGikoBrowserAutoMaximize(
1157     ini.ReadInteger('Window', 'BrowserAutoMaximize', Ord(gbmDoubleClick)) );
1158    
1159 hi_ 1.1 //?鴻??????筝?荀ф?贋?違?≪?ゃ?潟??/span>
1160     FListIconVisible := ini.ReadBool('ThreadList', 'StateIconVisible', True);
1161 q9_ 1.44 FCreationTimeLogs := ini.ReadBool('ThreadList', 'CreationTimeLogs', True);
1162 h677 1.43 FFutureThread := ini.ReadBool('ThreadList', 'FutureThread', True);
1163     FSelectInterval := ini.ReadInteger('ThreadList', 'SelectInterval', 110);
1164 q9_ 1.46 //?純?若????
1165     FBBSSortIndex := ini.ReadInteger('ThreadList', 'BBSSortIndex', 0);
1166 h677 1.59 FBBSSortOrder := ini.ReadBool('ThreadList', 'BBSSortOrder', True);
1167 q9_ 1.46 FCategorySortIndex := ini.ReadInteger('ThreadList', 'CategorySortIndex', 0);
1168 h677 1.59 FCategorySortOrder := ini.ReadBool('ThreadList', 'CategorySortOrder', True);
1169 q9_ 1.46 FBoardSortIndex := ini.ReadInteger('ThreadList', 'BoardSortIndex', 0);
1170 h677 1.59 FBoardSortOrder := ini.ReadBool('ThreadList', 'BoardSortOrder', True);
1171 q9_ 1.53 //Dat?純?<?鴻???純?若????
1172     FDatOchiSortIndex := ini.ReadInteger('ThreadList', 'DatOchiSortIndex', -1);
1173     FDatOchiSortOrder := ini.ReadBool('ThreadList', 'DatOchiSortOrder', False);
1174 hi_ 1.1
1175     //?吾??莨若?炊?????激?恰???私戎??┃絎?
1176     FUseMachineTime := ini.ReadBool('PostTime', 'UseMachineTime', False);
1177     FTimeAdjustSec := ini.ReadInteger('PostTime', 'TimeAdjustSec', 0);
1178     FTimeAdjust := ini.ReadBool('PostTime', 'TimeAdjust', True);
1179    
1180     //?泣???潟??
1181     if Exists then begin
1182     for i := 0 to GetSoundCount - 1 do begin
1183     SoundFileName[i] := ini.ReadString('Sound', SoundName[i], '');
1184     if not FileExists(SoundFileName[i]) then
1185     SoundFileName[i] := '';
1186     end;
1187     end else begin
1188     s := ExtractFileDir(Application.ExeName) + '\sound\';
1189     SoundFileName[0] := s + '??緇?????.wav';
1190     SoundFileName[1] := s + '??緇?????(綏???).wav';
1191     SoundFileName[2] := s + '???贋??wav';
1192     SoundFileName[3] := '';
1193     SoundFileName[4] := s + '??????wav';
1194     end;
1195    
1196     //???若??????/span>
1197     for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1198     CoolSet.FCoolID := ini.ReadInteger('MainCoolBar', 'ID' + IntToStr(i), -1);
1199     CoolSet.FCoolWidth := ini.ReadInteger('MainCoolBar', 'Width' + IntToStr(i), -1);
1200     CoolSet.FCoolBreak := ini.ReadBool('MainCoolBar', 'Break' + IntToStr(i), False);
1201     MainCoolSet[i] := CoolSet;
1202     end;
1203 yoffy 1.14 FSelectComboBoxWidth := ini.ReadInteger( 'ListCoolBar', 'SelectWidth', 127 );
1204 hi_ 1.1 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1205     CoolSet.FCoolID := ini.ReadInteger('ListCoolBar', 'ID' + IntToStr(i), -1);
1206     CoolSet.FCoolWidth := ini.ReadInteger('ListCoolBar', 'Width' + IntToStr(i), -1);
1207     CoolSet.FCoolBreak := ini.ReadBool('ListCoolBar', 'Break' + IntToStr(i), False);
1208 yoffy 1.2 ListCoolSet[i] := CoolSet;
1209 hi_ 1.1 end;
1210     for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1211     CoolSet.FCoolID := ini.ReadInteger('BrowserCoolBar', 'ID' + IntToStr(i), -1);
1212     CoolSet.FCoolWidth := ini.ReadInteger('BrowserCoolBar', 'Width' + IntToStr(i), -1);
1213     CoolSet.FCoolBreak := ini.ReadBool('BrowserCoolBar', 'Break' + IntToStr(i), False);
1214     BrowserCoolSet[i] := CoolSet;
1215     end;
1216 h677 1.3
1217 yoffy 1.14 //???若????
1218     FAbonDeleterlo := ini.ReadBool('Abon','Deleterlo',false);
1219     FAbonReplaceul := ini.ReadBool('Abon','Replaceul',false);
1220     FPopUpAbon := ini.ReadBool('Abon','Popup',false);
1221     FShowNGLinesNum := ini.ReadBool('Abon','ShowNGLines',false);
1222     FAddResAnchor := ini.ReadBool('Abon','AddResAnchor',false);
1223 genyakun 1.48 FDeleteSyria := ini.ReadBool('Abon','DeleteSyria',false);
1224 yoffy 1.40
1225     // ?????c??/span>
1226 h677 1.73 FSpaceToNBSP := ini.ReadBool( 'Editor', 'SpaceToNBSP', False );
1227 yoffy 1.42 FAmpToCharRef := ini.ReadBool( 'Editor', 'AmpToCharRef', False );
1228 h677 1.43
1229 h677 1.67 //Tab????篆?絖???茯??粋昭??/span>
1230     FTabAutoLoadSave := ini.ReadBool('TabAuto', 'TabAutoLoadSave', False);
1231    
1232     FKuroutSettingTabIndex := ini.ReadInteger('OptionDialog', 'KuroutTabIndex' , 0);
1233 genyakun 1.47
1234 h677 1.43
1235 hi_ 1.1 finally
1236     ini.Free;
1237     end;
1238     end;
1239 h677 1.11 //?炊?贋?亥??RL茯??粋昭??/span>
1240     procedure TSetting.ReadBoardURLsFile();
1241     var
1242     ini: TMemIniFile;
1243 yoffy 1.14 urlNum: Integer;
1244     i : Integer;
1245 h677 1.11 begin
1246 yoffy 1.14 if not FileExists(GetBoardURLFileName()) then
1247     MakeURLIniFile();
1248 h677 1.11 ini := TMemIniFile.Create(GetBoardURLFileName());
1249 yoffy 1.14 try
1250     urlNum := ini.ReadInteger('URL','count',0);
1251     BoardURLSelected := ini.ReadInteger('URL','selected',0);
1252     for i := 0 to urlNum - 1 do begin
1253     FBoardURLs.Append(ini.ReadString('URL',IntToStr(i+1),''));
1254     end;
1255     finally
1256     ini.Free;
1257     end;
1258 hi_ 1.1
1259 h677 1.11 end;
1260 hi_ 1.1 //荐?????<?ゃ???絖?(system)
1261     procedure TSetting.WriteSystemSettingFile();
1262     var
1263     ini: TMemIniFile;
1264     begin
1265     ini := TMemIniFile.Create(GetFileName());
1266     try
1267     //??篆<???????<?泣?ゃ??/span>
1268     ini.WriteInteger('HTTP', 'RecvBufferSize', FRecvBufferSize);
1269     //HTTP1.1篏睡??/span>
1270     ini.WriteBool('HTTP', 'Protocol', FProtocol);
1271     //???????傑・膓?HTTP1.1篏睡??/span>
1272     ini.WriteBool('HTTP', 'ProxyProtocol', FProxyProtocol);
1273    
1274     ini.WriteBool('ReadProxy', 'Proxy', FReadProxy);
1275     ini.WriteString('ReadProxy', 'Address', FReadProxyAddress);
1276     ini.WriteInteger('ReadProxy', 'Port', FReadProxyPort);
1277     ini.WriteString('ReadProxy', 'UserID', FReadProxyUserID);
1278     ini.WriteString('ReadProxy', 'Password', FReadProxyPassword);
1279    
1280     ini.WriteBool('WriteProxy', 'Proxy', FWriteProxy);
1281     ini.WriteString('WriteProxy', 'Address', FWriteProxyAddress);
1282     ini.WriteInteger('WriteProxy', 'Port', FWriteProxyPort);
1283     ini.WriteString('WriteProxy', 'UserID', FWriteProxyUserID);
1284     ini.WriteString('WriteProxy', 'Password', FWriteProxyPassword);
1285    
1286 yoffy 1.6 ini.WriteString('Window', 'BrowserFontName', FBrowserFontName);
1287     ini.WriteInteger('Window', 'BrowserFontSize', FBrowserFontSize);
1288     ini.WriteInteger('Window', 'BrowserFontSize', FBrowserFontSize);
1289     ini.WriteInteger('Window', 'BrowserFontBold', FBrowserFontBold);
1290     ini.WriteInteger('Window', 'BrowserFontItalic', FBrowserFontItalic);
1291     ini.WriteInteger('Window', 'BrowserFontColor', FBrowserFontColor);
1292     ini.WriteInteger('Window', 'BrowserBackColor', FBrowserBackColor);
1293    
1294 hi_ 1.1 ini.WriteString('Window', 'CabinetFontName', FCabinetFontName);
1295     ini.WriteInteger('Window', 'CabinetFontSize', FCabinetFontSize);
1296     ini.WriteString('Window', 'CabinetFontColor', ColorToString(FCabinetFontColor));
1297     ini.WriteString('Window', 'CabinetBackColor', ColorToString(FCabinetBackColor));
1298    
1299     ini.WriteString('Window', 'ListFontName', FListFontName);
1300     ini.WriteInteger('Window', 'ListFontSize', FListFontSize);
1301     ini.WriteString('Window', 'ListFontColor', ColorToString(FListFontColor));
1302     ini.WriteString('Window', 'ListBackColor', ColorToString(FListBackColor));
1303 genyakun 1.48 ini.WriteBool('Window','UseOddColor',FUseOddColorOddResNum);
1304     ini.WriteString('Window', 'OddColor',ColorToString(FOddColor));
1305 hi_ 1.1
1306     ini.WriteString('Window', 'EditorFontName', FEditorFontName);
1307     ini.WriteInteger('Window', 'EditorFontSize', FEditorFontSize);
1308     ini.WriteString('Window', 'EditorFontColor', ColorToString(FEditorFontColor));
1309     ini.WriteString('Window', 'EditorBackColor', ColorToString(FEditorBackColor));
1310    
1311     ini.WriteString('Window', 'BrowserTabFontName', FBrowserTabFontName);
1312     ini.WriteInteger('Window', 'BrowserTabFontSize', FBrowserTabFontSize);
1313     ini.WriteBool('Window', 'BrowserTabFontBold', FBrowserTabFontBold);
1314     ini.WriteBool('Window', 'BrowserTabFontItalic', FBrowserTabFontItalic);
1315    
1316     ini.WriteString('Window', 'HintFontName', FHintFontName);
1317     ini.WriteInteger('Window', 'HintFontSize', FHintFontSize);
1318     ini.WriteString('Window', 'HintFontColor', ColorToString(FHintFontColor));
1319     ini.WriteString('Window', 'HintBackColor', ColorToString(FHintBackColor));
1320    
1321     ini.UpdateFile;
1322     finally
1323     ini.Free;
1324     end;
1325     end;
1326    
1327     //荐?????<?ゃ???絖?(window)
1328     procedure TSetting.WriteWindowSettingFile();
1329     var
1330     i: Integer;
1331     ini: TMemIniFile;
1332     CoolSet: TCoolSet;
1333 yoffy 1.66 wkList : TStringList;
1334 hi_ 1.1 begin
1335     ini := TMemIniFile.Create(GetFileName());
1336     try
1337     ini.WriteInteger('WindowSize', 'Top', WindowTop);
1338     ini.WriteInteger('WindowSize', 'Left', WindowLeft);
1339     ini.WriteInteger('WindowSize', 'Height', WindowHeight);
1340     ini.WriteInteger('WindowSize', 'Width', WindowWidth);
1341     ini.WriteBool('WindowSize', 'Max', WindowMax);
1342    
1343     ini.WriteInteger('ViewStyle', 'ListView', Ord(ListStyle));
1344    
1345     ini.WriteInteger('EditorWindowSize', 'Top', EditWindowTop);
1346     ini.WriteInteger('EditorWindowSize', 'Left', EditWindowLeft);
1347     ini.WriteInteger('EditorWindowSize', 'Height', EditWindowHeight);
1348     ini.WriteInteger('EditorWindowSize', 'Width', EditWindowWidth);
1349     ini.WriteBool('EditorWindowSize', 'Max', EditWindowMax);
1350 deux 1.20 ini.WriteBool('EditorWindowSize', 'Stay', EditWindowStay);
1351 yoffy 1.34 ini.WriteBool('EditorWindowSize', 'Translucent', EditWindowTranslucent);
1352 hi_ 1.1
1353 yoffy 1.14 ini.WriteInteger('OptionDialog', 'TabIndex', FOptionDialogTabIndex);
1354 yoffy 1.8
1355 hi_ 1.1 //???若??????/span>
1356     ini.WriteBool('ToolBar', 'StdVisible', FStdToolBarVisible);
1357     ini.WriteBool('ToolBar', 'AddressVisible', FAddressBarVisible);
1358     ini.WriteBool('ToolBar', 'LinkVisible', FLinkBarVisible);
1359     ini.WriteBool('ToolBar', 'ListVisible', FListToolBarVisible);
1360     ini.WriteBool('ToolBar', 'ListNameVisible', FListNameBarVisible);
1361     ini.WriteBool('ToolBar', 'BrowserVisible', FBrowserToolBarVisible);
1362     ini.WriteBool('ToolBar', 'BrowserNameVisible', FBrowserNameBarVisible);
1363     //???若??????rapable
1364     ini.WriteBool('ToolBar', 'ListWrapable', FListToolBarWrapable);
1365     ini.WriteBool('ToolBar', 'BrowserWrapable', FBrowserToolBarWrapable);
1366    
1367     //?帥??
1368     ini.WriteBool('Tab', 'BrowserTabVisible', FBrowserTabVisible);
1369     ini.WriteInteger('Tab', 'BrowserTabPosition', Ord(FBrowserTabPosition));
1370     ini.WriteInteger('Tab', 'BrowserTabAppend', Ord(FBrowserTabAppend));
1371     ini.WriteInteger('Tab', 'BrowserTabStyle', Ord(FBrowserTabStyle));
1372    
1373     //?<???祉?若?吾????/span>
1374     ini.WriteBool('MessageBar', 'Visible', FMessageBarVisible);
1375     ini.WriteInteger('MessageBar', 'Height', FMessegeBarHeight);
1376    
1377     //?鴻???若?帥?鴻????/span>
1378     ini.WriteBool('StatusBar', 'Visible', FStatusBarVisible);
1379    
1380     //???c????????
1381     ini.WriteBool('Cabinet', 'Visible', FCabinetVisible);
1382     ini.WriteInteger('Cabinet', 'Width', FCabinetWidth);
1383 yoffy 1.14 ini.WriteInteger('Cabinet', 'Index', FCabinetIndex);
1384 hi_ 1.1
1385     //???鴻?????泣?ゃ?冴?????贋梓綛?/span>
1386     ini.WriteInteger('List', 'Orientation', Ord(FListOrientation));
1387     ini.WriteInteger('List', 'Height', FListHeight);
1388     ini.WriteInteger('List', 'HeightState', Ord(FListHeightState));
1389     ini.WriteInteger('List', 'Width', FListWidth);
1390     ini.WriteInteger('List', 'WidthState', Ord(FListWidthState));
1391     // ini.WriteBool('List', 'HeightMax', FListHeightMax);
1392     // ini.WriteBool('List', 'WidthMax', FListWidthMax);
1393    
1394    
1395     // ini.WriteInteger('Window', 'BrowserFontSize', BrowserFontSize);
1396    
1397     //???鴻????埈;腓?/span>
1398     ini.WriteBool('Function', 'ListViewNo', FListViewNo);
1399     //CSS篏睡??/span>
1400     ini.WriteBool('CSS', 'UseCSS', FUseCSS);
1401     //CSS???<?ゃ????
1402     ini.WriteString('CSS', 'FileName', FCSSFileName);
1403     //Mail罨?茵?ず
1404     ini.WriteBool('Thread', 'ShowMail', FShowMail);
1405 yoffy 1.49 // ???壕;腓榊???/span>
1406 yoffy 1.58 ini.DeleteKey( 'Thread', 'OnlyAHundredRes' ); // ?ゃ??荐????????/span>
1407 yoffy 1.49 ini.WriteInteger('Thread', 'ResRange', FResRange);
1408 yoffy 1.51 ini.WriteBool('Thread', 'ResRangeHold', FResRangeHold);
1409 yoffy 1.55 // ?鴻??????筝?荀ц;腓榊???/span>
1410     ini.WriteInteger('ThreadList', 'ThreadRange', Ord( FThreadRange ));
1411 hi_ 1.1 //???医???ょ∈茯?
1412     ini.WriteBool('Function', 'LogDeleteMessage', FDeleteMsg);
1413 yoffy 1.14 //腟?篋?腆肴?
1414     ini.WriteBool('Function','ShowDialogForEnd',FShowDialogForEnd);
1415 h677 1.38 //AllTabClose
1416     ini.WriteBool('Function','ShowDialogForAllTabClose', FShowDialogForAllTabClose);
1417 yoffy 1.34 //Samba
1418     ini.WriteBool('Function','UseSamba', FUseSamba);
1419 h677 1.38 //ResAnchorjamp
1420     ini.WriteBool('Function', 'ResAnchoJamp', ResAnchorJamp);
1421 h677 1.33
1422 hi_ 1.1 //???≪?????c???????????≪????茵?ず
1423     ini.WriteBool('Thread', 'UnActivePopup', FUnActivePopup);
1424 yoffy 1.2 //???鴻???????≪???????????若???若????
1425     ini.WriteBool('Thread', 'ResPopupHeaderBold', FResPopupHeaderBold);
1426 h677 1.11 //ini.WriteString('BoardURL', '2ch', FBoardURL2ch);
1427 hi_ 1.1
1428     //茯?荐主?????若??D?祉???鴻???若??
1429     ini.WriteString('Attestation', 'UserID', FUserID);
1430     ini.WriteString('Attestation', 'Password', Encrypt(FPassword));
1431     ini.WriteBool('Attestation', 'AutoLogin', FAutoLogin);
1432 h677 1.36 ini.WriteBool('Attestation', 'FForcedLogin', FForcedLogin);
1433     ini.WriteString('Attestation', 'FDolibURL', FDolibURL);
1434 hi_ 1.1
1435     //URL??????????莎桁???≪????/span>
1436     ini.WriteBool('URLApp', 'Select', FURLApp);
1437     ini.WriteString('URLApp', 'File', FURLAppFile);
1438    
1439     //mailto????????????篏?
1440     ini.WriteBool('Mailto', 'Open', FOpenMailer);
1441    
1442     //???????≪????篏?臀?/span>
1443     ini.WriteInteger('Browser', 'PopupPosition', Ord(FPopupPosition));
1444    
1445     //?≪?????鴻????/span>
1446     ini.WriteBool('AddressBar', 'URLDisplay', FURLDisplay);
1447     ini.WriteBool('AddressBar', 'TabStop', FAddressBarTabStop);
1448     ini.WriteBool('AddressBar', 'LinkAdd', FLinkAddAddressBar);
1449     ini.WriteInteger('AddressBar', 'HistoryCount', FAddressHistoryCount);
1450    
1451     //?糸????????ャ??/span>
1452     ini.WriteBool('Browser', 'PreviewVisible', FPreviewVisible);
1453     ini.WriteInteger('Browser', 'PreviewSize', Ord(FPreviewSize));
1454     ini.WriteInteger('Browser', 'PreviewWait', FPreviewWait);
1455 yoffy 1.61
1456     ini.WriteInteger('Window', 'BrowserAutoMaximize', Ord( BrowserAutoMaximize ) );
1457 hi_ 1.1
1458     //?鴻??????筝?荀ф?贋?違?≪?ゃ?潟??/span>
1459     ini.WriteBool('ThreadList', 'StateIconVisible', FListIconVisible);
1460 yoffy 1.34 ini.WriteBool('ThreadList', 'CreationTimeLogs',FCreationTimeLogs);
1461     ini.WriteBool('ThreadList', 'FutureThread', FFutureThread);
1462 q9_ 1.44 ini.WriteInteger('ThreadList', 'SelectInterval', FSelectInterval);
1463 q9_ 1.46 //?純?若????
1464     ini.WriteInteger('ThreadList', 'BBSSortIndex', FBBSSortIndex);
1465     ini.WriteBool('ThreadList', 'BBSSortOrder', FBBSSortOrder);
1466     ini.WriteInteger('ThreadList', 'CategorySortIndex', FCategorySortIndex);
1467     ini.WriteBool('ThreadList', 'CategorySortOrder', FCategorySortOrder);
1468     ini.WriteInteger('ThreadList', 'BoardSortIndex', FBoardSortIndex);
1469     ini.WriteBool('ThreadList', 'BoardSortOrder', FBoardSortOrder);
1470 q9_ 1.53 ini.WriteInteger('ThreadList', 'DatOchiSortIndex', FDatOchiSortIndex);
1471     ini.WriteBool('ThreadList', 'DatOchiSortOrder', FDatOchiSortOrder);
1472 hi_ 1.1
1473     //?吾??莨若?炊?????激?恰???私戎??┃絎?
1474     ini.WriteBool('PostTime', 'UseMachineTime', FUseMachineTime);
1475     ini.WriteInteger('PostTime', 'TimeAdjustSec', FTimeAdjustSec);
1476     ini.WriteBool('PostTime', 'TimeAdjust', FTimeAdjust);
1477    
1478 yoffy 1.64 // ???鴻????????綛?
1479 hi_ 1.1 for i := 0 to Length(FBBSColumnWidth) - 1 do begin
1480     ini.WriteInteger('BBSColumnWidth', 'ID' + IntToStr(i), FBBSColumnWidth[i]);
1481     end;
1482     for i := 0 to Length(FCategoryColumnWidth) - 1 do begin
1483     ini.WriteInteger('CategoryColumnWidth', 'ID' + IntToStr(i), FCategoryColumnWidth[i]);
1484     end;
1485     for i := 0 to Length(FBoardColumnWidth) - 1 do begin
1486     ini.WriteInteger('BoardColumnWidth', 'ID' + IntToStr(i), FBoardColumnWidth[i]);
1487     end;
1488    
1489 yoffy 1.66 wkList := TStringList.Create;
1490     try
1491     // ?????眼?????鴻????綺?span>
1492     ini.ReadSection( 'BBSColumnOrder', wkList );
1493     for i := wkList.Count - 1 downto 0 do
1494     ini.DeleteKey( 'BBSColumnOrder', wkList[ i ] );
1495     for i := 0 to FBBSColumnOrder.Count - 1 do
1496     ini.WriteInteger( 'BBSColumnOrder', 'ID' + IntToStr( i ), Ord( FBBSColumnOrder[ i ] ) );
1497    
1498     // ?帥???鴻????綺?span>
1499     ini.ReadSection( 'CategoryColumnOrder', wkList );
1500     for i := wkList.Count - 1 downto 0 do
1501     ini.DeleteKey( 'CategoryColumnOrder', wkList[ i ] );
1502     for i := 0 to FCategoryColumnOrder.Count - 1 do
1503     ini.WriteInteger( 'CategoryColumnOrder', 'ID' + IntToStr( i ), Ord( FCategoryColumnOrder[ i ] ) );
1504    
1505     // ?鴻?????鴻????綺?span>
1506     ini.ReadSection( 'BoardColumnOrder', wkList );
1507     for i := wkList.Count - 1 downto 0 do
1508     ini.DeleteKey( 'BoardColumnOrder', wkList[ i ] );
1509     for i := 0 to FBoardColumnOrder.Count - 1 do
1510     ini.WriteInteger( 'BoardColumnOrder', 'ID' + IntToStr( i ), Ord( FBoardColumnOrder[ i ] ) );
1511     finally
1512     wkList.Free;
1513     end;
1514 yoffy 1.64
1515 hi_ 1.1 //?泣???潟??
1516     for i := 0 to GetSoundCount - 1 do begin
1517     if not FileExists(SoundFileName[i]) then
1518     SoundFileName[i] := '';
1519     ini.WriteString('Sound', SoundName[i], SoundFileName[i]);
1520     end;
1521    
1522     //CoolBar
1523     ini.EraseSection('MainCoolBar');
1524     for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1525     CoolSet := MainCoolSet[i];
1526     ini.WriteInteger('MainCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
1527     ini.WriteInteger('MainCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
1528     ini.WriteBool('MainCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
1529     end;
1530 yoffy 1.2 ini.EraseSection('ListCoolBar');
1531 yoffy 1.14 ini.WriteInteger( 'ListCoolBar', 'SelectWidth', FSelectComboBoxWidth );
1532 hi_ 1.1 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1533     CoolSet := ListCoolSet[i];
1534     ini.WriteInteger('ListCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
1535     ini.WriteInteger('ListCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
1536     ini.WriteBool('ListCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
1537     end;
1538     ini.EraseSection('BrowserCoolBar');
1539     for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1540     CoolSet := BrowserCoolSet[i];
1541     ini.WriteInteger('BrowserCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
1542     ini.WriteInteger('BrowserCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
1543     ini.WriteBool('BrowserCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
1544     end;
1545 h677 1.3
1546 h677 1.9 //???若????
1547     ini.WriteBool('Abon','Deleterlo',FAbonDeleterlo);
1548     ini.WriteBool('Abon','Replaceul',FAbonReplaceul);
1549 yoffy 1.14 ini.WriteBool('Abon','Popup',FPopUpAbon);
1550 h677 1.9 ini.WriteBool('Abon','ShowNGLines',FShowNGLinesNum);
1551     ini.WriteBool('Abon','AddResAnchor',FAddResAnchor);
1552 yoffy 1.40 ini.WriteBool('Abon','DeleteSyria',FDeleteSyria);
1553    
1554     // ?????c??/span>
1555     ini.WriteBool( 'Editor', 'SpaceToNBSP', FSpaceToNBSP );
1556 yoffy 1.41 ini.WriteBool( 'Editor', 'AmpToCharRef', FAmpToCharRef );
1557 hi_ 1.1
1558 genyakun 1.71 //?帥??????篆?絖?
1559 h677 1.67 ini.WriteBool('TabAuto', 'TabAutoLoadSave', FTabAutoLoadSave);
1560 genyakun 1.71 //荅括完荐??
1561     ini.WriteInteger('OptionDialog', 'KuroutTabIndex', FKuroutSettingTabIndex);
1562 h677 1.67
1563 genyakun 1.71 //???<????茯?罅???罘???/span>
1564     ini.WriteBool('2chSupport', 'Support', F2chSupport);
1565 genyakun 1.52
1566 genyakun 1.71 ini.UpdateFile;
1567 hi_ 1.1 finally
1568     ini.Free;
1569     end;
1570     end;
1571    
1572     //荐?????<?ゃ???絖?(name & mail)
1573     procedure TSetting.WriteNameMailSettingFile();
1574     var
1575     i: Integer;
1576     ini: TMemIniFile;
1577     begin
1578     ini := TMemIniFile.Create(GetFileName());
1579     try
1580     ini.EraseSection('Name');
1581     ini.EraseSection('Mail');
1582     ini.EraseSection('SelectText');
1583     for i := 0 to FNameList.Count - 1 do begin
1584     ini.WriteString('Name', Format('%.2d', [i + 1]), FNameList[i]);
1585     if i >= 39 then
1586     Break;
1587     end;
1588     for i := 0 to FMailList.Count - 1 do begin
1589     ini.WriteString('Mail', Format('%.2d', [i + 1]), FMailList[i]);
1590     if i >= 39 then
1591     Break;
1592     end;
1593     for i := 0 to FSelectTextList.Count - 1 do begin
1594     ini.WriteString('SelectText', Format('%.2d', [i + 1]), FSelectTextList[i]);
1595     if i >= 39 then
1596     Break;
1597     end;
1598     ini.UpdateFile;
1599     finally
1600     ini.Free;
1601     end;
1602     end;
1603    
1604     procedure TSetting.WriteFolderSettingFile();
1605     var
1606     ini: TMemIniFile;
1607     begin
1608     ini := TMemIniFile.Create(GetFileName());
1609     try
1610     if ExtractFilePath(Application.ExeName) + 'Log' = NewLogFolder then
1611     ini.DeleteKey('Folder', 'LogFolder')
1612     else
1613     ini.WriteString('Folder', 'LogFolder', NewLogFolder);
1614     ini.UpdateFile;
1615     finally
1616     ini.Free;
1617     end;
1618     end;
1619 h677 1.11 //?炊?贋?亥??oardURL??篆?絖?
1620     procedure TSetting.WriteBoardURLSettingFile();
1621     var
1622     ini: TMemIniFile;
1623 yoffy 1.14 i : Integer;
1624     oldcount : Integer;
1625 h677 1.11 begin
1626     ini := TMemIniFile.Create(GetBoardURLFileName());
1627     try
1628 yoffy 1.14 oldcount := ini.ReadInteger('URL','count',FBoardURLs.Count);
1629     ini.WriteInteger('URL','count',FBoardURLs.Count);
1630     ini.WriteInteger('URL','selected',BoardURLSelected);
1631     for i := 0 to FBoardURLs.Count -1 do begin
1632     ini.WriteString('URL',IntToStr(i+1),FBoardURLs.Strings[i]);
1633     end;
1634     if oldcount > FBoardURLs.Count then begin
1635     for i := FBoardURLs.Count to oldcount do begin
1636     ini.DeleteKey('URL',IntToStr(i+1));
1637     end;
1638     end;
1639 h677 1.11 ini.UpdateFile;
1640     finally
1641     ini.Free;
1642     end;
1643     end;
1644 hi_ 1.1
1645 yoffy 1.28 {$R-}
1646 hi_ 1.1 //???鴻????????????????/span>
1647     function TSetting.GetBBSColumnWidth(index: Integer): Integer;
1648     begin
1649     Result := IfThen(index in [0..Length(FBBSColumnWidth) - 1], FBBSColumnWidth[index], 0);
1650     end;
1651    
1652     function TSetting.GetCategoryColumnWidth(index: Integer): Integer;
1653     begin
1654     Result := IfThen(index in [0..Length(FCategoryColumnWidth) - 1], FCategoryColumnWidth[index], 0);
1655     end;
1656    
1657     function TSetting.GetBoardColumnWidth(index: Integer): Integer;
1658     begin
1659     Result := IfThen(index in [0..Length(FBoardColumnWidth) - 1], FBoardColumnWidth[index], 0);
1660     end;
1661 yoffy 1.28 {$IFDEF DEBUG}
1662     {$R+}
1663     {$ENDIF}
1664 hi_ 1.1
1665     procedure TSetting.SetBBSColumnWidth(index: Integer; value: Integer);
1666     begin
1667     if index in [0..Length(FBBSColumnWidth) - 1] then
1668     FBBSColumnWidth[index] := value;
1669     end;
1670    
1671     procedure TSetting.SetCategoryColumnWidth(index: Integer; value: Integer);
1672     begin
1673     if index in [0..Length(FCategoryColumnWidth) - 1] then
1674     FCategoryColumnWidth[index] := value;
1675     end;
1676    
1677     procedure TSetting.SetBoardColumnWidth(index: Integer; value: Integer);
1678     begin
1679     if index in [0..Length(FBoardColumnWidth) - 1] then
1680     FBoardColumnWidth[index] := value;
1681     end;
1682    
1683     function TSetting.GetSoundCount: Integer;
1684     begin
1685     Result := Length(SOUND_NAME);
1686     end;
1687    
1688     function TSetting.GetSoundName(Index: Integer): string;
1689     begin
1690     if (Index < GetSoundCount) and (Index >= 0) then
1691     Result := SOUND_NAME[Index].Name
1692     else
1693     Result := '';
1694     end;
1695    
1696     function TSetting.GetSoundViewName(Index: Integer): string;
1697     begin
1698     if (Index < GetSoundCount) and (Index >= 0) then
1699     Result := SOUND_NAME[Index].ViewName
1700     else
1701     Result := '';
1702     end;
1703    
1704     function TSetting.GetSoundFileName(Index: Integer): string;
1705     begin
1706     if (Index < GetSoundCount) and (Index >= 0) then
1707     Result := SOUND_NAME[Index].FileName
1708     else
1709     Result := '';
1710     end;
1711    
1712     procedure TSetting.SetSoundFileName(Index: Integer; value: string);
1713     begin
1714     if (Index < GetSoundCount) and (Index >= 0) then
1715     SOUND_NAME[Index].FileName := value;
1716     end;
1717    
1718     function TSetting.FindSoundFileName(Name: string): string;
1719     var
1720     i: Integer;
1721     begin
1722     for i := 0 to GetSoundCount - 1 do begin
1723     if SoundName[i] = Name then begin
1724     Result := SoundFileName[i];
1725     Exit;
1726     end;
1727     end;
1728     Result := '';
1729     end;
1730    
1731     function TSetting.Encrypt(s: string): string;
1732     var
1733     cryptObj: THogeCryptAuto;
1734     inputStream, outputStream: TStringStream;
1735     begin
1736     inputStream := TStringStream.Create(s);
1737     outputStream := TStringStream.Create('');
1738     cryptObj := THogeCryptAuto.Create;
1739     try
1740     // ???桁??
1741     cryptObj.Encrypt(inputStream, GIKO_ENCRYPT_TEXT, outputStream);
1742    
1743     // ???ゃ?????????у?荀?????????????鴻???????
1744     Result := HogeBase64Encode(outputStream.DataString);
1745     finally
1746     cryptObj.Free;
1747     outputStream.Free;
1748     inputStream.Free;
1749     end;
1750     end;
1751    
1752     function TSetting.Decrypt(s: string): string;
1753     var
1754     cryptObj: THogeCryptAuto;
1755     inputStream, outputStream: TStringStream;
1756     begin
1757     try
1758     inputStream := TStringStream.Create(HogeBase64Decode(s));
1759     except
1760     Result := '';
1761     Exit;
1762     end;
1763     outputStream := TStringStream.Create('');
1764     cryptObj := THogeCryptAuto.Create;
1765     try
1766     // 緇??/span>
1767     cryptObj.Decrypt(inputStream, GIKO_ENCRYPT_TEXT, outputStream);
1768     Result := outputStream.DataString;
1769     finally
1770     cryptObj.Free;
1771     outputStream.Free;
1772     inputStream.Free;
1773     end;
1774     end;
1775    
1776     function TSetting.GetMainCoolSet(Index: Integer): TCoolSet;
1777     begin
1778     if Index in [0..MAIN_COOLBAND_COUNT - 1] then
1779     Result := FMainCoolBar[Index]
1780     else begin
1781     Result.FCoolID := -1;
1782     Result.FCoolWidth := -1;
1783     Result.FCoolBreak := False;
1784     end;
1785     end;
1786    
1787     function TSetting.GetBoardCoolSet(Index: Integer): TCoolSet;
1788     begin
1789     if Index in [0..LIST_COOLBAND_COUNT - 1] then
1790     Result := FListCoolBar[Index]
1791     else begin
1792     Result.FCoolID := -1;
1793     Result.FCoolWidth := -1;
1794     Result.FCoolBreak := False;
1795     end;
1796     end;
1797    
1798     function TSetting.GetBrowserCoolSet(Index: Integer): TCoolSet;
1799     begin
1800     if Index in [0..BROWSER_COOLBAND_COUNT - 1] then
1801     Result := FBrowserCoolBar[Index]
1802     else begin
1803     Result.FCoolID := -1;
1804     Result.FCoolWidth := -1;
1805     Result.FCoolBreak := False;
1806     end;
1807     end;
1808    
1809     procedure TSetting.SetMainCoolSet(Index: Integer; CoolSet: TCoolSet);
1810     begin
1811     if Index in [0..MAIN_COOLBAND_COUNT - 1] then
1812     FMainCoolBar[Index] := CoolSet;
1813     end;
1814    
1815     procedure TSetting.SetBoardCoolSet(Index: Integer; CoolSet: TCoolSet);
1816     begin
1817     if Index in [0..LIST_COOLBAND_COUNT - 1] then
1818     FListCoolBar[Index] := CoolSet;
1819     end;
1820    
1821     procedure TSetting.SetBrowserCoolSet(Index: Integer; CoolSet: TCoolSet);
1822     begin
1823     if Index in [0..BROWSER_COOLBAND_COUNT - 1] then
1824     FBrowserCoolBar[Index] := CoolSet;
1825     end;
1826    
1827 h677 1.11 //url.ini????????????????????
1828     procedure TSetting.MakeURLIniFile();
1829     var
1830     ini: TMemIniFile;
1831     begin
1832     ini := TMemIniFile.Create(GetBoardURLFileName());
1833     try
1834 yoffy 1.14 ini.WriteInteger('URL','count',2);
1835     ini.WriteInteger('URL','selected',2);
1836     ini.WriteString('URL','1',DEFAULT_2CH_BOARD_URL1);
1837     ini.WriteString('URL','2',DEFAULT_2CH_BOARD_URL2);
1838 h677 1.11 ini.UpdateFile;
1839     finally
1840     ini.Free;
1841     end;
1842 yoffy 1.14 end;
1843    
1844     (*************************************************************************
1845     *???若?????<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
1846     *************************************************************************)
1847     function TSetting.GetBoardFileName: string;
1848     begin
1849     Result := GetAppDir + CONFIG_DIR_NAME + '\' + BOARD_FILE_NAME;
1850     end;
1851    
1852     (*************************************************************************
1853     *???若?????<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
1854     *************************************************************************)
1855     function TSetting.GetCustomBoardFileName: string;
1856     begin
1857     Result := GetAppDir + CONFIG_DIR_NAME + '\' + CUSTOMBOARD_FILE_NAME;
1858 yoffy 1.18 end;
1859    
1860     (*************************************************************************
1861     *???若?????c??????????
1862     *************************************************************************)
1863     function TSetting.GetBoardDir: string;
1864     begin
1865     Result := GetAppDir + CONFIG_DIR_NAME + '\' + BOARD_DIR_NAME + '\';
1866 yoffy 1.14 end;
1867    
1868     (*************************************************************************
1869     *???潟???????????????弱????緇?
1870     *************************************************************************)
1871     function TSetting.GetHtmlTempFileName: string;
1872     begin
1873     Result := TEMP_FOLDER;
1874     end;
1875    
1876    
1877     (*************************************************************************
1878     *絎?茵????<?ゃ????????????緇?
1879     *************************************************************************)
1880     function TSetting.GetAppDir: string;
1881     begin
1882     Result := ExtractFilePath(Application.ExeName);
1883     end;
1884    
1885     (*************************************************************************
1886     *TempHtml???<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
1887     *************************************************************************)
1888     function TSetting.GetTempFolder: string;
1889     begin
1890     Result := GetAppDir + TEMP_FOLDER;
1891     end;
1892    
1893     (*************************************************************************
1894     *sent.ini???<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
1895     *************************************************************************)
1896     function TSetting.GetSentFileName: string;
1897     begin
1898     Result := GetAppDir + SENT_FILE_NAME;
1899     end;
1900    
1901     (*************************************************************************
1902     *outbox.ini???<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
1903     *************************************************************************)
1904     function TSetting.GetOutBoxFileName: string;
1905     begin
1906     Result := GetAppDir + OUTBOX_FILE_NAME;
1907     end;
1908    
1909     (*************************************************************************
1910     *Config??????????緇?
1911     *************************************************************************)
1912     function TSetting.GetConfigDir: string;
1913     begin
1914     Result := IncludeTrailingPathDelimiter(GetAppDir + CONFIG_DIR_NAME);
1915     end;
1916    
1917     function TSetting.GetStyleSheetDir: string;
1918     begin
1919     Result := IncludeTrailingPathDelimiter(GetConfigDir + CSS_DIR_NAME);
1920     end;
1921    
1922     function TSetting.GetSkinDir: string;
1923     begin
1924     Result := IncludeTrailingPathDelimiter(GetConfigDir + SKIN_DIR_NAME);
1925     end;
1926    
1927     function TSetting.GetSkinHeaderFileName: string;
1928     begin
1929     Result := CSSFileName + SKIN_HEADER_FILE_NAME;
1930     end;
1931    
1932     function TSetting.GetSkinFooterFileName: string;
1933     begin
1934     Result := CSSFileName + SKIN_FOOTER_FILE_NAME;
1935     end;
1936    
1937     function TSetting.GetSkinNewResFileName: string;
1938     begin
1939     Result := CSSFileName + SKIN_NEWRES_FILE_NAME;
1940     end;
1941    
1942     function TSetting.GetSkinResFileName: string;
1943     begin
1944     Result := CSSFileName + SKIN_RES_FILE_NAME;
1945     end;
1946    
1947     function TSetting.GetSkinBookmarkFileName: string;
1948     begin
1949     Result := CSSFileName + SKIN_BOOKMARK_FILE_NAME;
1950     end;
1951    
1952     function TSetting.GetSkinNewmarkFileName: string;
1953     begin
1954     Result := CSSFileName + SKIN_NEWMARK_FILE_NAME;
1955 yoffy 1.15 end;
1956    
1957     function TSetting.GetNGWordsDir: string;
1958     begin
1959 yoffy 1.16 Result := IncludeTrailingPathDelimiter(GetConfigDir + NGWORDs_DIR_NAME);
1960     end;
1961    
1962     function TSetting.GetBoardPlugInDir: string;
1963     begin
1964     Result := IncludeTrailingPathDelimiter(GetConfigDir + BOARD_PLUGIN_DIR_NAME);
1965 yoffy 1.14 end;
1966    
1967     procedure TSetting.SetUseCSS( value: Boolean );
1968     begin
1969    
1970     FUseCSS := value;
1971    
1972     FUseSkin :=
1973     UseCSS and
1974     (Pos( GetSkinDir, CSSFileName ) > 0) and
1975     FileExists( GetSkinHeaderFileName );
1976    
1977     end;
1978    
1979     procedure TSetting.SetCSSFileName( fileName: string );
1980     begin
1981    
1982     FCSSFileName := fileName;
1983    
1984     FUseSkin :=
1985     UseCSS and
1986     (Pos( GetSkinDir, CSSFileName ) > 0) and
1987     FileExists( GetSkinHeaderFileName );
1988    
1989 h677 1.11 end;
1990 hi_ 1.1
1991 h677 1.31 function TSetting.GetSambaFileName: string;
1992     begin
1993     Result := GetAppDir + SAMBATIME_FILE_NAME;
1994     end;
1995 h677 1.35 //?炊?贋?育?ゅ??????眼?????鴻??篆?絖????<?ゃ??/span>
1996     function TSetting.GetIgnoreFileName: string;
1997     begin
1998     Result := GetConfigDir + IGNORE_FILE_NAME;
1999     end;
2000    
2001 hi_ 1.1 end.
2002 h677 1.35
2003 hi_ 1.1

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