OSDN Git Service

リストツールバーに [スレッド一覧の表示範囲を設定] を追加。
[gikonavigoeson/gikonavi.git] / Setting.pas
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;                //\83\81\83C\83\93CoolBand\82Ì\90\94
11         LIST_COOLBAND_COUNT = 2;                //\94ÂCoolBand\82Ì\90\94
12         BROWSER_COOLBAND_COUNT = 3;     //\83u\83\89\83E\83UCoolBand\82Ì\90\94
13
14         BOARD_FILE_NAME                                                         = 'board.2ch';
15         CUSTOMBOARD_FILE_NAME                                   = 'custom.2ch';
16         BOARD_DIR_NAME                                                          = 'Board';
17         KEY_SETTING_FILE_NAME                                   = 'key.ini';
18         EKEY_SETTING_FILE_NAME                          = 'Ekey.ini';
19         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         NGWORDs_DIR_NAME : String               = 'NGwords';
32         BOARD_PLUGIN_DIR_NAME                                   = 'BoardPlugin';
33         SAMBATIME_FILE_NAME : String    = 'Samba.ini';
34         IGNORE_FILE_NAME : String               = 'Ignore.txt';
35 //      DOLIB_LOGIN_URL     = '/~tora3n2c/futen.cgi';
36         MAX_POPUP_RES : Integer = 10;
37 type
38         TGikoTabPosition = (gtpTop, gtpBottom);                                                         // \83^\83u\88Ê\92u
39         TGikoTabAppend = (gtaFirst, gtpLast);                                                                   // \83^\83u\92Ç\89Á\88Ê\92u
40         TGikoTabStyle = (gtsTab, gtsButton, gtsFlat);                                   // \83^\83u\83X\83^\83C\83\8b
41         TGikoListOrientation = (gloHorizontal, gloVertical);    // \83\8a\83X\83g\90\82\92¼\81E\90\85\95½
42         TGikoListState = (glsMax, glsNormal, glsMin);                                   // \83\8a\83X\83g\83T\83C\83Y\8fó\91Ô
43                                                                                                                                                                                                                                 // \83|\83b\83v\83A\83b\83v\95\\8e¦\88Ê\92u
44         TGikoPopupPosition = (gppRightTop, gppTop, gppLeftTop,
45                                                                                                 gppRight, gppCenter, gppLeft,
46                                                                                                 gppRightBottom, gppBottom, gppLeftBottom);
47                                                                                                                                                                                                                                 //\83v\83\8c\83r\83\85\81[\83T\83C\83Y
48         TGikoPreviewSize = (gpsXLarge, gpsLarge, gpsMedium, gpsSmall, gpsXSmall);
49         TGikoBrowserAutoMaximize        = (gbmNone, gbmClick, gbmDoubleClick);
50                                                                                                                                                                                                                                 // \83u\83\89\83E\83U\82ð\8e©\93®\93I\82É\8dÅ\91å\89»\82·\82é\8fð\8c\8f
51         /// \83\8c\83X\95\\8e¦\94Í\88Í\81B10 \81` 65535 \82Í\8dÅ\90V n \83\8c\83X\88µ\82¢\81B
52         /// \8f«\97\88 201-300 \82Ì\82æ\82¤\82È\94Í\88Í\82ð\8e\9d\82½\82¹\82é\89Â\94\\90«\82à\8dl\82¦\82Ä\8fã\88Ê 2 byte \82Í\97\\96ñ\81B
53         TGikoResRange = (grrAll, grrSelect, grrKoko, grrNew);
54
55         /// \83X\83\8c\83b\83h\88ê\97\97\95\\8e¦\94Í\88Í
56         TGikoThreadRange = (gtrAll, gtrSelect, gtrLog, gtrNew);
57
58         //CoolBar\90Ý\92è\83\8c\83R\81[\83h
59         TCoolSet = record
60                 FCoolID: Integer;
61                 FCoolWidth: Integer;
62                 FCoolBreak: Boolean;
63         end;
64
65         TSetting = class(TObject)
66         private
67                 //\8eó\90M\83o\83b\83t\83@\83T\83C\83Y
68                 FRecvBufferSize: Integer;
69                 //HTTP1.1\8eg\97p
70                 FProtocol: Boolean;
71                 //\83v\83\8d\83L\83V\90Ú\91±HTTP1.1\8eg\97p
72                 FProxyProtocol: Boolean;
73
74                 //\83v\83\8d\83L\83V\81i\93Ç\8d\9e\97p\81j
75                 FReadProxy: Boolean;
76                 FReadProxyAddress: string;
77                 FReadProxyPort: Integer;
78                 FReadProxyUserID: string;
79                 FReadProxyPassword: string;
80
81                 //\83v\83\8d\83L\83V\81i\8f\91\8d\9e\97p\81j
82                 FWriteProxy: Boolean;
83                 FWriteProxyAddress: string;
84                 FWriteProxyPort: Integer;
85                 FWriteProxyUserID: string;
86                 FWriteProxyPassword: string;
87
88                 //\83L\83\83\83r\83l\83b\83g
89                 FCabinetFontName: string;
90                 FCabinetFontSize: Integer;
91                 FCabinetFontBold: Boolean;
92                 FCabinetFontItalic: Boolean;
93                 FCabinetFontColor: TColor;
94                 FCabinetBackColor: TColor;
95
96                 //\83\8a\83X\83g
97                 FListFontName: string;
98                 FListFontSize: Integer;
99                 FListFontBold: Boolean;
100                 FListFontItalic: Boolean;
101                 FListFontColor: TColor;
102                 FListBackColor: TColor;
103
104                 //\83u\83\89\83E\83U
105                 FBrowserFontName: string;                       // ''...default
106                 FBrowserFontSize: Integer;              // 0...default
107                 FBrowserFontBold: Integer;              // 0...default, -1...False, 1...True
108                 FBrowserFontItalic: Integer;    // \8fã\82É\93¯\82
109                 FBrowserFontColor: Integer;             // -1...default
110                 FBrowserBackColor: Integer;             // \8fã\82É\93¯\82
111
112                 //\83G\83f\83B\83^
113                 FEditorFontName: string;
114                 FEditorFontSize: Integer;
115                 FEditorFontBold: Boolean;
116                 FEditorFontItalic: Boolean;
117                 FEditorFontColor: TColor;
118                 FEditorBackColor: TColor;
119
120                 //\83^\83u\83t\83H\83\93\83g
121                 FBrowserTabFontName: string;
122                 FBrowserTabFontSize: Integer;
123                 FBrowserTabFontBold: Boolean;
124                 FBrowserTabFontItalic: Boolean;
125
126                 //\83q\83\93\83g\83E\83B\83\93\83h\83E
127                 FHintFontName: string;
128                 FHintFontSize: Integer;
129                 //FHintFontBold: Boolean;
130                 //FHintFontItalic: Boolean;
131                 FHintFontColor: TColor;
132                 FHintBackColor: TColor;
133
134                 //\83E\83B\83\93\83h\83E\83T\83C\83Y
135                 FWindowTop: Integer;
136                 FWindowLeft: Integer;
137                 FWindowHeight: Integer;
138                 FWindowWidth: Integer;
139                 FWindowMax: Boolean;
140                 //\83\8a\83X\83g\83r\83\85\81[\83X\83^\83C\83\8b
141                 FListStyle: TViewStyle;
142
143                 //\83c\81[\83\8b\83o\81[\95\\8e¦
144                 FStdToolBarVisible: Boolean;
145                 FAddressBarVisible: Boolean;
146                 FLinkBarVisible: Boolean;
147                 FListToolBarVisible: Boolean;
148                 FListNameBarVisible: Boolean;
149                 FBrowserToolBarVisible: Boolean;
150                 FBrowserNameBarVisible: Boolean;
151
152                 //\83u\83\89\83E\83U\83^\83u
153                 FBrowserTabVisible: Boolean;
154                 FBrowserTabPosition: TGikoTabPosition;
155                 FBrowserTabAppend: TGikoTabAppend;
156                 FBrowserTabStyle: TGikoTabStyle;
157
158                 //\83\81\83b\83Z\81[\83W\83o\81[
159                 FMessageBarVisible: Boolean;
160                 FMessegeBarHeight: Integer;
161
162                 //\83X\83e\81[\83^\83X\83o\81[
163                 FStatusBarVisible: Boolean;
164
165                 //\83L\83\83\83r\83l\83b\83g\89Â\8e\8b\81E\83T\83C\83Y
166                 FCabinetVisible: Boolean;
167                 FCabinetWidth: Integer;
168
169                 //\83\8a\83X\83g\81E\83u\83\89\83E\83U\83T\83C\83Y
170                 FListOrientation: TGikoListOrientation;
171                 FListHeight: Integer;
172                 FListHeightState: TGikoListState;
173                 FListWidth: Integer;
174                 FListWidthState: TGikoListState;
175 //              FListHeightMax: Boolean;
176 //              FListWidthMax: Boolean;
177
178                 //\91\97\90M\97p\96¼\91O\81E\83\81\81[\83\8b
179                 FNameList: TStringList;
180                 FMailList: TStringList;
181
182                 //\83G\83f\83B\83^\81[\83E\83B\83\93\83h\83E\83T\83C\83Y
183                 FEditWindowTop: Integer;
184                 FEditWindowLeft: Integer;
185                 FEditWindowHeight: Integer;
186                 FEditWindowWidth: Integer;
187                 FEditWindowMax: Boolean;
188         FEditWindowStay: Boolean;
189         FEditWindowTranslucent: Boolean;
190
191                 //\83\8a\83X\83g\94Ô\8d\86\95\\8e¦
192                 FListViewNo: Boolean;
193                 //CSS\95\\8e¦
194                 FUseCSS: Boolean;
195                 //CSS\83t\83@\83C\83\8b\96¼
196                 FCSSFileName: string;
197                 // \83X\83L\83\93\95\\8e¦(\88ê\8e\9e\93I\82È\82à\82Ì\82Å ini \82É\95Û\91\82Í\82³\82ê\82È\82¢)
198                 FUseSkin: Boolean;
199                 //mail\97\93\95\\8e¦
200                 FShowMail: Boolean;
201                 /// \83\8c\83X\95\\8e¦\94Í\88Í
202                 FResRange                       : Longint;
203                 /// \8bN\93®\8e\9e\83\8c\83X\95\\8e¦\94Í\88Í\82Ì\8cÅ\92è
204                 FResRangeHold   : Boolean;
205                 /// \83X\83\8c\83b\83h\88ê\97\97\95\\8e¦\94Í\88Í
206                 FThreadRange    : TGikoThreadRange;
207                 //\94ñ\83A\83N\83e\83B\83u\8e\9e\83\8c\83X\83|\83b\83v\83A\83b\83v\95\\8e¦
208                 FUnActivePopup: Boolean;
209                 //\83\8c\83X\83|\83b\83v\83A\83b\83v\83w\83b\83_\81[\83{\81[\83\8b\83h
210                 FResPopupHeaderBold: Boolean;
211
212                 //\83\8d\83O\83t\83H\83\8b\83_
213                 FLogFolder: string;
214                 FNewLogFolder: string;
215
216                 //\83\8a\83X\83g\83J\83\89\83\80\83w\83b\83_\81[\83T\83C\83Y
217                 FBBSColumnWidth: array[0..0] of Integer;
218                 FCategoryColumnWidth: array[0..3] of Integer;
219                 FBoardColumnWidth: array[0..7] of Integer;
220
221                 //\83\\81[\83g\8f\87
222                 FBBSSortIndex: Integer;
223                 FBBSSortOrder: Boolean;
224                 FCategorySortIndex: Integer;
225                 FCategorySortOrder: Boolean;
226                 FBoardSortIndex: Integer;
227                 FBoardSortOrder: Boolean;
228
229                 //Dat\97\8e\82¿\83X\83\8c\83\\81[\83g\8f\87
230                 FDatOchiSortIndex: Integer;
231                 FDatOchiSortOrder: Boolean;
232
233                 //\8di\8d\9e\82Ý\95\8e\9a\97ñ
234                 FSelectTextList: TStringList;
235
236                 //\94Â\88ê\97\97URL
237                 //FBoardURL2ch: string;
238                 FBoardURLs: TStringList;
239                 FBoardURLSelected: Integer;
240
241                 //\83\86\81[\83UID\81E\83p\83X\83\8f\81[\83h
242                 FUserID: string;
243                 FPassword: string;
244                 FAutoLogin: Boolean;
245         FForcedLogin: Boolean;
246                 FDolibURL: string;
247
248                 //URL\83N\83\8a\83b\83N\8e\9e\8bN\93®\83A\83v\83\8a
249                 FURLApp: Boolean;
250                 FURLAppFile: string;
251
252                 //mailto\83N\83\8a\83b\83N\8e\9e\93®\8dì
253                 FOpenMailer: Boolean;
254
255                 //\8dí\8f\9c\8am\94F
256                 FDeleteMsg: Boolean;
257
258                 //CoolBar\81i\83\81\83C\83\93\81E\94Â\81E\83u\83\89\83E\83U\81j
259                 FMainCoolBar: array[0..MAIN_COOLBAND_COUNT - 1] of TCoolSet;
260                 FListCoolBar: array[0..LIST_COOLBAND_COUNT - 1] of TCoolSet;
261                 FBrowserCoolBar: array[0..BROWSER_COOLBAND_COUNT - 1] of TCoolSet;
262
263                 //ToolBar Wrapable
264                 FListToolBarWrapable: Boolean;
265                 FBrowserToolBarWrapable: Boolean;
266
267                 //\83|\83b\83v\83A\83b\83v\88Ê\92u
268                 FPopupPosition: TGikoPopupPosition;
269
270                 //\83A\83h\83\8c\83X\83o\81[
271                 FURLDisplay: Boolean;
272                 FAddressBarTabStop: Boolean;
273                 FLinkAddAddressBar: Boolean;
274                 FAddressHistoryCount: Integer;
275
276                 //\89æ\91\9c\83v\83\8c\83r\83\85\81[
277                 FPreviewVisible: Boolean;
278                 FPreviewSize: TGikoPreviewSize;
279                 FPreviewWait: Integer;
280
281                 // \83u\83\89\83E\83U
282                 FBrowserAutoMaximize: TGikoBrowserAutoMaximize;
283
284                 //\83X\83\8c\83b\83h\88ê\97\97\8dX\90V\83A\83C\83R\83\93\95\\8e¦
285                 FListIconVisible: Boolean;
286                 //\8eæ\93¾\90\94\82Å\82Í\82È\82­\96¢\8eæ\93¾\82ð\95\\8e¦\82·\82é
287                 FNonAcquiredCount: Boolean;
288
289                                 //\83X\83\8c\83b\83h\88ê\97\97\82ÅLog\82Ì\82 \82é\83X\83\8c\83b\83h\82Ì\82Ý\83X\83\8c\8dì\90¬\93ú\82ð\95\\8e¦\82·\82é\82©
290                                 FCreationTimeLogs: Boolean;
291         //\83X\83\8c\83b\83h\88ê\97\97\82Ì\83X\83\8c\90\90¬\93ú\82Å\96¢\97\88\82Ì\83X\83\8c\82Ì\90\90¬\93ú\82ð\95\\8e¦\82µ\82È\82¢
292                 FFutureThread: Boolean;
293
294                 //\8f\91\82«\8d\9e\82Ý\8e\9e\83}\83V\83\93\8e\9e\8aÔ\8eg\97p\90Ý\92è
295                 FUseMachineTime: Boolean;
296                 FTimeAdjustSec: Integer;
297                 FTimeAdjust: Boolean;
298
299                 //\82 \82Ú\81`\82ñ
300                 FAbonDeleterlo : Boolean; //&rlo;\82ð\8dí\82é\82©
301                 FAbonReplaceul : Boolean; //<ul>\83^\83O\82ð<br>\83^\83O\82É\92u\8a·\82·\82é\82©
302                 FPopUpAbon               : Boolean; //\83\8c\83X\83|\83b\83v\83A\83b\83v\8e\9e\82Ì\82 \82Ú\81`\82ñ\97L\8cø
303                 FShowNGLinesNum : Boolean; //\8aY\93\96\82µ\82½\82m\82f\83\8f\81[\83h\83t\83@\83C\83\8b\82Ì\8ds\90\94\82ð\95\\8e¦
304                 FAddResAnchor : Boolean; //NG\83\8c\83X\82Ö\82Ì\83\8c\83X\83A\83\93\83J\81[\82ð\92Ç\89Á\82·\82é
305         FDeleteSyria : Boolean; //\83V\83\8a\83A\8cê\83u\83\89\83N\83\89\91Î\8dô
306
307                 // \83X\83\8c\83b\83h\8di\8d\9e\83t\83B\81[\83\8b\83h\82Ì\95\9d
308                 FSelectComboBoxWidth : Integer;
309
310                 // \8dÅ\8cã\82É\91I\91ð\82³\82ê\82½\83I\83v\83V\83\87\83\93\83_\83C\83A\83\8d\83O\82Ì\83^\83u
311                 FOptionDialogTabIndex: Integer;
312
313                 // \8dÅ\8cã\82É\91I\91ð\82³\82ê\82½\83L\83\83\83r\83l\83b\83g
314                 FCabinetIndex: Integer;
315
316                 //\8fI\97¹\8e\9e\82É\8am\94F\83_\83C\83A\83\8d\83O\82ð\95\\8e¦\82·\82é\82©
317                 FShowDialogForEnd : Boolean;
318                 //\91S\82Ä\82Ì\83^\83u\95Â\82\82é\82Ì\82Æ\82«\82É\8am\94F\83_\83C\83A\83\8d\83O\82ð\95\\8e¦\82·\82é
319                 FShowDialogForAllTabClose: Boolean;
320                 //\8eæ\93¾\83\8c\83X\90\94\82Æ\83X\83\8c\83b\83h\82Ì\83\8c\83X\90\94\82ª\88Ù\82È\82Á\82½\82Æ\82«\82É\92Ê\8fí\94w\8ci\90F\82Æ\88á\82Á\82½\90F\82Ì\94w\8ci\90F\82ð\8eg\97p\82·\82é\82©
321                 FUseOddColorOddResNum: Boolean;
322                 FOddColor: TColor;
323
324         //Samba24\91Î\8dô\8b@\94\\82ð\8eg\82¤\82©
325         FUseSamba: Boolean;
326
327                 //\83\8c\83X\83A\83\93\83J\81[\82ð\83N\83\8a\83b\83N\82µ\82Ä\83W\83\83\83\93\83v\82·\82é\82©
328                 FResAnchorJamp: Boolean;
329
330                 //Tab\8e©\93®\95Û\91
331                 FTabAutoSave: Boolean;
332                 FTabAutoLoad: Boolean;
333                 // \83G\83f\83B\83^
334                 FSpaceToNBSP    : Boolean;      ///< \94¼\8ap\83X\83y\81[\83X\81ATab \82ð &nbsp; \82É\92u\8a·
335                 FAmpToCharRef   : Boolean;      ///< '&' \82ð &amp; \82É\92u\8a·
336
337                 //\83u\83\89\83E\83U\83^\83u\94ñ\95\\8e¦\82Ì\8e\9e\82Ì\83X\83\8c\88ê\97\97\82Å\82Ì\83J\81[\83\\83\8b\83L\81[\88Ú\93®\82Ì\96³\94½\89\9e\8e\9e\8aÔ
338                 FSelectInterval : Integer;
339                 
340                 function GetMainCoolSet(Index: Integer): TCoolSet;
341                 function GetBoardCoolSet(Index: Integer): TCoolSet;
342                 function GetBrowserCoolSet(Index: Integer): TCoolSet;
343                 procedure SetMainCoolSet(Index: Integer; CoolSet: TCoolSet);
344                 procedure SetBoardCoolSet(Index: Integer; CoolSet: TCoolSet);
345                 procedure SetBrowserCoolSet(Index: Integer; CoolSet: TCoolSet);
346
347                 function GetBBSColumnWidth(index: Integer): Integer;
348                 function GetCategoryColumnWidth(index: Integer): Integer;
349                 function GetBoardColumnWidth(index: Integer): Integer;
350                 procedure SetBBSColumnWidth(index: Integer; value: Integer);
351                 procedure SetCategoryColumnWidth(index: Integer; value: Integer);
352                 procedure SetBoardColumnWidth(index: Integer; value: Integer);
353
354                 function GetSoundName(Index: Integer): string;
355                 function GetSoundViewName(Index: Integer): string;
356                 function GetSoundFileName(Index: Integer): string;
357                 procedure SetSoundFileName(Index: Integer; value: string);
358                 function Encrypt(s: string): string;
359                 function Decrypt(s: string): string;
360
361                 procedure MakeURLIniFile();
362
363                 procedure SetUseCSS( value: Boolean );
364                 procedure SetCSSFileName( fileName: string );
365         protected
366
367         public
368                 constructor Create;
369                 destructor Destroy; override;
370                 function GetFileName: string;
371                 function GetBoardURLFileName: string;
372                 procedure ReadSettingFile;
373                 procedure ReadBoardURLsFile;
374                 procedure WriteSystemSettingFile;
375                 procedure WriteWindowSettingFile;
376                 procedure WriteNameMailSettingFile;
377                 procedure WriteFolderSettingFile();
378                 procedure WriteBoardURLSettingFile;
379                 function GetSoundCount: Integer;
380                 function FindSoundFileName(Name: string): string;
381
382                 function GetBoardFileName: string;
383                 function GetCustomBoardFileName: string;
384                 function GetBoardDir: string;
385                 function GetHtmlTempFileName: string;
386                 function GetAppDir: string;
387                 function GetTempFolder: string;
388                 function GetSentFileName: string;
389                 function GetConfigDir: string;
390                 function GetSkinDir: string;
391                 function GetSkinHeaderFileName: string;
392                 function GetSkinFooterFileName: string;
393                 function GetSkinResFileName: string;
394                 function GetSkinNewResFileName: string;
395                 function GetSkinBookmarkFileName: string;
396                 function GetSkinNewmarkFileName: string;
397                 function GetStyleSheetDir: string;
398                 function GetOutBoxFileName: string;
399                 function GetNGWordsDir: string;
400                 function GetBoardPlugInDir: string;
401                 function GetSambaFileName: string;
402                 function GetIgnoreFileName: string;
403
404                 //\8eó\90M\83o\83b\83t\83@\83T\83C\83Y
405                 property RecvBufferSize: Integer read FRecvBufferSize write FRecvBufferSize;
406                 //HTTP1.1\8eg\97p
407                 property Protocol: Boolean read FProtocol write FProtocol;
408                 //\83v\83\8d\83L\83V\90Ú\91±HTTP1.1\8eg\97p
409                 property ProxyProtocol: Boolean read FProxyProtocol write FProxyProtocol;
410
411                 property ReadProxy: Boolean read FReadProxy write FReadProxy;
412                 property ReadProxyAddress: string read FReadProxyAddress write FReadProxyAddress;
413                 property ReadProxyPort: Integer read FReadProxyPort write FReadProxyPort;
414                 property ReadProxyUserID: string read FReadProxyUserID write FReadProxyUserID;
415                 property ReadProxyPassword: string read FReadProxyPassword write FReadProxyPassword;
416
417                 property WriteProxy: Boolean read FWriteProxy write FWriteProxy;
418                 property WriteProxyAddress: string read FWriteProxyAddress write FWriteProxyAddress;
419                 property WriteProxyPort: Integer read FWriteProxyPort write FWriteProxyPort;
420                 property WriteProxyUserID: string read FWriteProxyUserID write FWriteProxyUserID;
421                 property WriteProxyPassword: string read FWriteProxyPassword write FWriteProxyPassword;
422
423                 property CabinetFontName: string read FCabinetFontName write FCabinetFontName;
424                 property CabinetFontSize: Integer read FCabinetFontSize write FCabinetFontSize;
425                 property CabinetFontBold: Boolean read FCabinetFontBold write FCabinetFontBold;
426                 property CabinetFontItalic: Boolean read FCabinetFontItalic write FCabinetFontItalic;
427                 property CabinetFontColor: TColor read FCabinetFontColor write FCabinetFontColor;
428                 property CabinetBackColor: TColor read FCabinetBackColor write FCabinetBackColor;
429
430                 property ListFontName: string read FListFontName write FListFontName;
431                 property ListFontSize: Integer read FListFontSize write FListFontSize;
432                 property ListFontBold: Boolean read FListFontBold write FListFontBold;
433                 property ListFontItalic: Boolean read FListFontItalic write FListFontItalic;
434                 property ListFontColor: TColor read FListFontColor write FListFontColor;
435                 property ListBackColor: TColor read FListBackColor write FListBackColor;
436
437                 property BrowserFontName: string read FBrowserFontName write FBrowserFontName;
438                 property BrowserFontSize: Integer read FBrowserFontSize write FBrowserFontSize;
439                 property BrowserFontBold: Integer read FBrowserFontBold write FBrowserFontBold;
440                 property BrowserFontItalic: Integer read FBrowserFontItalic write FBrowserFontItalic;
441                 property BrowserFontColor: Integer read FBrowserFontColor write FBrowserFontColor;
442                 property BrowserBackColor: Integer read FBrowserBackColor write FBrowserBackColor;
443
444                 property EditorFontName: string read FEditorFontName write FEditorFontName;
445                 property EditorFontSize: Integer read FEditorFontSize write FEditorFontSize;
446                 property EditorFontBold: Boolean read FEditorFontBold write FEditorFontBold;
447                 property EditorFontItalic: Boolean read FEditorFontItalic write FEditorFontItalic;
448                 property EditorFontColor: TColor read FEditorFontColor write FEditorFontColor;
449                 property EditorBackColor: TColor read FEditorBackColor write FEditorBackColor;
450
451                 property BrowserTabFontName: string read FBrowserTabFontName write FBrowserTabFontName;
452                 property BrowserTabFontSize: Integer read FBrowserTabFontSize write FBrowserTabFontSize;
453                 property BrowserTabFontBold: Boolean read FBrowserTabFontBold write FBrowserTabFontBold;
454                 property BrowserTabFontItalic: Boolean read FBrowserTabFontItalic write FBrowserTabFontItalic;
455
456                 property HintFontName: string read FHintFontName write FHintFontName;
457                 property HintFontSize: Integer read FHintFontSize write FHintFontSize;
458                 //property HintFontBold: Boolean read FHintFontBold write FHintFontBold;
459                 //property HintFontItalic: Boolean read FHintFontItalic write FHintFontItalic;
460                 property HintFontColor: TColor read FHintFontColor write FHintFontColor;
461                 property HintBackColor: TColor read FHintBackColor write FHintBackColor;
462
463                 property WindowTop: Integer read FWindowTop write FWindowTop;
464                 property WindowLeft: Integer read FWindowLeft write FWindowLeft;
465                 property WindowHeight: Integer read FWindowHeight write FWindowHeight;
466                 property WindowWidth: Integer read FWindowWidth write FWindowWidth;
467                 property WindowMax: Boolean read FWindowMax write FWindowMax;
468                 property ListStyle: TViewStyle read FListStyle write FListStyle;
469
470                 property StdToolBarVisible: Boolean read FStdToolBarVisible write FStdToolBarVisible;
471                 property AddressBarVisible: Boolean read FAddressBarVisible write FAddressBarVisible;
472                 property LinkBarVisible: Boolean read FLinkBarVisible write FLinkBarVisible;
473                 property ListToolBarVisible: Boolean read FListToolBarVisible write FListToolBarVisible;
474                 property ListNameBarVisible: Boolean read FListNameBarVisible write FListNameBarVisible;
475                 property BrowserToolBarVisible: Boolean read FBrowserToolBarVisible write FBrowserToolBarVisible;
476                 property BrowserNameBarVisible: Boolean read FBrowserNameBarVisible write FBrowserNameBarVisible;
477
478                 property BrowserTabVisible: Boolean read FBrowserTabVisible write FBrowserTabVisible;
479                 property BrowserTabPosition: TGikoTabPosition read FBrowserTabPosition write FBrowserTabPosition;
480                 property BrowserTabAppend: TGikoTabAppend read FBrowserTabAppend write FBrowserTabAppend;
481                 property BrowserTabStyle: TGikoTabStyle read FBrowserTabStyle write FBrowserTabStyle;
482
483                 property MessageBarVisible: Boolean read FMessageBarVisible write FMessageBarVisible;
484                 property MessegeBarHeight: Integer read FMessegeBarHeight write FMessegeBarHeight;
485
486                 property StatusBarVisible: Boolean read FStatusBarVisible write FStatusBarVisible;
487
488                 property CabinetVisible: Boolean read FCabinetVisible write FCabinetVisible;
489                 property CabinetWidth: Integer read FCabinetWidth write FCabinetWidth;
490
491                 property ListOrientation: TGikoListOrientation read FListOrientation write FListOrientation;
492                 property ListHeight: Integer read FListHeight write FListHeight;
493                 property ListHeightState: TGikoListState read FListHeightState write FListHeightState;
494                 property ListWidth: Integer read FListWidth write FListWidth;
495                 property ListWidthState: TGikoListState read FListWidthState write FListWidthState;
496 //              property ListHeightMax: Boolean read FListHeightMax write FListHeightMax;
497 //              property ListWidthMax: Boolean read FListWidthMax write FListWidthMax;
498
499                 property NameList: TStringList read FNameList write FNameList;
500                 property MailList: TStringList read FMailList write FMailList;
501                 property SelectTextList: TStringList read FSelectTextList write FSelectTextList;
502
503                 property EditWindowTop: Integer read FEditWindowTop write FEditWindowTop;
504                 property EditWindowLeft: Integer read FEditWindowLeft write FEditWindowLeft;
505                 property EditWindowHeight: Integer read FEditWindowHeight write FEditWindowHeight;
506                 property EditWindowWidth: Integer read FEditWindowWidth write FEditWindowWidth;
507                 property EditWindowMax: Boolean read FEditWindowMax write FEditWindowMax;
508                 property EditWindowStay: Boolean read FEditWindowStay write FEditWindowStay;
509                 property EditWindowTranslucent: Boolean read FEditWindowTranslucent write FEditWindowTranslucent;
510
511                 property ListViewNo: Boolean read FListViewNo write FListViewNo;
512                 property UseCSS: Boolean read FUseCSS write SetUseCSS;
513                 property CSSFileName: string read FCSSFileName write SetCSSFileName;
514                 property UseSkin: Boolean read FUseSkin;
515
516                 property ShowMail: Boolean read FShowMail write FShowMail;
517                 property ResRange : Longint read FResRange write FResRange;
518                 property ResRangeHold : Boolean read FResRangeHold write FResRangeHold;
519                 property ThreadRange    : TGikoThreadRange read FThreadRange write FThreadRange;
520                 property UnActivePopup: Boolean read FUnActivePopup write FUnActivePopup;
521                 property ResPopupHeaderBold: Boolean read FResPopupHeaderBold write FResPopupHeaderBold;
522
523                 property LogFolder: string read FLogFolder write FLogFolder;
524                 property NewLogFolder: string read FNewLogFolder write FNewLogFolder;
525
526                 property BBSColumnWidth[index: Integer]: Integer read GetBBSColumnWidth write SetBBSColumnWidth;
527                 property CategoryColumnWidth[index: Integer]: Integer read GetCategoryColumnWidth write SetCategoryColumnWidth;
528                 property BoardColumnWidth[index: Integer]: Integer read GetBoardColumnWidth write SetBoardColumnWidth;
529
530                 property SoundName[index: Integer]: string read GetSoundName;
531                 property SoundViewName[index: Integer]: string read GetSoundViewName;
532                 property SoundFileName[index: Integer]: string read GetSoundFileName write SetSoundFileName;
533
534                 property BBSSortIndex: Integer read FBBSSortIndex write FBBSSortIndex;
535                 property BBSSortOrder: Boolean read FBBSSortOrder write FBBSSortOrder;
536                 property CategorySortIndex: Integer read FCategorySortIndex write FCategorySortIndex;
537                 property CategorySortOrder: Boolean read FCategorySortOrder write FCategorySortOrder;
538                 property BoardSortIndex: Integer read FBoardSortIndex write FBoardSortIndex;
539                 property BoardSortOrder: Boolean read FBoardSortOrder write FBoardSortOrder;
540
541                 property DatOchiSortIndex: Integer read FDatOchiSortIndex write FDatOchiSortIndex;
542                 property DatOchiSortOrder: Boolean read FDatOchiSortOrder write FDatOchiSortOrder;
543
544                 //property BoardURL2ch: string read FBoardURL2ch write FBoardURL2ch;
545                 property BoardURLs: TStringList read FBoardURLs write FBoardURLs;
546                 property BoardURLSelected: Integer read FBoardURLSelected write FBoardURLSelected;
547                 property UserID: string read FUserID write FUserID;
548                 property Password: string read FPassword write FPassword;
549                 property AutoLogin: Boolean read FAutoLogin write FAutoLogin;
550                 property ForcedLogin: Boolean read FForcedLogin write FForcedLogin;
551                 property DolibURL: string read FDolibURL write FDolibURL;
552
553                 property URLApp: Boolean read FURLApp write FURLApp;
554                 property URLAppFile: string read FURLAppFile write FURLAppFile;
555
556                 property OpenMailer: Boolean read FOpenMailer write FOpenMailer;
557
558                 property DeleteMsg: Boolean read FDeleteMsg write FDeleteMsg;
559
560                 property MainCoolSet[Index: Integer]: TCoolSet read GetMainCoolSet write SetMainCoolSet;
561                 property ListCoolSet[Index: Integer]: TCoolSet read GetBoardCoolSet write SetBoardCoolSet;
562                 property BrowserCoolSet[Index: Integer]: TCoolSet read GetBrowserCoolSet write SetBrowserCoolSet;
563
564                 property ListToolBarWrapable: Boolean read FListToolBarWrapable write FListToolBarWrapable;
565                 property BrowserToolBarWrapable: Boolean read FBrowserToolBarWrapable write FBrowserToolBarWrapable;
566
567                 property PopupPosition: TGikoPopupPosition read FPopupPosition write FPopupPosition;
568
569                 property URLDisplay: Boolean read FURLDisplay write FURLDisplay;
570                 property AddressBarTabStop: Boolean read FAddressBarTabStop write FAddressBarTabStop;
571                 property LinkAddAddressBar: Boolean read FLinkAddAddressBar write FLinkAddAddressBar;
572                 property AddressHistoryCount: Integer read FAddressHistoryCount write FAddressHistoryCount;
573
574                 property PreviewVisible: Boolean read FPreviewVisible write FPreviewVisible;
575                 property PreviewSize: TGikoPreviewSize read FPreviewSize write FPreviewSize;
576                 property PreviewWait: Integer read FPreviewWait write FPreviewWait;
577                 property BrowserAutoMaximize: TGikoBrowserAutoMaximize read FBrowserAutoMaximize write FBrowserAutoMaximize;
578
579                 property ListIconVisible: Boolean read FListIconVisible write FListIconVisible;
580                 property NonAcquiredCount: Boolean read FNonAcquiredCount write FNonAcquiredCount;
581                 property CreationTimeLogs: Boolean read FCreationTimeLogs write FCreationTimeLogs;
582                 property FutureThread: Boolean read FFutureThread write FFutureThread;
583
584                 property UseMachineTime: Boolean read FUseMachineTime write FUseMachineTime;
585                 property TimeAdjustSec: Integer read FTimeAdjustSec write FTimeAdjustSec;
586                 property TimeAdjust: Boolean read FTimeAdjust write FTimeAdjust;
587
588                 //\82 \82Ú\81`\82ñ
589                 property AbonDeleterlo : Boolean read FAbonDeleterlo write FAbonDeleterlo;
590                 property AbonReplaceul : Boolean read FAbonReplaceul write FAbonReplaceul;
591                 property PopUpAbon               : Boolean read FPopUpAbon write FPopUpAbon;
592                 property ShowNGLinesNum : Boolean read FShowNGLinesNum write FShowNGLinesNum;
593                 property AddResAnchor : Boolean read FAddResAnchor write FAddResAnchor;
594                 property DeleteSyria : Boolean read FDeleteSyria write FDeleteSyria;
595                 // \83X\83\8c\83b\83h\8di\8d\9e\83t\83B\81[\83\8b\83h\82Ì\95\9d
596                 property SelectComboBoxWidth : Integer read FSelectComboBoxWidth write FSelectComboBoxWidth;
597
598                 // \8dÅ\8cã\82É\91I\91ð\82³\82ê\82½\83I\83v\83V\83\87\83\93\83_\83C\83A\83\8d\83O\82Ì\83^\83u
599                 property OptionDialogTabIndex : Integer read FOptionDialogTabIndex write FOptionDialogTabIndex;
600
601                 // \8dÅ\8cã\82É\91I\91ð\82³\82ê\82½\83L\83\83\83r\83l\83b\83g
602                 property CabinetIndex : Integer read FCabinetIndex write FCabinetIndex;
603
604                 //\8fI\97¹\8e\9e\82É\8am\94F\83_\83C\83A\83\8d\83O\82ð\95\\8e¦\82·\82é\82©
605                 property ShowDialogForEnd : Boolean read FShowDialogForEnd write FShowDialogForEnd;
606                 property ShowDialogForAllTabClose: Boolean read FShowDialogForAllTabClose write FShowDialogForAllTabClose;
607                 //\8eæ\93¾\83\8c\83X\90\94\82Æ\83X\83\8c\83b\83h\82Ì\83\8c\83X\90\94\82ª\88Ù\82È\82Á\82½\82Æ\82«\82É\92Ê\8fí\94w\8ci\90F\82Æ\88á\82Á\82½\90F\82Ì\94w\8ci\90F\82ð\8eg\97p\82·\82é\82©
608                 property UseOddColorOddResNum: Boolean read FUseOddColorOddResNum write FUseOddColorOddResNum;
609                 property OddColor: TColor read FOddColor write FOddColor;
610                 property UseSamba: Boolean read FUseSamba write FUseSamba;
611                 property ResAnchorJamp: Boolean read FResAnchorJamp write FResAnchorJamp;
612
613                 // \83G\83f\83B\83^
614                 property SpaceToNBSP    : Boolean       read FSpaceToNBSP               write FSpaceToNBSP;
615                 property AmpToCharRef   : Boolean       read FAmpToCharRef      write FAmpToCharRef;
616
617                 property SelectInterval : Integer       read FSelectInterval    write FSelectInterval;
618                 //Tab\95Û\91
619                 property TabAutoSave: Boolean           read FTabAutoSave       write FTabAutoSave;
620                 property TabAutoLoad: Boolean           read FTabAutoLoad       write FTabAutoLoad;
621 end;
622
623
624
625 implementation
626
627 type
628         TSoundName = record
629                 Name: string;
630                 ViewName: string;
631                 FileName: string;
632         end;
633
634 const
635         INI_FILE_NAME: string                            = 'gikoNavi.ini';
636         BOARD_URL_INI_FILE_NAME: string = 'url.ini';
637         DEFAULT_FONT_NAME: string                = '\82l\82\82o\83S\83V\83b\83N';
638         DEFAULT_FONT_SIZE: Integer              = 9;
639         DEFAULT_FONT_COLOR: string              = 'clWindowText';
640         DEFAULT_WINDOW_COLOR: string    = 'clWindow';
641         DEFAULT_TAB_FONT_NAME: string            = '\82l\82\82o\83S\83V\83b\83N';
642         DEFAULT_TAB_FONT_SIZE: Integer          = 9;
643         DEFAULT_2CH_BOARD_URL1: string = 'http://www6.ocn.ne.jp/~mirv/2chmenu.html';
644         DEFAULT_2CH_BOARD_URL2: string = 'http://www.ff.iij4u.or.jp/~ch2/bbsmenu.html';
645                                      //http://menu.2ch.net/bbsmenu.html //\82à\82¤\82·\82®\82±\82ê\82ª\90³\8e®\82È\94Â\88ê\97\97\82É\82È\82é\82æ\82¤
646                                                                                                                                 //'http://www.2ch.net/newbbsmenu.html';
647         GIKO_ENCRYPT_TEXT: string                = 'gikoNaviEncryptText';
648
649 var
650         SOUND_NAME: array[0..4] of TSoundName = (
651                 (Name: 'New';                           ViewName: '\8eæ\93¾\90¬\8c÷';                                    FileName: ''),
652                 (Name: 'NewDiff';               ViewName: '\8eæ\93¾\90¬\8c÷(\8d·\95ª)';              FileName: ''),
653                 (Name: 'NoChange';       ViewName: '\96¢\8dX\90V';                                             FileName: ''),
654 //              (Name: 'RoundEnd';       ViewName: '\8f\84\89ñ\8fI\97¹(\8eæ\93¾\82 \82è)'; FileName: ''),
655 //              (Name: 'RoundNone';     ViewName: '\8f\84\89ñ\8fI\97¹(\8eæ\93¾\82È\82µ)'; FileName: ''),
656                 (Name: 'ResEnd';                 ViewName: '\83\8c\83X\91\97\90M\8a®\97¹';                       FileName: ''),
657                 (Name: 'Error';                 ViewName: '\83G\83\89\81[';                                              FileName: ''));
658
659 //\83R\83\93\83X\83g\83\89\83N\83^
660 constructor TSetting.Create();
661 begin
662         FNameList := TStringList.Create;
663         FMailList := TStringList.Create;
664         FSelectTextList := TStringList.Create;
665         FBoardURLs := TStringList.Create;
666         FNameList.Duplicates := dupIgnore;
667         FMailList.Duplicates := dupIgnore;
668         FBoardURLs.Duplicates := dupIgnore;
669         FSelectTextList.Duplicates := dupIgnore;
670         ReadSettingFile();
671         ReadBoardURLsFile();
672 end;
673
674 //\83f\83X\83g\83\89\83N\83^
675 destructor TSetting.Destroy();
676 begin
677         inherited;
678         FSelectTextList.Free;
679         FBoardURLs.Free;
680         FMailList.Free;
681         FNameList.Free;
682 end;
683
684 //\8f\89\8aú\89»\83t\83@\83C\83\8b\96¼\8eæ\93¾\81i\83p\83X\81{\83t\83@\83C\83\8b\96¼\81j
685 function TSetting.GetFileName(): string;
686 begin
687         Result := ExtractFilePath(Application.ExeName) + INI_FILE_NAME;
688 end;
689
690 //\94Â\8dX\90V\97pURL\90Ý\92è\83t\83@\83C\83\8b\96¼\81i\83p\83X\81{\83t\83@\83C\83\8b\96¼\81j
691 function TSetting.GetBoardURLFileName(): string;
692 begin
693         Result := ExtractFilePath(Application.ExeName) + BOARD_URL_INI_FILE_NAME;
694 end;
695
696 //\90Ý\92è\83t\83@\83C\83\8b\93Ç\8d\9e
697 procedure TSetting.ReadSettingFile();
698 const
699         DEFAULT_BBS_WIDTH: array[0..0] of Integer = (140);
700         DEFAULT_CATEGORY_WIDTH: array[0..3] of Integer = (150, 80, 130, 130);
701         DEFAULT_BOARD_WIDTH: array[0..7] of Integer = (350, 60, 60, 60, 60, 80, 130, 130);
702         MAX_WIDTH: Integer = 2000;
703 var
704         ini: TMemIniFile;
705         i: Integer;
706         wkList: TStringList;
707         wkStr: string;
708         Exists: Boolean;
709         s: string;
710 //      id: Integer;
711         CoolSet: TCoolSet;
712 begin
713         Exists := FileExists(GetFileName);
714         ini := TMemIniFile.Create(GetFileName);
715         try
716                 //\8eó\90M\83o\83b\83t\83@\83T\83C\83Y
717                 FRecvBufferSize := ini.ReadInteger('HTTP', 'RecvBufferSize', 4096);
718                 //HTTP1.1\8eg\97p
719                 FProtocol := ini.ReadBool('HTTP', 'Protocol', True);
720                 //\83v\83\8d\83L\83V\90Ú\91±HTTP1.1\8eg\97p
721                 FProxyProtocol := ini.ReadBool('HTTP', 'ProxyProtocol', False);
722
723                 FReadProxy := ini.ReadBool('ReadProxy', 'Proxy', false);
724                 FReadProxyAddress := ini.ReadString('ReadProxy', 'Address', '');
725                 FReadProxyPort := ini.ReadInteger('ReadProxy', 'Port', 0);
726                 FReadProxyUserID := ini.ReadString('ReadProxy', 'UserID', '');
727                 FReadProxyPassword := ini.ReadString('ReadProxy', 'Password', '');
728
729                 FWriteProxy := ini.ReadBool('WriteProxy', 'Proxy', false);
730                 FWriteProxyAddress := ini.ReadString('WriteProxy', 'Address', '');
731                 FWriteProxyPort := ini.ReadInteger('WriteProxy', 'Port', 0);
732                 FWriteProxyUserID := ini.ReadString('WriteProxy', 'UserID', '');
733                 FWriteProxyPassword := ini.ReadString('WriteProxy', 'Password', '');
734
735                 FBrowserFontName := ini.ReadString('Window', 'BrowserFontName', '');
736                 FBrowserFontSize := ini.ReadInteger('Window', 'BrowserFontSize', 0);
737                 FBrowserFontBold := ini.ReadInteger('Window', 'BrowserFontBold', 0);
738                 FBrowserFontItalic := ini.ReadInteger('Window', 'BrowserFontItalic', 0);
739                 FBrowserFontColor := ini.ReadInteger('Window', 'BrowserFontColor', -1);
740                 FBrowserBackColor := ini.ReadInteger('Window', 'BrowserBackColor', -1);
741
742                 FCabinetFontName := ini.ReadString('Window', 'CabinetFontName', DEFAULT_FONT_NAME);
743                 FCabinetFontSize := ini.ReadInteger('Window', 'CabinetFontSize', DEFAULT_FONT_SIZE);
744                 FCabinetFontBold := ini.ReadBool('Window', 'CabinetFontBold', False);
745                 FCabinetFontItalic := ini.ReadBool('Window', 'CabinetFontItalic', False);
746                 FCabinetFontColor := StringToColor(ini.ReadString('Window', 'CabinetFontColor', DEFAULT_FONT_COLOR));
747                 FCabinetBackColor := StringToColor(ini.ReadString('Window', 'CabinetBackColor', DEFAULT_WINDOW_COLOR));
748
749                 FListFontName := ini.ReadString('Window', 'ListFontName', DEFAULT_FONT_NAME);
750                 FListFontSize := ini.ReadInteger('Window', 'ListFontSize', DEFAULT_FONT_SIZE);
751                 FListFontBold := ini.ReadBool('Window', 'ListFontBold', False);
752                 FListFontItalic := ini.ReadBool('Window', 'ListFontItalic', False);
753                 FListFontColor := StringToColor(ini.ReadString('Window', 'ListFontColor', DEFAULT_FONT_COLOR));
754                 FListBackColor := StringToColor(ini.ReadString('Window', 'ListBackColor', DEFAULT_WINDOW_COLOR));
755                 FUseOddColorOddResNum := ini.ReadBool('Window','UseOddColor', False);
756                 FOddColor := StringToColor(ini.ReadString('Window', 'OddColor', DEFAULT_WINDOW_COLOR));
757
758                 FEditorFontName := ini.ReadString('Window', 'EditorFontName', DEFAULT_FONT_NAME);
759                 FEditorFontSize := ini.ReadInteger('Window', 'EditorFontSize', DEFAULT_FONT_SIZE);
760                 FEditorFontBold := ini.ReadBool('Window', 'EditorFontBold', False);
761                 FEditorFontItalic := ini.ReadBool('Window', 'EditorFontItalic', False);
762                 FEditorFontColor := StringToColor(ini.ReadString('Window', 'EditorFontColor', DEFAULT_FONT_COLOR));
763                 FEditorBackColor := StringToColor(ini.ReadString('Window', 'EditorBackColor', DEFAULT_WINDOW_COLOR));
764
765                 FBrowserTabFontName := ini.ReadString('Window', 'BrowserTabFontName', DEFAULT_TAB_FONT_NAME);
766                 FBrowserTabFontSize := ini.ReadInteger('Window', 'BrowserTabFontSize', DEFAULT_TAB_FONT_SIZE);
767                 FBrowserTabFontBold := ini.ReadBool('Window', 'BrowserTabFontBold', False);
768                 FBrowserTabFontItalic := ini.ReadBool('Window', 'BrowserTabFontItalic', False);
769
770                 FHintFontName := ini.ReadString('Window', 'HintFontName', Screen.HintFont.Name);
771                 FHintFontSize := ini.ReadInteger('Window', 'HintFontSize', Screen.HintFont.Size);
772                 //FHintFontBold := ini.ReadBool('Window', 'HintFontBold', False);
773                 //FHintFontItalic := ini.ReadBool('Window', 'HintFontItalic', False);
774                 FHintFontColor := StringToColor(ini.ReadString('Window', 'HintFontColor', DEFAULT_FONT_COLOR));
775                 FHintBackColor := StringToColor(ini.ReadString('Window', 'HintBackColor', 'clInfoBk'));
776
777                 FWindowTop := ini.ReadInteger('WindowSize', 'Top', -1);
778                 FWindowLeft := ini.ReadInteger('WindowSize', 'Left', -1);
779                 FWindowHeight := ini.ReadInteger('WindowSize', 'Height', -1);
780                 FWindowWidth := ini.ReadInteger('WindowSize', 'Width', -1);
781                 FWindowMax := ini.ReadBool('WindowSize', 'Max', false);
782
783                 if FWindowHeight <= 0 then      FWindowHeight := 400;
784                 if FWindowWidth <= 0 then FWindowWidth := 600;
785
786                 FListStyle := TViewStyle(ini.ReadInteger('ViewStyle', 'ListView', Ord(vsReport)));
787
788                 FEditWindowTop := ini.ReadInteger('EditorWindowSize', 'Top', -1);
789                 FEditWindowLeft := ini.ReadInteger('EditorWindowSize', 'Left', -1);
790                 FEditWindowHeight := ini.ReadInteger('EditorWindowSize', 'Height', -1);
791                 FEditWindowWidth := ini.ReadInteger('EditorWindowSize', 'Width', -1);
792                 FEditWindowMax := ini.ReadBool('EditorWindowSize', 'Max', False);
793                 FEditWindowStay := ini.ReadBool('EditorWindowSize', 'Stay', False);
794                 FEditWindowTranslucent := ini.ReadBool('EditorWindowSize', 'Translucent', False);
795
796                 FOptionDialogTabIndex := ini.ReadInteger('OptionDialog', 'TabIndex', 0);
797
798                 //\83c\81[\83\8b\83o\81[
799                 FStdToolBarVisible := ini.ReadBool('ToolBar', 'StdVisible', True);
800                 FAddressBarVisible := ini.ReadBool('ToolBar', 'AddressVisible', True);
801                 FLinkBarVisible := ini.ReadBool('ToolBar', 'LinkVisible', True);
802                 FListToolBarVisible := ini.ReadBool('ToolBar', 'ListVisible', True);
803                 FListNameBarVisible := ini.ReadBool('ToolBar', 'ListNameVisible', True);
804                 FBrowserToolBarVisible := ini.ReadBool('ToolBar', 'BrowserVisible', True);
805                 FBrowserNameBarVisible := ini.ReadBool('ToolBar', 'BrowserNameVisible', True);
806                 //\83c\81[\83\8b\83o\81[Wrapable
807                 FListToolBarWrapable := ini.ReadBool('ToolBar', 'ListWrapable', False);
808                 FBrowserToolBarWrapable := ini.ReadBool('ToolBar', 'BrowserWrapable', False);
809
810                 FBrowserTabVisible := ini.ReadBool('Tab', 'BrowserTabVisible', True);
811                 FBrowserTabPosition := TGikoTabPosition(ini.ReadInteger('Tab', 'BrowserTabPosition', Ord(gtpTop)));
812                 FBrowserTabAppend := TGikoTabAppend(ini.ReadInteger('Tab', 'BrowserTabAppend', Ord(gtaFirst)));
813                 FBrowserTabStyle := TGikoTabStyle(ini.ReadInteger('Tab', 'BrowserTabStyle', Ord(gtsFlat)));
814
815                 FMessageBarVisible := ini.ReadBool('MessageBar', 'Visible', True);
816                 FMessegeBarHeight := ini.ReadInteger('MessageBar', 'Height', 30);
817
818                 FStatusBarVisible := ini.ReadBool('StatusBar', 'Visible', True);
819
820                 FCabinetVisible := ini.ReadBool('Cabinet', 'Visible', True);
821                 FCabinetWidth := ini.ReadInteger('Cabinet', 'Width', 200);
822                 FCabinetIndex := ini.ReadInteger('Cabinet', 'Index', 0);
823
824                 FListOrientation := TGikoListOrientation(ini.ReadInteger('List', 'Orientation', Ord(gloHorizontal)));
825                 FListHeight := ini.ReadInteger('List', 'Height', 180);
826                 FListHeightState := TGikoListState(ini.ReadInteger('List', 'HeightState', Ord(glsNormal)));
827                 FListWidth := ini.ReadInteger('List', 'Width', 180);
828                 FListWidthState := TGikoListState(ini.ReadInteger('List', 'WidthState', Ord(glsNormal)));
829 //              FListHeightMax := ini.ReadBool('List', 'HeightMax', False);
830 //              FListWidthMax := ini.ReadBool('List', 'WidthMax', False);
831
832                 wkList := TStringList.Create;
833                 try
834                         ini.ReadSection('Name', wkList);
835                         for i := 0 to wkList.Count - 1 do begin
836                                 wkStr := ini.ReadString('Name', wkList[i], '');
837                                 if (wkStr <> '') and (FNameList.IndexOf(wkStr) = -1) then
838                                         FNameList.Add(wkStr);
839                         end;
840                         ini.ReadSection('Mail', wkList);
841                         for i := 0 to wkList.Count - 1 do begin
842                                 wkStr := ini.ReadString('Mail', wkList[i], '');
843                                 if (wkStr <> '') and (FMailList.IndexOf(wkStr) = -1) then
844                                         FMailList.Add(wkStr);
845                         end;
846                         ini.ReadSection('SelectText', wkList);
847                         for i := 0 to wkList.Count - 1 do begin
848                                 wkStr := ini.ReadString('SelectText', wkList[i], '');
849                                 if (wkStr <> '') and (FSelectTextList.IndexOf(wkStr) = -1) then
850                                         FSelectTextList.Add(wkStr);
851                         end;
852                 finally
853                         wkList.Free;
854                 end;
855
856                 //\83\8a\83X\83g\83J\83\89\83\80
857                 wkList := TStringList.Create;
858                 try
859                         ini.ReadSection('BBSColumnWidth', wkList);
860                         if Length(FBBSColumnWidth) <> wkList.Count then begin
861                                 ini.EraseSection('BBSColumnWidth');
862                         end;
863                         for i := 0 to Length(FBBSColumnWidth) - 1 do begin
864                                 BBSColumnWidth[i] := ini.ReadInteger('BBSColumnWidth', 'ID' + IntToStr(i), DEFAULT_BBS_WIDTH[i]);
865                                 if BBSColumnWidth[i] > MAX_WIDTH then
866                                         BBSColumnWidth[i] := DEFAULT_BBS_WIDTH[i];
867                         end;
868                         ini.ReadSection('CategoryColumnWidth', wkList);
869                         if Length(FCategoryColumnWidth) <> wkList.Count then begin
870                                 ini.EraseSection('CategoryColumnWidth');
871                         end;
872                         for i := 0 to Length(FCategoryColumnWidth) - 1 do begin
873                                 CategoryColumnWidth[i] := ini.ReadInteger('CategoryColumnWidth', 'ID' + IntToStr(i), DEFAULT_CATEGORY_WIDTH[i]);
874                                 if CategoryColumnWidth[i] > MAX_WIDTH then
875                                         CategoryColumnWidth[i] := DEFAULT_CATEGORY_WIDTH[i];
876                         end;
877                         ini.ReadSection('BoardColumnWidth', wkList);
878                         if Length(FBoardColumnWidth) <> wkList.Count then begin
879                                 ini.EraseSection('BoardColumnWidth');
880                         end;
881                         for i := 0 to Length(FBoardColumnWidth) - 1 do begin
882                                 BoardColumnWidth[i] := ini.ReadInteger('BoardColumnWidth', 'ID' + IntToStr(i), DEFAULT_BOARD_WIDTH[i]);
883                                 if BoardColumnWidth[i] > MAX_WIDTH then
884                                         BoardColumnWidth[i] := DEFAULT_BOARD_WIDTH[i];
885                         end;
886                 finally
887                         wkList.Free;
888                 end;
889
890                 //\83\8a\83X\83g\94Ô\8d\86
891                 FListViewNo := ini.ReadBool('Function', 'ListViewNo', True);
892                 //CSS
893                 UseCSS := ini.ReadBool('CSS', 'UseCSS', True);
894                 //CSS\83t\83@\83C\83\8b\96¼
895                 CSSFileName := ini.ReadString('CSS', 'FileName', 'default.css');
896
897                 //Mail\97\93\95\\8e¦
898                 FShowMail := ini.ReadBool('Thread', 'ShowMail', True);
899                 // \83\8c\83X\95\\8e¦\94Í\88Í
900                 if ini.ReadBool('Thread', 'OnlyAHundredRes',false) then
901                         FResRange := 100        // \8cÃ\82¢\90Ý\92è\82Ì\8cÝ\8a·\97p
902                 else
903                         FResRange := ini.ReadInteger( 'Thread', 'ResRange', 100 );
904                 FResRangeHold := ini.ReadBool( 'Thread', 'ResRangeHold', False );
905                 // \83X\83\8c\83b\83h\88ê\97\97\95\\8e¦\94Í\88Í
906                 FThreadRange := TGikoThreadRange( ini.ReadInteger('ThreadList', 'ThreadRange', Ord( gtrAll )) );
907                 //\94ñ\83A\83N\83e\83B\83u\8e\9e\83\8c\83X\83|\83b\83v\83A\83b\83v\95\\8e¦
908                 FUnActivePopup := ini.ReadBool('Thread', 'UnActivePopup', False);
909                 //\83\8c\83X\83|\83b\83v\83A\83b\83v\83w\83b\83_\81[\83{\81[\83\8b\83h
910                 FResPopupHeaderBold := ini.ReadBool('Thread', 'ResPopupHeaderBold', True);
911                 //\8dí\8f\9c\8am\94F
912                 FDeleteMsg := ini.ReadBool('Function', 'LogDeleteMessage', True);
913                 //\8fI\97¹\8am\94F
914                 FShowDialogForEnd := ini.ReadBool('Function','ShowDialogForEnd',false);
915                 //AllTabClose
916                 FShowDialogForAllTabClose := ini.ReadBool('Function','ShowDialogForAllTabClose',false);
917                 //Samba
918                 FUseSamba := ini.ReadBool('Function','UseSamba', True);
919                 //ResAnchorjamp
920                 ResAnchorJamp := ini.ReadBool('Function', 'ResAnchoJamp', True);
921                 //\83\8d\83O\83t\83H\83\8b\83_
922                 FLogFolder := ini.ReadString('Folder', 'LogFolder', ExtractFilePath(Application.ExeName) + 'Log');
923                 NewLogFolder := '';
924
925                 //\94ÂURL
926                 //\95¡\90\94\93o\98^\82Å\82«\82é\82æ\82¤\82É\82µ\82ÄFBoardURLs\82É\82µ\82½\81@2003/10/05
927                 //FBoardURL2ch := ini.ReadString('BoardURL', '2ch', DEFAULT_2CH_BOARD_URL);
928
929                 //\94F\8fØ\97p\83\86\81[\83UID\81E\83p\83X\83\8f\81[\83h
930                 FUserID := ini.ReadString('Attestation', 'UserID', '');
931                 FPassword := Decrypt(ini.ReadString('Attestation', 'Password', ''));
932                 FAutoLogin := ini.ReadBool('Attestation', 'AutoLogin', False);
933                 FForcedLogin := ini.ReadBool('Attestation', 'FForcedLogin', False);
934 //              FDolibURL       := ini.ReadString('Attestation', 'FDolibURL', DOLIB_LOGIN_URL);
935
936                 //URL\83N\83\8a\83b\83N\8e\9e\8bN\93®\83A\83v\83\8a
937                 FURLApp := ini.ReadBool('URLApp', 'Select', False);
938                 FURLAppFile := ini.ReadString('URLApp', 'File', '');
939
940                 //mailto\83N\83\8a\83b\83N\8e\9e\93®\8dì
941                 FOpenMailer := ini.ReadBool('Mailto', 'Open', True);
942
943                 //\83|\83b\83v\83A\83b\83v\88Ê\92u
944                 FPopupPosition := TGikoPopupPosition(ini.ReadInteger('Browser', 'PopupPosition', Ord(gppLeftBottom)));
945
946                 //\83A\83h\83\8c\83X\83o\81[
947                 FURLDisplay := ini.ReadBool('AddressBar', 'URLDisplay', False);
948                 FAddressBarTabStop := ini.ReadBool('AddressBar', 'TabStop', True);
949                 FLinkAddAddressBar := ini.ReadBool('AddressBar', 'LinkAdd', False);
950                 FAddressHistoryCount := ini.ReadInteger('AddressBar', 'HistoryCount', 100);
951
952                 //\89æ\91\9c\83v\83\8c\83r\83\85\81[
953                 FPreviewVisible := ini.ReadBool('Browser', 'PreviewVisible', True);
954                 FPreviewSize := TGikoPreviewSize(ini.ReadInteger('Browser', 'PreviewSize', Ord(gpsMedium)));
955                 FPreviewWait := ini.ReadInteger('Browser', 'PreviewWait', 500);
956
957                 // \83u\83\89\83E\83U
958                 FBrowserAutoMaximize := TGikoBrowserAutoMaximize(
959                         ini.ReadInteger('Window', 'BrowserAutoMaximize', Ord(gbmDoubleClick)) );
960
961                 //\83X\83\8c\83b\83h\88ê\97\97\8dX\90V\83A\83C\83R\83\93
962                 FListIconVisible := ini.ReadBool('ThreadList', 'StateIconVisible', True);
963                 FNonAcquiredCount := ini.ReadBool('ThreadList', 'NonAcquiredCount', False);
964                 FCreationTimeLogs := ini.ReadBool('ThreadList', 'CreationTimeLogs', True);
965                 FFutureThread := ini.ReadBool('ThreadList', 'FutureThread', True);
966                 FSelectInterval := ini.ReadInteger('ThreadList', 'SelectInterval', 110);
967                 //\83\\81[\83g\8f\87
968                 FBBSSortIndex := ini.ReadInteger('ThreadList', 'BBSSortIndex', 0);
969                 FBBSSortOrder := ini.ReadBool('ThreadList', 'BBSSortOrder', False);
970                 FCategorySortIndex := ini.ReadInteger('ThreadList', 'CategorySortIndex', 0);
971                 FCategorySortOrder := ini.ReadBool('ThreadList', 'CategorySortOrder', False);
972                 FBoardSortIndex := ini.ReadInteger('ThreadList', 'BoardSortIndex', 0);
973                 FBoardSortOrder := ini.ReadBool('ThreadList', 'BoardSortOrder', False);
974                 //Dat\97\8e\82¿\83X\83\8c\83\\81[\83g\8f\87
975                 FDatOchiSortIndex := ini.ReadInteger('ThreadList', 'DatOchiSortIndex', -1);
976                 FDatOchiSortOrder := ini.ReadBool('ThreadList', 'DatOchiSortOrder', False);
977
978                 //\8f\91\82«\8d\9e\82Ý\8e\9e\83}\83V\83\93\8e\9e\8d\8f\8eg\97p\90Ý\92è
979                 FUseMachineTime := ini.ReadBool('PostTime', 'UseMachineTime', False);
980                 FTimeAdjustSec := ini.ReadInteger('PostTime', 'TimeAdjustSec', 0);
981                 FTimeAdjust := ini.ReadBool('PostTime', 'TimeAdjust', True);
982
983                 //\83T\83E\83\93\83h
984                 if Exists then begin
985                         for i := 0 to GetSoundCount - 1 do begin
986                                 SoundFileName[i] := ini.ReadString('Sound', SoundName[i], '');
987                                 if not FileExists(SoundFileName[i]) then
988                                         SoundFileName[i] := '';
989                         end;
990                 end else begin
991                         s := ExtractFileDir(Application.ExeName) + '\sound\';
992                         SoundFileName[0] := s + '\8eæ\93¾\90¬\8c÷.wav';
993                         SoundFileName[1] := s + '\8eæ\93¾\90¬\8c÷(\8d·\95ª).wav';
994                         SoundFileName[2] := s + '\96¢\8dX\90V.wav';
995                         SoundFileName[3] := '';
996                         SoundFileName[4] := s + '\83G\83\89\81[.wav';
997                 end;
998
999                 //\83N\81[\83\8b\83o\81[
1000                 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1001                         CoolSet.FCoolID := ini.ReadInteger('MainCoolBar', 'ID' + IntToStr(i), -1);
1002                         CoolSet.FCoolWidth := ini.ReadInteger('MainCoolBar', 'Width' + IntToStr(i), -1);
1003                         CoolSet.FCoolBreak := ini.ReadBool('MainCoolBar', 'Break' + IntToStr(i), False);
1004                         MainCoolSet[i] := CoolSet;
1005                 end;
1006                 FSelectComboBoxWidth := ini.ReadInteger( 'ListCoolBar', 'SelectWidth', 127 );
1007                 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1008                         CoolSet.FCoolID := ini.ReadInteger('ListCoolBar', 'ID' + IntToStr(i), -1);
1009                         CoolSet.FCoolWidth := ini.ReadInteger('ListCoolBar', 'Width' + IntToStr(i), -1);
1010                         CoolSet.FCoolBreak := ini.ReadBool('ListCoolBar', 'Break' + IntToStr(i), False);
1011                         ListCoolSet[i] := CoolSet;
1012                 end;
1013                 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1014                         CoolSet.FCoolID := ini.ReadInteger('BrowserCoolBar', 'ID' + IntToStr(i), -1);
1015                         CoolSet.FCoolWidth := ini.ReadInteger('BrowserCoolBar', 'Width' + IntToStr(i), -1);
1016                         CoolSet.FCoolBreak := ini.ReadBool('BrowserCoolBar', 'Break' + IntToStr(i), False);
1017                         BrowserCoolSet[i] := CoolSet;
1018                 end;
1019
1020                 //\82 \82Ú\81`\82ñ
1021                 FAbonDeleterlo := ini.ReadBool('Abon','Deleterlo',false);
1022                 FAbonReplaceul := ini.ReadBool('Abon','Replaceul',false);
1023                 FPopUpAbon               := ini.ReadBool('Abon','Popup',false);
1024                 FShowNGLinesNum := ini.ReadBool('Abon','ShowNGLines',false);
1025                 FAddResAnchor := ini.ReadBool('Abon','AddResAnchor',false);
1026                 FDeleteSyria :=  ini.ReadBool('Abon','DeleteSyria',false);
1027
1028                 // \83G\83f\83B\83^
1029                 FSpaceToNBSP    := ini.ReadBool( 'Editor', 'SpaceToNBSP', True );
1030                 FAmpToCharRef   := ini.ReadBool( 'Editor', 'AmpToCharRef', False );
1031
1032                 //Tab\8e©\93®\95Û\91\81A\93Ç\82Ý\8d\9e\82Ý
1033                 FTabAutoSave    := ini.ReadBool('TabAuto', 'TabAutoSave', False);
1034                 FTabAutoLoad    := ini.ReadBool('TabAuto', 'TabAutoLoad', False);
1035
1036
1037         finally
1038                 ini.Free;
1039         end;
1040 end;
1041 //\94Â\8dX\90V\97pURL\93Ç\82Ý\8d\9e\82Ý
1042 procedure TSetting.ReadBoardURLsFile();
1043 var
1044         ini: TMemIniFile;
1045         urlNum: Integer;
1046         i : Integer;
1047 begin
1048         if not FileExists(GetBoardURLFileName()) then
1049         MakeURLIniFile();
1050         ini := TMemIniFile.Create(GetBoardURLFileName());
1051         try
1052                 urlNum := ini.ReadInteger('URL','count',0);
1053                 BoardURLSelected := ini.ReadInteger('URL','selected',0);
1054                 for i := 0 to urlNum - 1 do begin
1055                         FBoardURLs.Append(ini.ReadString('URL',IntToStr(i+1),''));
1056                 end;
1057         finally
1058                 ini.Free;
1059         end;
1060
1061 end;
1062 //\90Ý\92è\83t\83@\83C\83\8b\95Û\91¶(system)
1063 procedure TSetting.WriteSystemSettingFile();
1064 var
1065         ini: TMemIniFile;
1066 begin
1067         ini := TMemIniFile.Create(GetFileName());
1068         try
1069                 //\8eó\90M\83o\83b\83t\83@\83T\83C\83Y
1070                 ini.WriteInteger('HTTP', 'RecvBufferSize', FRecvBufferSize);
1071                 //HTTP1.1\8eg\97p
1072                 ini.WriteBool('HTTP', 'Protocol', FProtocol);
1073                 //\83v\83\8d\83L\83V\90Ú\91±HTTP1.1\8eg\97p
1074                 ini.WriteBool('HTTP', 'ProxyProtocol', FProxyProtocol);
1075
1076                 ini.WriteBool('ReadProxy', 'Proxy', FReadProxy);
1077                 ini.WriteString('ReadProxy', 'Address', FReadProxyAddress);
1078                 ini.WriteInteger('ReadProxy', 'Port', FReadProxyPort);
1079                 ini.WriteString('ReadProxy', 'UserID', FReadProxyUserID);
1080                 ini.WriteString('ReadProxy', 'Password', FReadProxyPassword);
1081
1082                 ini.WriteBool('WriteProxy', 'Proxy', FWriteProxy);
1083                 ini.WriteString('WriteProxy', 'Address', FWriteProxyAddress);
1084                 ini.WriteInteger('WriteProxy', 'Port', FWriteProxyPort);
1085                 ini.WriteString('WriteProxy', 'UserID', FWriteProxyUserID);
1086                 ini.WriteString('WriteProxy', 'Password', FWriteProxyPassword);
1087
1088                 ini.WriteString('Window', 'BrowserFontName', FBrowserFontName);
1089                 ini.WriteInteger('Window', 'BrowserFontSize', FBrowserFontSize);
1090                 ini.WriteInteger('Window', 'BrowserFontSize', FBrowserFontSize);
1091                 ini.WriteInteger('Window', 'BrowserFontBold', FBrowserFontBold);
1092                 ini.WriteInteger('Window', 'BrowserFontItalic', FBrowserFontItalic);
1093                 ini.WriteInteger('Window', 'BrowserFontColor', FBrowserFontColor);
1094                 ini.WriteInteger('Window', 'BrowserBackColor', FBrowserBackColor);
1095
1096                 ini.WriteString('Window', 'CabinetFontName', FCabinetFontName);
1097                 ini.WriteInteger('Window', 'CabinetFontSize', FCabinetFontSize);
1098                 ini.WriteString('Window', 'CabinetFontColor', ColorToString(FCabinetFontColor));
1099                 ini.WriteString('Window', 'CabinetBackColor', ColorToString(FCabinetBackColor));
1100
1101                 ini.WriteString('Window', 'ListFontName', FListFontName);
1102                 ini.WriteInteger('Window', 'ListFontSize', FListFontSize);
1103                 ini.WriteString('Window', 'ListFontColor', ColorToString(FListFontColor));
1104                 ini.WriteString('Window', 'ListBackColor', ColorToString(FListBackColor));
1105                 ini.WriteBool('Window','UseOddColor',FUseOddColorOddResNum);
1106                 ini.WriteString('Window', 'OddColor',ColorToString(FOddColor));
1107
1108                 ini.WriteString('Window', 'EditorFontName', FEditorFontName);
1109                 ini.WriteInteger('Window', 'EditorFontSize', FEditorFontSize);
1110                 ini.WriteString('Window', 'EditorFontColor', ColorToString(FEditorFontColor));
1111                 ini.WriteString('Window', 'EditorBackColor', ColorToString(FEditorBackColor));
1112
1113                 ini.WriteString('Window', 'BrowserTabFontName', FBrowserTabFontName);
1114                 ini.WriteInteger('Window', 'BrowserTabFontSize', FBrowserTabFontSize);
1115                 ini.WriteBool('Window', 'BrowserTabFontBold', FBrowserTabFontBold);
1116                 ini.WriteBool('Window', 'BrowserTabFontItalic', FBrowserTabFontItalic);
1117
1118                 ini.WriteString('Window', 'HintFontName', FHintFontName);
1119                 ini.WriteInteger('Window', 'HintFontSize', FHintFontSize);
1120                 ini.WriteString('Window', 'HintFontColor', ColorToString(FHintFontColor));
1121                 ini.WriteString('Window', 'HintBackColor', ColorToString(FHintBackColor));
1122
1123                 //\8e©\93®\95Û\91¶¥\95\9c\8c³
1124                 ini.WriteBool('TabAuto', 'TabAutoLoad', FTabAutoLoad);
1125                 ini.WriteBool('TabAuto', 'TabAutoSave', FTabAutoSave);
1126
1127                 ini.UpdateFile;
1128         finally
1129                 ini.Free;
1130         end;
1131 end;
1132
1133 //\90Ý\92è\83t\83@\83C\83\8b\95Û\91¶(window)
1134 procedure TSetting.WriteWindowSettingFile();
1135 var
1136         i: Integer;
1137         ini: TMemIniFile;
1138         CoolSet: TCoolSet;
1139 begin
1140         ini := TMemIniFile.Create(GetFileName());
1141         try
1142                 ini.WriteInteger('WindowSize', 'Top', WindowTop);
1143                 ini.WriteInteger('WindowSize', 'Left', WindowLeft);
1144                 ini.WriteInteger('WindowSize', 'Height', WindowHeight);
1145                 ini.WriteInteger('WindowSize', 'Width', WindowWidth);
1146                 ini.WriteBool('WindowSize', 'Max', WindowMax);
1147
1148                 ini.WriteInteger('ViewStyle', 'ListView', Ord(ListStyle));
1149
1150                 ini.WriteInteger('EditorWindowSize', 'Top', EditWindowTop);
1151                 ini.WriteInteger('EditorWindowSize', 'Left', EditWindowLeft);
1152                 ini.WriteInteger('EditorWindowSize', 'Height', EditWindowHeight);
1153                 ini.WriteInteger('EditorWindowSize', 'Width', EditWindowWidth);
1154                 ini.WriteBool('EditorWindowSize', 'Max', EditWindowMax);
1155                 ini.WriteBool('EditorWindowSize', 'Stay', EditWindowStay);
1156                 ini.WriteBool('EditorWindowSize', 'Translucent', EditWindowTranslucent);
1157
1158                 ini.WriteInteger('OptionDialog', 'TabIndex', FOptionDialogTabIndex);
1159
1160                 //\83c\81[\83\8b\83o\81[
1161                 ini.WriteBool('ToolBar', 'StdVisible', FStdToolBarVisible);
1162                 ini.WriteBool('ToolBar', 'AddressVisible', FAddressBarVisible);
1163                 ini.WriteBool('ToolBar', 'LinkVisible', FLinkBarVisible);
1164                 ini.WriteBool('ToolBar', 'ListVisible', FListToolBarVisible);
1165                 ini.WriteBool('ToolBar', 'ListNameVisible', FListNameBarVisible);
1166                 ini.WriteBool('ToolBar', 'BrowserVisible', FBrowserToolBarVisible);
1167                 ini.WriteBool('ToolBar', 'BrowserNameVisible', FBrowserNameBarVisible);
1168                 //\83c\81[\83\8b\83o\81[Wrapable
1169                 ini.WriteBool('ToolBar', 'ListWrapable', FListToolBarWrapable);
1170                 ini.WriteBool('ToolBar', 'BrowserWrapable', FBrowserToolBarWrapable);
1171
1172                 //\83^\83u
1173                 ini.WriteBool('Tab', 'BrowserTabVisible', FBrowserTabVisible);
1174                 ini.WriteInteger('Tab', 'BrowserTabPosition', Ord(FBrowserTabPosition));
1175                 ini.WriteInteger('Tab', 'BrowserTabAppend', Ord(FBrowserTabAppend));
1176                 ini.WriteInteger('Tab', 'BrowserTabStyle', Ord(FBrowserTabStyle));
1177
1178                 //\83\81\83b\83Z\81[\83W\83o\81[
1179                 ini.WriteBool('MessageBar', 'Visible', FMessageBarVisible);
1180                 ini.WriteInteger('MessageBar', 'Height', FMessegeBarHeight);
1181
1182                 //\83X\83e\81[\83^\83X\83o\81[
1183                 ini.WriteBool('StatusBar', 'Visible', FStatusBarVisible);
1184
1185                 //\83L\83\83\83r\83l\83b\83g
1186                 ini.WriteBool('Cabinet', 'Visible', FCabinetVisible);
1187                 ini.WriteInteger('Cabinet', 'Width', FCabinetWidth);
1188                 ini.WriteInteger('Cabinet', 'Index', FCabinetIndex);
1189
1190                 //\83\8a\83X\83g\82Ì\83T\83C\83Y\82Æ\90\82\92¼\90\85\95½
1191                 ini.WriteInteger('List', 'Orientation', Ord(FListOrientation));
1192                 ini.WriteInteger('List', 'Height', FListHeight);
1193                 ini.WriteInteger('List', 'HeightState', Ord(FListHeightState));
1194                 ini.WriteInteger('List', 'Width', FListWidth);
1195                 ini.WriteInteger('List', 'WidthState', Ord(FListWidthState));
1196 //              ini.WriteBool('List', 'HeightMax', FListHeightMax);
1197 //              ini.WriteBool('List', 'WidthMax', FListWidthMax);
1198
1199
1200 //              ini.WriteInteger('Window', 'BrowserFontSize', BrowserFontSize);
1201
1202                 //\83\8a\83X\83g\94Ô\8d\86\95\\8e¦
1203                 ini.WriteBool('Function', 'ListViewNo', FListViewNo);
1204                 //CSS\8eg\97p
1205                 ini.WriteBool('CSS', 'UseCSS', FUseCSS);
1206                 //CSS\83t\83@\83C\83\8b\96¼
1207                 ini.WriteString('CSS', 'FileName', FCSSFileName);
1208                 //Mail\97\93\95\\8e¦
1209                 ini.WriteBool('Thread', 'ShowMail', FShowMail);
1210                 // \83\8c\83X\95\\8e¦\94Í\88Í
1211                 ini.WriteInteger('Thread', 'ResRange', FResRange);
1212                 ini.WriteBool('Thread', 'ResRangeHold', FResRangeHold);
1213                 // \83X\83\8c\83b\83h\88ê\97\97\95\\8e¦\94Í\88Í
1214                 ini.WriteInteger('ThreadList', 'ThreadRange', Ord( FThreadRange ));
1215                 //\83\8d\83O\8dí\8f\9c\8am\94F
1216                 ini.WriteBool('Function', 'LogDeleteMessage', FDeleteMsg);
1217                 //\8fI\97¹\8am\94F
1218                 ini.WriteBool('Function','ShowDialogForEnd',FShowDialogForEnd);
1219                 //AllTabClose
1220                 ini.WriteBool('Function','ShowDialogForAllTabClose', FShowDialogForAllTabClose);
1221                 //Samba
1222                 ini.WriteBool('Function','UseSamba', FUseSamba);
1223                 //ResAnchorjamp
1224                 ini.WriteBool('Function', 'ResAnchoJamp', ResAnchorJamp);
1225
1226                 //\94ñ\83A\83N\83e\83B\83u\8e\9e\83|\83b\83v\83A\83b\83v\95\\8e¦
1227                 ini.WriteBool('Thread', 'UnActivePopup', FUnActivePopup);
1228                 //\83\8c\83X\83|\83b\83v\83A\83b\83v\83w\83b\83_\81[\83{\81[\83\8b\83h
1229                 ini.WriteBool('Thread', 'ResPopupHeaderBold', FResPopupHeaderBold);
1230                 //ini.WriteString('BoardURL', '2ch', FBoardURL2ch);
1231
1232                 //\94F\8fØ\97p\83\86\81[\83UID\81E\83p\83X\83\8f\81[\83h
1233                 ini.WriteString('Attestation', 'UserID', FUserID);
1234                 ini.WriteString('Attestation', 'Password', Encrypt(FPassword));
1235                 ini.WriteBool('Attestation', 'AutoLogin', FAutoLogin);
1236                 ini.WriteBool('Attestation', 'FForcedLogin', FForcedLogin);
1237                 ini.WriteString('Attestation', 'FDolibURL', FDolibURL);
1238
1239                 //URL\83N\83\8a\83b\83N\8e\9e\8bN\93®\83A\83v\83\8a
1240                 ini.WriteBool('URLApp', 'Select', FURLApp);
1241                 ini.WriteString('URLApp', 'File', FURLAppFile);
1242
1243                 //mailto\83N\83\8a\83b\83N\8e\9e\93®\8dì
1244                 ini.WriteBool('Mailto', 'Open', FOpenMailer);
1245
1246                 //\83|\83b\83v\83A\83b\83v\88Ê\92u
1247                 ini.WriteInteger('Browser', 'PopupPosition', Ord(FPopupPosition));
1248
1249                 //\83A\83h\83\8c\83X\83o\81[
1250                 ini.WriteBool('AddressBar', 'URLDisplay', FURLDisplay);
1251                 ini.WriteBool('AddressBar', 'TabStop', FAddressBarTabStop);
1252                 ini.WriteBool('AddressBar', 'LinkAdd', FLinkAddAddressBar);
1253                 ini.WriteInteger('AddressBar', 'HistoryCount', FAddressHistoryCount);
1254
1255                 //\89æ\91\9c\83v\83\8c\83r\83\85\81[
1256                 ini.WriteBool('Browser', 'PreviewVisible', FPreviewVisible);
1257                 ini.WriteInteger('Browser', 'PreviewSize', Ord(FPreviewSize));
1258                 ini.WriteInteger('Browser', 'PreviewWait', FPreviewWait);
1259                 ini.WriteInteger('Browser', 'AutoMaximize', Ord( FBrowserAutoMaximize ) );
1260
1261                 //\83X\83\8c\83b\83h\88ê\97\97\8dX\90V\83A\83C\83R\83\93
1262                 ini.WriteBool('ThreadList', 'StateIconVisible', FListIconVisible);
1263                 ini.WriteBool('ThreadList', 'NonAcquiredCount', FNonAcquiredCount);
1264                 ini.WriteBool('ThreadList', 'CreationTimeLogs',FCreationTimeLogs);
1265                 ini.WriteBool('ThreadList', 'FutureThread', FFutureThread);
1266                 ini.WriteInteger('ThreadList', 'SelectInterval', FSelectInterval);
1267                 //\83\\81[\83g\8f\87
1268                 ini.WriteInteger('ThreadList', 'BBSSortIndex', FBBSSortIndex);
1269                 ini.WriteBool('ThreadList', 'BBSSortOrder', FBBSSortOrder);
1270                 ini.WriteInteger('ThreadList', 'CategorySortIndex', FCategorySortIndex);
1271                 ini.WriteBool('ThreadList', 'CategorySortOrder', FCategorySortOrder);
1272                 ini.WriteInteger('ThreadList', 'BoardSortIndex', FBoardSortIndex);
1273                 ini.WriteBool('ThreadList', 'BoardSortOrder', FBoardSortOrder);
1274                 ini.WriteInteger('ThreadList', 'DatOchiSortIndex', FDatOchiSortIndex);
1275                 ini.WriteBool('ThreadList', 'DatOchiSortOrder', FDatOchiSortOrder);
1276
1277                 //\8f\91\82«\8d\9e\82Ý\8e\9e\83}\83V\83\93\8e\9e\8d\8f\8eg\97p\90Ý\92è
1278                 ini.WriteBool('PostTime', 'UseMachineTime', FUseMachineTime);
1279                 ini.WriteInteger('PostTime', 'TimeAdjustSec', FTimeAdjustSec);
1280                 ini.WriteBool('PostTime', 'TimeAdjust', FTimeAdjust);
1281
1282                 //\83\8a\83X\83g\83J\83\89\83\80
1283                 for i := 0 to Length(FBBSColumnWidth) - 1 do begin
1284                         ini.WriteInteger('BBSColumnWidth', 'ID' + IntToStr(i), FBBSColumnWidth[i]);
1285                 end;
1286                 for i := 0 to Length(FCategoryColumnWidth) - 1 do begin
1287                         ini.WriteInteger('CategoryColumnWidth', 'ID' + IntToStr(i), FCategoryColumnWidth[i]);
1288                 end;
1289                 for i := 0 to Length(FBoardColumnWidth) - 1 do begin
1290                         ini.WriteInteger('BoardColumnWidth', 'ID' + IntToStr(i), FBoardColumnWidth[i]);
1291                 end;
1292
1293                 //\83T\83E\83\93\83h
1294                 for i := 0 to GetSoundCount - 1 do begin
1295                         if not FileExists(SoundFileName[i]) then
1296                                 SoundFileName[i] := '';
1297                         ini.WriteString('Sound', SoundName[i], SoundFileName[i]);
1298                 end;
1299
1300                 //CoolBar
1301                 ini.EraseSection('MainCoolBar');
1302                 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1303                         CoolSet := MainCoolSet[i];
1304                         ini.WriteInteger('MainCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
1305                         ini.WriteInteger('MainCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
1306                         ini.WriteBool('MainCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
1307                 end;
1308                 ini.EraseSection('ListCoolBar');
1309                 ini.WriteInteger( 'ListCoolBar', 'SelectWidth', FSelectComboBoxWidth );
1310                 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1311                         CoolSet := ListCoolSet[i];
1312                         ini.WriteInteger('ListCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
1313                         ini.WriteInteger('ListCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
1314                         ini.WriteBool('ListCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
1315                 end;
1316                 ini.EraseSection('BrowserCoolBar');
1317                 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1318                         CoolSet := BrowserCoolSet[i];
1319                         ini.WriteInteger('BrowserCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
1320                         ini.WriteInteger('BrowserCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
1321                         ini.WriteBool('BrowserCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
1322                 end;
1323
1324                 //\82 \82Ú\81`\82ñ
1325                 ini.WriteBool('Abon','Deleterlo',FAbonDeleterlo);
1326                 ini.WriteBool('Abon','Replaceul',FAbonReplaceul);
1327                                 ini.WriteBool('Abon','Popup',FPopUpAbon);
1328                 ini.WriteBool('Abon','ShowNGLines',FShowNGLinesNum);
1329                 ini.WriteBool('Abon','AddResAnchor',FAddResAnchor);
1330                                 ini.WriteBool('Abon','DeleteSyria',FDeleteSyria);
1331
1332                 // \83G\83f\83B\83^
1333                 ini.WriteBool( 'Editor', 'SpaceToNBSP', FSpaceToNBSP );
1334                 ini.WriteBool( 'Editor', 'AmpToCharRef', FAmpToCharRef );
1335
1336                 ini.WriteBool('TabAuto', 'TabAutoSave', FTabAutoSave);
1337                 ini.WriteBool('TabAuto', 'TabAutoLoad', FTabAutoLoad);
1338
1339                 ini.UpdateFile;
1340         finally
1341                 ini.Free;
1342         end;
1343 end;
1344
1345 //\90Ý\92è\83t\83@\83C\83\8b\95Û\91¶(name & mail)
1346 procedure TSetting.WriteNameMailSettingFile();
1347 var
1348         i: Integer;
1349         ini: TMemIniFile;
1350 begin
1351         ini := TMemIniFile.Create(GetFileName());
1352         try
1353                 ini.EraseSection('Name');
1354                 ini.EraseSection('Mail');
1355                 ini.EraseSection('SelectText');
1356                 for i := 0 to FNameList.Count - 1 do begin
1357                         ini.WriteString('Name', Format('%.2d', [i + 1]), FNameList[i]);
1358                         if i >= 39 then
1359                                 Break;
1360                 end;
1361                 for i := 0 to FMailList.Count - 1 do begin
1362                         ini.WriteString('Mail', Format('%.2d', [i + 1]), FMailList[i]);
1363                         if i >= 39 then
1364                                 Break;
1365                 end;
1366                 for i := 0 to FSelectTextList.Count - 1 do begin
1367                         ini.WriteString('SelectText', Format('%.2d', [i + 1]), FSelectTextList[i]);
1368                         if i >= 39 then
1369                                 Break;
1370                 end;
1371                 ini.UpdateFile;
1372         finally
1373                 ini.Free;
1374         end;
1375 end;
1376
1377 procedure TSetting.WriteFolderSettingFile();
1378 var
1379         ini: TMemIniFile;
1380 begin
1381         ini := TMemIniFile.Create(GetFileName());
1382         try
1383                 if ExtractFilePath(Application.ExeName) + 'Log' = NewLogFolder then
1384                         ini.DeleteKey('Folder', 'LogFolder')
1385                 else
1386                         ini.WriteString('Folder', 'LogFolder', NewLogFolder);
1387                 ini.UpdateFile;
1388         finally
1389                 ini.Free;
1390         end;
1391 end;
1392 //\94Â\8dX\90V\97pBoardURL\82ð\95Û\91
1393 procedure TSetting.WriteBoardURLSettingFile();
1394 var
1395         ini: TMemIniFile;
1396                 i : Integer;
1397                 oldcount : Integer;
1398 begin
1399         ini := TMemIniFile.Create(GetBoardURLFileName());
1400         try
1401                 oldcount := ini.ReadInteger('URL','count',FBoardURLs.Count);
1402                 ini.WriteInteger('URL','count',FBoardURLs.Count);
1403                 ini.WriteInteger('URL','selected',BoardURLSelected);
1404                 for i := 0 to FBoardURLs.Count -1 do begin
1405                                         ini.WriteString('URL',IntToStr(i+1),FBoardURLs.Strings[i]);
1406                 end;
1407                 if oldcount > FBoardURLs.Count then begin
1408                         for i := FBoardURLs.Count to oldcount do begin
1409                                 ini.DeleteKey('URL',IntToStr(i+1));
1410                         end;
1411                 end;
1412                 ini.UpdateFile;
1413         finally
1414                 ini.Free;
1415         end;
1416 end;
1417
1418 {$R-}
1419 //\83\8a\83X\83g\83J\83\89\83\80\83w\83b\83_\81[
1420 function TSetting.GetBBSColumnWidth(index: Integer): Integer;
1421 begin
1422         Result := IfThen(index in [0..Length(FBBSColumnWidth) - 1], FBBSColumnWidth[index], 0);
1423 end;
1424
1425 function TSetting.GetCategoryColumnWidth(index: Integer): Integer;
1426 begin
1427         Result := IfThen(index in [0..Length(FCategoryColumnWidth) - 1], FCategoryColumnWidth[index], 0);
1428 end;
1429
1430 function TSetting.GetBoardColumnWidth(index: Integer): Integer;
1431 begin
1432         Result := IfThen(index in [0..Length(FBoardColumnWidth) - 1], FBoardColumnWidth[index], 0);
1433 end;
1434 {$IFDEF DEBUG}
1435 {$R+}
1436 {$ENDIF}
1437
1438 procedure TSetting.SetBBSColumnWidth(index: Integer; value: Integer);
1439 begin
1440         if index in [0..Length(FBBSColumnWidth) - 1] then
1441                 FBBSColumnWidth[index] := value;
1442 end;
1443
1444 procedure TSetting.SetCategoryColumnWidth(index: Integer; value: Integer);
1445 begin
1446         if index in [0..Length(FCategoryColumnWidth) - 1] then
1447                 FCategoryColumnWidth[index] := value;
1448 end;
1449
1450 procedure TSetting.SetBoardColumnWidth(index: Integer; value: Integer);
1451 begin
1452         if index in [0..Length(FBoardColumnWidth) - 1] then
1453                 FBoardColumnWidth[index] := value;
1454 end;
1455
1456 function TSetting.GetSoundCount: Integer;
1457 begin
1458         Result := Length(SOUND_NAME);
1459 end;
1460
1461 function TSetting.GetSoundName(Index: Integer): string;
1462 begin
1463         if (Index < GetSoundCount) and (Index >= 0) then
1464                 Result := SOUND_NAME[Index].Name
1465         else
1466                 Result := '';
1467 end;
1468
1469 function TSetting.GetSoundViewName(Index: Integer): string;
1470 begin
1471         if (Index < GetSoundCount) and (Index >= 0) then
1472                 Result := SOUND_NAME[Index].ViewName
1473         else
1474                 Result := '';
1475 end;
1476
1477 function TSetting.GetSoundFileName(Index: Integer): string;
1478 begin
1479         if (Index < GetSoundCount) and (Index >= 0) then
1480                 Result := SOUND_NAME[Index].FileName
1481         else
1482                 Result := '';
1483 end;
1484
1485 procedure TSetting.SetSoundFileName(Index: Integer; value: string);
1486 begin
1487         if (Index < GetSoundCount) and (Index >= 0) then
1488                 SOUND_NAME[Index].FileName := value;
1489 end;
1490
1491 function TSetting.FindSoundFileName(Name: string): string;
1492 var
1493         i: Integer;
1494 begin
1495         for i := 0 to GetSoundCount - 1 do begin
1496                 if SoundName[i] = Name then begin
1497                         Result := SoundFileName[i];
1498                         Exit;
1499                 end;
1500         end;
1501         Result := '';
1502 end;
1503
1504 function TSetting.Encrypt(s: string): string;
1505 var
1506         cryptObj: THogeCryptAuto;
1507         inputStream, outputStream: TStringStream;
1508 begin
1509         inputStream := TStringStream.Create(s);
1510         outputStream := TStringStream.Create('');
1511         cryptObj := THogeCryptAuto.Create;
1512         try
1513                 // \88Ã\8d\86\89»
1514                 cryptObj.Encrypt(inputStream, GIKO_ENCRYPT_TEXT, outputStream);
1515
1516                 // \83o\83C\83i\83\8a\82È\82Ì\82Å\95K\97v\82É\89\9e\82\82Ä\83e\83L\83X\83g\82É\95Ï\8a·
1517                 Result := HogeBase64Encode(outputStream.DataString);
1518         finally
1519                 cryptObj.Free;
1520                 outputStream.Free;
1521                 inputStream.Free;
1522         end;
1523 end;
1524
1525 function TSetting.Decrypt(s: string): string;
1526 var
1527         cryptObj: THogeCryptAuto;
1528         inputStream, outputStream: TStringStream;
1529 begin
1530         try
1531                 inputStream := TStringStream.Create(HogeBase64Decode(s));
1532         except
1533                 Result := '';
1534                 Exit;
1535         end;
1536         outputStream := TStringStream.Create('');
1537         cryptObj := THogeCryptAuto.Create;
1538         try
1539                 // \95\9c\8d\86
1540                 cryptObj.Decrypt(inputStream, GIKO_ENCRYPT_TEXT, outputStream);
1541                 Result := outputStream.DataString;
1542         finally
1543                 cryptObj.Free;
1544                 outputStream.Free;
1545                 inputStream.Free;
1546         end;
1547 end;
1548
1549 function TSetting.GetMainCoolSet(Index: Integer): TCoolSet;
1550 begin
1551         if Index in [0..MAIN_COOLBAND_COUNT - 1] then
1552                 Result := FMainCoolBar[Index]
1553         else begin
1554                 Result.FCoolID := -1;
1555                 Result.FCoolWidth := -1;
1556                 Result.FCoolBreak := False;
1557         end;
1558 end;
1559
1560 function TSetting.GetBoardCoolSet(Index: Integer): TCoolSet;
1561 begin
1562         if Index in [0..LIST_COOLBAND_COUNT - 1] then
1563                 Result := FListCoolBar[Index]
1564         else begin
1565                 Result.FCoolID := -1;
1566                 Result.FCoolWidth := -1;
1567                 Result.FCoolBreak := False;
1568         end;
1569 end;
1570
1571 function TSetting.GetBrowserCoolSet(Index: Integer): TCoolSet;
1572 begin
1573         if Index in [0..BROWSER_COOLBAND_COUNT - 1] then
1574                 Result := FBrowserCoolBar[Index]
1575         else begin
1576                 Result.FCoolID := -1;
1577                 Result.FCoolWidth := -1;
1578                 Result.FCoolBreak := False;
1579         end;
1580 end;
1581
1582 procedure TSetting.SetMainCoolSet(Index: Integer; CoolSet: TCoolSet);
1583 begin
1584         if Index in [0..MAIN_COOLBAND_COUNT - 1] then
1585                 FMainCoolBar[Index] := CoolSet;
1586 end;
1587
1588 procedure TSetting.SetBoardCoolSet(Index: Integer; CoolSet: TCoolSet);
1589 begin
1590         if Index in [0..LIST_COOLBAND_COUNT - 1] then
1591                 FListCoolBar[Index] := CoolSet;
1592 end;
1593
1594 procedure TSetting.SetBrowserCoolSet(Index: Integer; CoolSet: TCoolSet);
1595 begin
1596         if Index in [0..BROWSER_COOLBAND_COUNT - 1] then
1597                 FBrowserCoolBar[Index] := CoolSet;
1598 end;
1599
1600 //url.ini\82ª\82È\82¢\82Æ\82«\82É\90\90¬\82·\82é
1601 procedure TSetting.MakeURLIniFile();
1602 var
1603         ini: TMemIniFile;
1604 begin
1605         ini := TMemIniFile.Create(GetBoardURLFileName());
1606         try
1607                 ini.WriteInteger('URL','count',2);
1608                 ini.WriteInteger('URL','selected',2);
1609                 ini.WriteString('URL','1',DEFAULT_2CH_BOARD_URL1);
1610                 ini.WriteString('URL','2',DEFAULT_2CH_BOARD_URL2);
1611                 ini.UpdateFile;
1612         finally
1613                 ini.Free;
1614         end;
1615 end;
1616
1617 (*************************************************************************
1618  *\83{\81[\83h\83t\83@\83C\83\8b\96¼\8eæ\93¾\81i\83p\83X\81{\83t\83@\83C\83\8b\96¼\81j
1619  *************************************************************************)
1620 function TSetting.GetBoardFileName: string;
1621 begin
1622         Result := GetAppDir + CONFIG_DIR_NAME + '\' + BOARD_FILE_NAME;
1623 end;
1624
1625 (*************************************************************************
1626  *\83{\81[\83h\83t\83@\83C\83\8b\96¼\8eæ\93¾\81i\83p\83X\81{\83t\83@\83C\83\8b\96¼\81j
1627  *************************************************************************)
1628 function TSetting.GetCustomBoardFileName: string;
1629 begin
1630         Result := GetAppDir + CONFIG_DIR_NAME + '\' + CUSTOMBOARD_FILE_NAME;
1631 end;
1632
1633 (*************************************************************************
1634  *\83{\81[\83h\83f\83B\83\8c\83N\83g\83\8a\8eæ\93¾
1635  *************************************************************************)
1636 function TSetting.GetBoardDir: string;
1637 begin
1638         Result := GetAppDir + CONFIG_DIR_NAME + '\' + BOARD_DIR_NAME + '\';
1639 end;
1640
1641 (*************************************************************************
1642  *\83e\83\93\83|\83\89\83\8a\83t\83H\83\8b\83_\81[\96¼\8eæ\93¾
1643  *************************************************************************)
1644 function TSetting.GetHtmlTempFileName: string;
1645 begin
1646         Result := TEMP_FOLDER;
1647 end;
1648
1649
1650 (*************************************************************************
1651  *\8eÀ\8ds\83t\83@\83C\83\8b\83t\83H\83\8b\83_\8eæ\93¾
1652  *************************************************************************)
1653 function TSetting.GetAppDir: string;
1654 begin
1655         Result := ExtractFilePath(Application.ExeName);
1656 end;
1657
1658 (*************************************************************************
1659  *TempHtml\83t\83@\83C\83\8b\96¼\8eæ\93¾\81i\83p\83X\81{\83t\83@\83C\83\8b\96¼\81j
1660  *************************************************************************)
1661 function TSetting.GetTempFolder: string;
1662 begin
1663         Result := GetAppDir + TEMP_FOLDER;
1664 end;
1665
1666 (*************************************************************************
1667  *sent.ini\83t\83@\83C\83\8b\96¼\8eæ\93¾\81i\83p\83X\81{\83t\83@\83C\83\8b\96¼\81j
1668  *************************************************************************)
1669 function TSetting.GetSentFileName: string;
1670 begin
1671         Result := GetAppDir + SENT_FILE_NAME;
1672 end;
1673
1674 (*************************************************************************
1675  *outbox.ini\83t\83@\83C\83\8b\96¼\8eæ\93¾\81i\83p\83X\81{\83t\83@\83C\83\8b\96¼\81j
1676  *************************************************************************)
1677 function TSetting.GetOutBoxFileName: string;
1678 begin
1679         Result := GetAppDir + OUTBOX_FILE_NAME;
1680 end;
1681
1682 (*************************************************************************
1683  *Config\83t\83H\83\8b\83_\8eæ\93¾
1684  *************************************************************************)
1685 function TSetting.GetConfigDir: string;
1686 begin
1687         Result := IncludeTrailingPathDelimiter(GetAppDir + CONFIG_DIR_NAME);
1688 end;
1689
1690 function TSetting.GetStyleSheetDir: string;
1691 begin
1692         Result := IncludeTrailingPathDelimiter(GetConfigDir + CSS_DIR_NAME);
1693 end;
1694
1695 function TSetting.GetSkinDir: string;
1696 begin
1697         Result := IncludeTrailingPathDelimiter(GetConfigDir + SKIN_DIR_NAME);
1698 end;
1699
1700 function TSetting.GetSkinHeaderFileName: string;
1701 begin
1702         Result := CSSFileName + SKIN_HEADER_FILE_NAME;
1703 end;
1704
1705 function TSetting.GetSkinFooterFileName: string;
1706 begin
1707         Result := CSSFileName + SKIN_FOOTER_FILE_NAME;
1708 end;
1709
1710 function TSetting.GetSkinNewResFileName: string;
1711 begin
1712         Result := CSSFileName + SKIN_NEWRES_FILE_NAME;
1713 end;
1714
1715 function TSetting.GetSkinResFileName: string;
1716 begin
1717         Result := CSSFileName + SKIN_RES_FILE_NAME;
1718 end;
1719
1720 function TSetting.GetSkinBookmarkFileName: string;
1721 begin
1722         Result := CSSFileName + SKIN_BOOKMARK_FILE_NAME;
1723 end;
1724
1725 function TSetting.GetSkinNewmarkFileName: string;
1726 begin
1727         Result := CSSFileName + SKIN_NEWMARK_FILE_NAME;
1728 end;
1729
1730 function TSetting.GetNGWordsDir: string;
1731 begin
1732         Result := IncludeTrailingPathDelimiter(GetConfigDir + NGWORDs_DIR_NAME);
1733 end;
1734
1735 function TSetting.GetBoardPlugInDir: string;
1736 begin
1737         Result := IncludeTrailingPathDelimiter(GetConfigDir + BOARD_PLUGIN_DIR_NAME);
1738 end;
1739
1740 procedure TSetting.SetUseCSS( value: Boolean );
1741 begin
1742
1743         FUseCSS := value;
1744
1745         FUseSkin :=
1746                 UseCSS and
1747                 (Pos( GetSkinDir, CSSFileName ) > 0) and
1748                 FileExists( GetSkinHeaderFileName );
1749
1750 end;
1751
1752 procedure TSetting.SetCSSFileName( fileName: string );
1753 begin
1754
1755         FCSSFileName := fileName;
1756
1757         FUseSkin :=
1758                 UseCSS and
1759                 (Pos( GetSkinDir, CSSFileName ) > 0) and
1760                 FileExists( GetSkinHeaderFileName );
1761
1762 end;
1763
1764 function TSetting.GetSambaFileName: string;
1765 begin
1766         Result := GetAppDir + SAMBATIME_FILE_NAME;
1767 end;
1768 //\94Â\8dX\90V\8f\9c\8aO\83J\83e\83S\83\8a\83\8a\83X\83g\95Û\91\83t\83@\83C\83\8b
1769 function TSetting.GetIgnoreFileName: string;
1770 begin
1771         Result := GetConfigDir + IGNORE_FILE_NAME;
1772 end;
1773
1774 end.
1775
1776