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

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