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