OSDN Git Service

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