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.124.2.1 - (show annotations) (download) (as text)
Fri Aug 10 16:05:31 2007 UTC (16 years, 8 months ago) by h677
Branch: Bb56
CVS Tags: v1_56_2_724, v1_56_2_722
Changes since 1.124: +3 -3 lines
File MIME type: text/x-pascal
ハ゛タ55以前からアップデートすると、レスポップアップ位置の左右が逆転する不具合の修正

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

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