OSDN Git Service

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