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