OSDN Git Service

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