Develop and Download Open Source Software

Browse CVS Repository

Contents of /gikonavigoeson/gikonavi/Setting.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.84 - (show annotations) (download) (as text)
Wed Nov 3 15:08:17 2004 UTC (19 years, 5 months ago) by h677
Branch: MAIN
CVS Tags: bv1_49_0_564, bv1_49_0_563, bv1_49_0_565
Changes since 1.83: +5 -4 lines
File MIME type: text/x-pascal
・゚・蝪シ・ネオ。ヌストノイテ

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

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26