OSDN Git Service

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