OSDN Git Service

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