OSDN Git Service

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