Develop and Download Open Source Software

Browse CVS Repository

Annotation of /gikonavigoeson/gikonavi/Setting.pas

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


Revision 1.3 - (hide annotations) (download) (as text)
Wed Aug 13 05:07:32 2003 UTC (20 years, 8 months ago) by h677
Branch: MAIN
CVS Tags: b34
Changes since 1.2: +26 -0 lines
File MIME type: text/x-pascal
あぼ〜ん設定を追加

1 hi_ 1.1 unit Setting;
2    
3     interface
4    
5     uses
6     SysUtils, Classes, Graphics, Forms, Math, IniFiles, UCryptAuto, UBase64,
7     ComCtrls;
8    
9     const
10     MAIN_COOLBAND_COUNT = 4; //?<?ゃ??oolBand????/span>
11     LIST_COOLBAND_COUNT = 2; //??oolBand????/span>
12     BROWSER_COOLBAND_COUNT = 3; //????????oolBand????/span>
13    
14     type
15     TGikoTabPosition = (gtpTop, gtpBottom); // ?帥??篏?臀?/span>
16     TGikoTabAppend = (gtaFirst, gtpLast); // ?帥??菴遵??篏?臀?/span>
17     TGikoTabStyle = (gtsTab, gtsButton, gtsFlat); // ?帥???鴻?帥?ゃ??/span>
18     TGikoListOrientation = (gloHorizontal, gloVertical); // ???鴻?????眼?紙梓綛?/span>
19     TGikoListState = (glsMax, glsNormal, glsMin); // ???鴻???泣?ゃ?榊?倶??
20     // ???????≪????茵?ず篏?臀?/span>
21     TGikoPopupPosition = (gppRightTop, gppTop, gppLeftTop,
22     gppRight, gppCenter, gppLeft,
23     gppRightBottom, gppBottom, gppLeftBottom);
24     //???????ャ?若?泣?ゃ??/span>
25     TGikoPreviewSize = (gpsXLarge, gpsLarge, gpsMedium, gpsSmall, gpsXSmall);
26    
27     //CoolBar荐?????潟?若??
28     TCoolSet = record
29     FCoolID: Integer;
30     FCoolWidth: Integer;
31     FCoolBreak: Boolean;
32     end;
33    
34     TSetting = class(TObject)
35     private
36     //??篆<???????<?泣?ゃ??/span>
37     FRecvBufferSize: Integer;
38     //HTTP1.1篏睡??/span>
39     FProtocol: Boolean;
40     //???????傑・膓?HTTP1.1篏睡??/span>
41     FProxyProtocol: Boolean;
42    
43     //???????件?茯?昭???
44     FReadProxy: Boolean;
45     FReadProxyAddress: string;
46     FReadProxyPort: Integer;
47     FReadProxyUserID: string;
48     FReadProxyPassword: string;
49    
50     //???????件??梧昭???
51     FWriteProxy: Boolean;
52     FWriteProxyAddress: string;
53     FWriteProxyPort: Integer;
54     FWriteProxyUserID: string;
55     FWriteProxyPassword: string;
56    
57     //???c????????
58     FCabinetFontName: string;
59     FCabinetFontSize: Integer;
60     FCabinetFontBold: Boolean;
61     FCabinetFontItalic: Boolean;
62     FCabinetFontColor: TColor;
63     FCabinetBackColor: TColor;
64    
65     //???鴻??
66     FListFontName: string;
67     FListFontSize: Integer;
68     FListFontBold: Boolean;
69     FListFontItalic: Boolean;
70     FListFontColor: TColor;
71     FListBackColor: TColor;
72    
73     //????????/span>
74     //FBrowserFontColor: TColor;
75     //FBrowserBackColor: TColor;
76     //FBrowserFontSize: Integer;
77    
78     //?????c??/span>
79     FEditorFontName: string;
80     FEditorFontSize: Integer;
81     FEditorFontBold: Boolean;
82     FEditorFontItalic: Boolean;
83     FEditorFontColor: TColor;
84     FEditorBackColor: TColor;
85    
86     //?帥???????潟??
87     FBrowserTabFontName: string;
88     FBrowserTabFontSize: Integer;
89     FBrowserTabFontBold: Boolean;
90     FBrowserTabFontItalic: Boolean;
91    
92     //???潟?????c?潟????/span>
93     FHintFontName: string;
94     FHintFontSize: Integer;
95     //FHintFontBold: Boolean;
96     //FHintFontItalic: Boolean;
97     FHintFontColor: TColor;
98     FHintBackColor: TColor;
99    
100     //???c?潟?????泣?ゃ??/span>
101     FWindowTop: Integer;
102     FWindowLeft: Integer;
103     FWindowHeight: Integer;
104     FWindowWidth: Integer;
105     FWindowMax: Boolean;
106     //???鴻?????ャ?若?鴻?帥?ゃ??/span>
107     FListStyle: TViewStyle;
108    
109     //???若?????取;腓?/span>
110     FStdToolBarVisible: Boolean;
111     FAddressBarVisible: Boolean;
112     FLinkBarVisible: Boolean;
113     FListToolBarVisible: Boolean;
114     FListNameBarVisible: Boolean;
115     FBrowserToolBarVisible: Boolean;
116     FBrowserNameBarVisible: Boolean;
117    
118     //???????吟?帥??
119     FBrowserTabVisible: Boolean;
120     FBrowserTabPosition: TGikoTabPosition;
121     FBrowserTabAppend: TGikoTabAppend;
122     FBrowserTabStyle: TGikoTabStyle;
123    
124     //?<???祉?若?吾????/span>
125     FMessageBarVisible: Boolean;
126     FMessegeBarHeight: Integer;
127    
128     //?鴻???若?帥?鴻????/span>
129     FStatusBarVisible: Boolean;
130    
131     //???c????????????祉?泣?ゃ??/span>
132     FCabinetVisible: Boolean;
133     FCabinetWidth: Integer;
134    
135     //???鴻???祉???????吟?泣?ゃ??/span>
136     FListOrientation: TGikoListOrientation;
137     FListHeight: Integer;
138     FListHeightState: TGikoListState;
139     FListWidth: Integer;
140     FListWidthState: TGikoListState;
141     // FListHeightMax: Boolean;
142     // FListWidthMax: Boolean;
143    
144     //??篆∞???????祉?<?若??/span>
145     FNameList: TStringList;
146     FMailList: TStringList;
147    
148     //?????c?帥?若???c?潟?????泣?ゃ??/span>
149     FEditWindowTop: Integer;
150     FEditWindowLeft: Integer;
151     FEditWindowHeight: Integer;
152     FEditWindowWidth: Integer;
153     FEditWindowMax: Boolean;
154    
155     //???鴻????埈;腓?/span>
156     FListViewNo: Boolean;
157     //CSS茵?ず
158     FUseCSS: Boolean;
159     //CSS???<?ゃ????
160     FCSSFileName: string;
161     //mail罨?茵?ず
162     FShowMail: Boolean;
163 yoffy 1.2 //???≪?????c???????鴻???????≪????茵?ず
164 hi_ 1.1 FUnActivePopup: Boolean;
165 yoffy 1.2 //???鴻???????≪???????????若???若????
166     FResPopupHeaderBold: Boolean;
167 hi_ 1.1
168     //???違????????
169     FLogFolder: string;
170     FNewLogFolder: string;
171    
172     //???鴻???????????????若?泣?ゃ??/span>
173     FBBSColumnWidth: array[0..0] of Integer;
174     FCategoryColumnWidth: array[0..3] of Integer;
175     FBoardColumnWidth: array[0..6] of Integer;
176    
177     //腟?莨若?炊??絖???
178     FSelectTextList: TStringList;
179    
180     //?推?荀?RL
181     FBoardURL2ch: string;
182    
183     //???若??D?祉???鴻???若??
184     FUserID: string;
185     FPassword: string;
186     FAutoLogin: Boolean;
187    
188     //URL??????????莎桁???≪????/span>
189     FURLApp: Boolean;
190     FURLAppFile: string;
191    
192     //mailto????????????篏?
193     FOpenMailer: Boolean;
194    
195     //???ょ∈茯?
196     FDeleteMsg: Boolean;
197    
198     //CoolBar鐚??<?ゃ?潟?紙?帥?祉???????駈?
199     FMainCoolBar: array[0..MAIN_COOLBAND_COUNT - 1] of TCoolSet;
200 yoffy 1.2 FListCoolBar: array[0..LIST_COOLBAND_COUNT - 1] of TCoolSet;
201 hi_ 1.1 FBrowserCoolBar: array[0..BROWSER_COOLBAND_COUNT - 1] of TCoolSet;
202    
203     //ToolBar Wrapable
204     FListToolBarWrapable: Boolean;
205     FBrowserToolBarWrapable: Boolean;
206    
207     //???????≪????篏?臀?/span>
208     FPopupPosition: TGikoPopupPosition;
209    
210     //?≪?????鴻????/span>
211     FURLDisplay: Boolean;
212     FAddressBarTabStop: Boolean;
213     FLinkAddAddressBar: Boolean;
214     FAddressHistoryCount: Integer;
215    
216     //?糸????????ャ??/span>
217     FPreviewVisible: Boolean;
218     FPreviewSize: TGikoPreviewSize;
219     FPreviewWait: Integer;
220    
221     //?鴻??????筝?荀ф?贋?違?≪?ゃ?潟?活;腓?/span>
222     FListIconVisible: Boolean;
223    
224     //?吾??莨若?炊?????激?恰????篏睡??┃絎?
225     FUseMachineTime: Boolean;
226     FTimeAdjustSec: Integer;
227     FTimeAdjust: Boolean;
228    
229 h677 1.3 //???若????
230     FAbonCutoffNum : Integer; //?????遺札筝??g??????????怨???NG???若????????
231     FAbonDeleterlo : Boolean; //&rlo;????????
232     FAbonReplaceul : Boolean; //<ul>?帥?違??<br>?帥?違??舟????????
233     FPopUpAbon : Boolean; //???鴻???????≪???????????若????????/span>
234    
235 hi_ 1.1 function GetMainCoolSet(Index: Integer): TCoolSet;
236     function GetBoardCoolSet(Index: Integer): TCoolSet;
237     function GetBrowserCoolSet(Index: Integer): TCoolSet;
238     procedure SetMainCoolSet(Index: Integer; CoolSet: TCoolSet);
239     procedure SetBoardCoolSet(Index: Integer; CoolSet: TCoolSet);
240     procedure SetBrowserCoolSet(Index: Integer; CoolSet: TCoolSet);
241    
242     function GetBBSColumnWidth(index: Integer): Integer;
243     function GetCategoryColumnWidth(index: Integer): Integer;
244     function GetBoardColumnWidth(index: Integer): Integer;
245     procedure SetBBSColumnWidth(index: Integer; value: Integer);
246     procedure SetCategoryColumnWidth(index: Integer; value: Integer);
247     procedure SetBoardColumnWidth(index: Integer; value: Integer);
248    
249     function GetSoundName(Index: Integer): string;
250     function GetSoundViewName(Index: Integer): string;
251     function GetSoundFileName(Index: Integer): string;
252     procedure SetSoundFileName(Index: Integer; value: string);
253     function Encrypt(s: string): string;
254     function Decrypt(s: string): string;
255     protected
256    
257     public
258     constructor Create;
259     destructor Destroy; override;
260     function GetFileName: string;
261     procedure ReadSettingFile;
262     procedure WriteSystemSettingFile;
263     procedure WriteWindowSettingFile;
264     procedure WriteNameMailSettingFile;
265     procedure WriteFolderSettingFile();
266     function GetSoundCount: Integer;
267     function FindSoundFileName(Name: string): string;
268    
269     //??篆<???????<?泣?ゃ??/span>
270     property RecvBufferSize: Integer read FRecvBufferSize write FRecvBufferSize;
271     //HTTP1.1篏睡??/span>
272     property Protocol: Boolean read FProtocol write FProtocol;
273     //???????傑・膓?HTTP1.1篏睡??/span>
274     property ProxyProtocol: Boolean read FProxyProtocol write FProxyProtocol;
275    
276     property ReadProxy: Boolean read FReadProxy write FReadProxy;
277     property ReadProxyAddress: string read FReadProxyAddress write FReadProxyAddress;
278     property ReadProxyPort: Integer read FReadProxyPort write FReadProxyPort;
279     property ReadProxyUserID: string read FReadProxyUserID write FReadProxyUserID;
280     property ReadProxyPassword: string read FReadProxyPassword write FReadProxyPassword;
281    
282     property WriteProxy: Boolean read FWriteProxy write FWriteProxy;
283     property WriteProxyAddress: string read FWriteProxyAddress write FWriteProxyAddress;
284     property WriteProxyPort: Integer read FWriteProxyPort write FWriteProxyPort;
285     property WriteProxyUserID: string read FWriteProxyUserID write FWriteProxyUserID;
286     property WriteProxyPassword: string read FWriteProxyPassword write FWriteProxyPassword;
287    
288     property CabinetFontName: string read FCabinetFontName write FCabinetFontName;
289     property CabinetFontSize: Integer read FCabinetFontSize write FCabinetFontSize;
290     property CabinetFontBold: Boolean read FCabinetFontBold write FCabinetFontBold;
291     property CabinetFontItalic: Boolean read FCabinetFontItalic write FCabinetFontItalic;
292     property CabinetFontColor: TColor read FCabinetFontColor write FCabinetFontColor;
293     property CabinetBackColor: TColor read FCabinetBackColor write FCabinetBackColor;
294    
295     property ListFontName: string read FListFontName write FListFontName;
296     property ListFontSize: Integer read FListFontSize write FListFontSize;
297     property ListFontBold: Boolean read FListFontBold write FListFontBold;
298     property ListFontItalic: Boolean read FListFontItalic write FListFontItalic;
299     property ListFontColor: TColor read FListFontColor write FListFontColor;
300     property ListBackColor: TColor read FListBackColor write FListBackColor;
301    
302     // property BrowserFontColor: TColor read FBrowserFontColor write FBrowserFontColor;
303     // property BrowserBackColor: TColor read FBrowserBackColor write FBrowserBackColor;
304     // property BrowserFontSize: Integer read FBrowserFontSize write FBrowserFontSize;
305    
306     property EditorFontName: string read FEditorFontName write FEditorFontName;
307     property EditorFontSize: Integer read FEditorFontSize write FEditorFontSize;
308     property EditorFontBold: Boolean read FEditorFontBold write FEditorFontBold;
309     property EditorFontItalic: Boolean read FEditorFontItalic write FEditorFontItalic;
310     property EditorFontColor: TColor read FEditorFontColor write FEditorFontColor;
311     property EditorBackColor: TColor read FEditorBackColor write FEditorBackColor;
312    
313     property BrowserTabFontName: string read FBrowserTabFontName write FBrowserTabFontName;
314     property BrowserTabFontSize: Integer read FBrowserTabFontSize write FBrowserTabFontSize;
315     property BrowserTabFontBold: Boolean read FBrowserTabFontBold write FBrowserTabFontBold;
316     property BrowserTabFontItalic: Boolean read FBrowserTabFontItalic write FBrowserTabFontItalic;
317    
318     property HintFontName: string read FHintFontName write FHintFontName;
319     property HintFontSize: Integer read FHintFontSize write FHintFontSize;
320     //property HintFontBold: Boolean read FHintFontBold write FHintFontBold;
321     //property HintFontItalic: Boolean read FHintFontItalic write FHintFontItalic;
322     property HintFontColor: TColor read FHintFontColor write FHintFontColor;
323     property HintBackColor: TColor read FHintBackColor write FHintBackColor;
324    
325     property WindowTop: Integer read FWindowTop write FWindowTop;
326     property WindowLeft: Integer read FWindowLeft write FWindowLeft;
327     property WindowHeight: Integer read FWindowHeight write FWindowHeight;
328     property WindowWidth: Integer read FWindowWidth write FWindowWidth;
329     property WindowMax: Boolean read FWindowMax write FWindowMax;
330     property ListStyle: TViewStyle read FListStyle write FListStyle;
331    
332     property StdToolBarVisible: Boolean read FStdToolBarVisible write FStdToolBarVisible;
333     property AddressBarVisible: Boolean read FAddressBarVisible write FAddressBarVisible;
334     property LinkBarVisible: Boolean read FLinkBarVisible write FLinkBarVisible;
335     property ListToolBarVisible: Boolean read FListToolBarVisible write FListToolBarVisible;
336     property ListNameBarVisible: Boolean read FListNameBarVisible write FListNameBarVisible;
337     property BrowserToolBarVisible: Boolean read FBrowserToolBarVisible write FBrowserToolBarVisible;
338     property BrowserNameBarVisible: Boolean read FBrowserNameBarVisible write FBrowserNameBarVisible;
339    
340     property BrowserTabVisible: Boolean read FBrowserTabVisible write FBrowserTabVisible;
341     property BrowserTabPosition: TGikoTabPosition read FBrowserTabPosition write FBrowserTabPosition;
342     property BrowserTabAppend: TGikoTabAppend read FBrowserTabAppend write FBrowserTabAppend;
343     property BrowserTabStyle: TGikoTabStyle read FBrowserTabStyle write FBrowserTabStyle;
344    
345     property MessageBarVisible: Boolean read FMessageBarVisible write FMessageBarVisible;
346     property MessegeBarHeight: Integer read FMessegeBarHeight write FMessegeBarHeight;
347    
348     property StatusBarVisible: Boolean read FStatusBarVisible write FStatusBarVisible;
349    
350     property CabinetVisible: Boolean read FCabinetVisible write FCabinetVisible;
351     property CabinetWidth: Integer read FCabinetWidth write FCabinetWidth;
352    
353     property ListOrientation: TGikoListOrientation read FListOrientation write FListOrientation;
354     property ListHeight: Integer read FListHeight write FListHeight;
355     property ListHeightState: TGikoListState read FListHeightState write FListHeightState;
356     property ListWidth: Integer read FListWidth write FListWidth;
357     property ListWidthState: TGikoListState read FListWidthState write FListWidthState;
358     // property ListHeightMax: Boolean read FListHeightMax write FListHeightMax;
359     // property ListWidthMax: Boolean read FListWidthMax write FListWidthMax;
360    
361     property NameList: TStringList read FNameList write FNameList;
362     property MailList: TStringList read FMailList write FMailList;
363     property SelectTextList: TStringList read FSelectTextList write FSelectTextList;
364    
365     property EditWindowTop: Integer read FEditWindowTop write FEditWindowTop;
366     property EditWindowLeft: Integer read FEditWindowLeft write FEditWindowLeft;
367     property EditWindowHeight: Integer read FEditWindowHeight write FEditWindowHeight;
368     property EditWindowWidth: Integer read FEditWindowWidth write FEditWindowWidth;
369     property EditWindowMax: Boolean read FEditWindowMax write FEditWindowMax;
370    
371     property ListViewNo: Boolean read FListViewNo write FListViewNo;
372     property UseCSS: Boolean read FUseCSS write FUseCSS;
373     property CSSFileName: string read FCSSFileName write FCSSFileName;
374    
375     property ShowMail: Boolean read FShowMail write FShowMail;
376     property UnActivePopup: Boolean read FUnActivePopup write FUnActivePopup;
377 yoffy 1.2 property ResPopupHeaderBold: Boolean read FResPopupHeaderBold write FResPopupHeaderBold;
378 hi_ 1.1
379     property LogFolder: string read FLogFolder write FLogFolder;
380     property NewLogFolder: string read FNewLogFolder write FNewLogFolder;
381    
382     property BBSColumnWidth[index: Integer]: Integer read GetBBSColumnWidth write SetBBSColumnWidth;
383     property CategoryColumnWidth[index: Integer]: Integer read GetCategoryColumnWidth write SetCategoryColumnWidth;
384     property BoardColumnWidth[index: Integer]: Integer read GetBoardColumnWidth write SetBoardColumnWidth;
385    
386     property SoundName[index: Integer]: string read GetSoundName;
387     property SoundViewName[index: Integer]: string read GetSoundViewName;
388     property SoundFileName[index: Integer]: string read GetSoundFileName write SetSoundFileName;
389    
390     property BoardURL2ch: string read FBoardURL2ch write FBoardURL2ch;
391    
392     property UserID: string read FUserID write FUserID;
393     property Password: string read FPassword write FPassword;
394     property AutoLogin: Boolean read FAutoLogin write FAutoLogin;
395    
396     property URLApp: Boolean read FURLApp write FURLApp;
397     property URLAppFile: string read FURLAppFile write FURLAppFile;
398    
399     property OpenMailer: Boolean read FOpenMailer write FOpenMailer;
400    
401     property DeleteMsg: Boolean read FDeleteMsg write FDeleteMsg;
402    
403     property MainCoolSet[Index: Integer]: TCoolSet read GetMainCoolSet write SetMainCoolSet;
404     property ListCoolSet[Index: Integer]: TCoolSet read GetBoardCoolSet write SetBoardCoolSet;
405     property BrowserCoolSet[Index: Integer]: TCoolSet read GetBrowserCoolSet write SetBrowserCoolSet;
406    
407     property ListToolBarWrapable: Boolean read FListToolBarWrapable write FListToolBarWrapable;
408     property BrowserToolBarWrapable: Boolean read FBrowserToolBarWrapable write FBrowserToolBarWrapable;
409    
410     property PopupPosition: TGikoPopupPosition read FPopupPosition write FPopupPosition;
411    
412     property URLDisplay: Boolean read FURLDisplay write FURLDisplay;
413     property AddressBarTabStop: Boolean read FAddressBarTabStop write FAddressBarTabStop;
414     property LinkAddAddressBar: Boolean read FLinkAddAddressBar write FLinkAddAddressBar;
415     property AddressHistoryCount: Integer read FAddressHistoryCount write FAddressHistoryCount;
416    
417     property PreviewVisible: Boolean read FPreviewVisible write FPreviewVisible;
418     property PreviewSize: TGikoPreviewSize read FPreviewSize write FPreviewSize;
419     property PreviewWait: Integer read FPreviewWait write FPreviewWait;
420    
421     property ListIconVisible: Boolean read FListIconVisible write FListIconVisible;
422    
423     property UseMachineTime: Boolean read FUseMachineTime write FUseMachineTime;
424     property TimeAdjustSec: Integer read FTimeAdjustSec write FTimeAdjustSec;
425     property TimeAdjust: Boolean read FTimeAdjust write FTimeAdjust;
426 h677 1.3
427     //???若????
428     property AbonCutoffNum : Integer read FAbonCutoffNum write FAbonCutoffNum;
429     property AbonDeleterlo : Boolean read FAbonDeleterlo write FAbonDeleterlo;
430     property AbonReplaceul : Boolean read FAbonReplaceul write FAbonReplaceul;
431     property PopUpAbon : Boolean read FPopUpAbon write FPopUpAbon;
432    
433 hi_ 1.1 end;
434    
435    
436 h677 1.3
437 hi_ 1.1 implementation
438    
439     type
440     TSoundName = record
441     Name: string;
442     ViewName: string;
443     FileName: string;
444     end;
445    
446     const
447     INI_FILE_NAME: string = 'gikoNavi.ini';
448     DEFAULT_FONT_NAME: string = '鐚?竺 鐚違?眼?激????#39;;
449     DEFAULT_FONT_SIZE: Integer = 9;
450     DEFAULT_FONT_COLOR: string = 'clWindowText';
451     DEFAULT_WINDOW_COLOR: string = 'clWindow';
452     DEFAULT_TAB_FONT_NAME: string = '鐚?竺 鐚違?眼?激????#39;;
453     DEFAULT_TAB_FONT_SIZE: Integer = 9;
454     DEFAULT_2CH_BOARD_URL: string = 'http://www6.ocn.ne.jp/~mirv/2chmenu.html';
455     //'http://www.2ch.net/newbbsmenu.html';
456     GIKO_ENCRYPT_TEXT: string = 'gikoNaviEncryptText';
457    
458     var
459     SOUND_NAME: array[0..4] of TSoundName = (
460     (Name: 'New'; ViewName: '??緇?????'; FileName: ''),
461     (Name: 'NewDiff'; ViewName: '??緇?????(綏???)'; FileName: ''),
462     (Name: 'NoChange'; ViewName: '???贋??#39;; FileName: ''),
463     // (Name: 'RoundEnd'; ViewName: '綏≦??腟?篋?(??緇?????)'; FileName: ''),
464     // (Name: 'RoundNone'; ViewName: '綏≦??腟?篋?(??緇?????)'; FileName: ''),
465     (Name: 'ResEnd'; ViewName: '???拷??篆≦?篋?'; FileName: ''),
466     (Name: 'Error'; ViewName: '??????#39;; FileName: ''));
467    
468     //?潟?潟?鴻????????/span>
469     constructor TSetting.Create();
470     begin
471     FNameList := TStringList.Create;
472     FMailList := TStringList.Create;
473     FSelectTextList := TStringList.Create;
474    
475     FNameList.Duplicates := dupIgnore;
476     FMailList.Duplicates := dupIgnore;
477     FSelectTextList.Duplicates := dupIgnore;
478     ReadSettingFile();
479     end;
480    
481     //???鴻????????/span>
482     destructor TSetting.Destroy();
483     begin
484     inherited;
485     FSelectTextList.Free;
486     FMailList.Free;
487     FNameList.Free;
488     end;
489    
490     //?????????<?ゃ??????緇?鐚????刻????<?ゃ????鐚?
491     function TSetting.GetFileName(): string;
492     begin
493     Result := ExtractFilePath(Application.ExeName) + INI_FILE_NAME;
494     end;
495    
496     //荐?????<?ゃ???莨?/span>
497     procedure TSetting.ReadSettingFile();
498     const
499     DEFAULT_BBS_WIDTH: array[0..0] of Integer = (140);
500     DEFAULT_CATEGORY_WIDTH: array[0..2] of Integer = (150, 80, 130);
501     DEFAULT_BOARD_WIDTH: array[0..6] of Integer = (350, 60, 60, 60, 60, 80, 130);
502     var
503     ini: TMemIniFile;
504     i: Integer;
505     wkList: TStringList;
506     wkStr: string;
507     Exists: Boolean;
508     s: string;
509     // id: Integer;
510     CoolSet: TCoolSet;
511     begin
512     Exists := FileExists(GetFileName);
513     ini := TMemIniFile.Create(GetFileName);
514     try
515     //??篆<???????<?泣?ゃ??/span>
516     FRecvBufferSize := ini.ReadInteger('HTTP', 'RecvBufferSize', 4096);
517     //HTTP1.1篏睡??/span>
518     FProtocol := ini.ReadBool('HTTP', 'Protocol', True);
519     //???????傑・膓?HTTP1.1篏睡??/span>
520     FProxyProtocol := ini.ReadBool('HTTP', 'ProxyProtocol', False);
521    
522     FReadProxy := ini.ReadBool('ReadProxy', 'Proxy', false);
523     FReadProxyAddress := ini.ReadString('ReadProxy', 'Address', '');
524     FReadProxyPort := ini.ReadInteger('ReadProxy', 'Port', 0);
525     FReadProxyUserID := ini.ReadString('ReadProxy', 'UserID', '');
526     FReadProxyPassword := ini.ReadString('ReadProxy', 'Password', '');
527    
528     FWriteProxy := ini.ReadBool('WriteProxy', 'Proxy', false);
529     FWriteProxyAddress := ini.ReadString('WriteProxy', 'Address', '');
530     FWriteProxyPort := ini.ReadInteger('WriteProxy', 'Port', 0);
531     FWriteProxyUserID := ini.ReadString('WriteProxy', 'UserID', '');
532     FWriteProxyPassword := ini.ReadString('WriteProxy', 'Password', '');
533    
534     FCabinetFontName := ini.ReadString('Window', 'CabinetFontName', DEFAULT_FONT_NAME);
535     FCabinetFontSize := ini.ReadInteger('Window', 'CabinetFontSize', DEFAULT_FONT_SIZE);
536     FCabinetFontBold := ini.ReadBool('Window', 'CabinetFontBold', False);
537     FCabinetFontItalic := ini.ReadBool('Window', 'CabinetFontItalic', False);
538     FCabinetFontColor := StringToColor(ini.ReadString('Window', 'CabinetFontColor', DEFAULT_FONT_COLOR));
539     FCabinetBackColor := StringToColor(ini.ReadString('Window', 'CabinetBackColor', DEFAULT_WINDOW_COLOR));
540    
541     FListFontName := ini.ReadString('Window', 'ListFontName', DEFAULT_FONT_NAME);
542     FListFontSize := ini.ReadInteger('Window', 'ListFontSize', DEFAULT_FONT_SIZE);
543     FListFontBold := ini.ReadBool('Window', 'ListFontBold', False);
544     FListFontItalic := ini.ReadBool('Window', 'ListFontItalic', False);
545     FListFontColor := StringToColor(ini.ReadString('Window', 'ListFontColor', DEFAULT_FONT_COLOR));
546     FListBackColor := StringToColor(ini.ReadString('Window', 'ListBackColor', DEFAULT_WINDOW_COLOR));
547    
548     FEditorFontName := ini.ReadString('Window', 'EditorFontName', DEFAULT_FONT_NAME);
549     FEditorFontSize := ini.ReadInteger('Window', 'EditorFontSize', DEFAULT_FONT_SIZE);
550     FEditorFontBold := ini.ReadBool('Window', 'EditorFontBold', False);
551     FEditorFontItalic := ini.ReadBool('Window', 'EditorFontItalic', False);
552     FEditorFontColor := StringToColor(ini.ReadString('Window', 'EditorFontColor', DEFAULT_FONT_COLOR));
553     FEditorBackColor := StringToColor(ini.ReadString('Window', 'EditorBackColor', DEFAULT_WINDOW_COLOR));
554    
555     FBrowserTabFontName := ini.ReadString('Window', 'BrowserTabFontName', DEFAULT_TAB_FONT_NAME);
556     FBrowserTabFontSize := ini.ReadInteger('Window', 'BrowserTabFontSize', DEFAULT_TAB_FONT_SIZE);
557     FBrowserTabFontBold := ini.ReadBool('Window', 'BrowserTabFontBold', False);
558     FBrowserTabFontItalic := ini.ReadBool('Window', 'BrowserTabFontItalic', False);
559    
560     FHintFontName := ini.ReadString('Window', 'HintFontName', Screen.HintFont.Name);
561     FHintFontSize := ini.ReadInteger('Window', 'HintFontSize', Screen.HintFont.Size);
562     //FHintFontBold := ini.ReadBool('Window', 'HintFontBold', False);
563     //FHintFontItalic := ini.ReadBool('Window', 'HintFontItalic', False);
564     FHintFontColor := StringToColor(ini.ReadString('Window', 'HintFontColor', DEFAULT_FONT_COLOR));
565     FHintBackColor := StringToColor(ini.ReadString('Window', 'HintBackColor', 'clInfoBk'));
566    
567     FWindowTop := ini.ReadInteger('WindowSize', 'Top', -1);
568     FWindowLeft := ini.ReadInteger('WindowSize', 'Left', -1);
569     FWindowHeight := ini.ReadInteger('WindowSize', 'Height', -1);
570     FWindowWidth := ini.ReadInteger('WindowSize', 'Width', -1);
571     FWindowMax := ini.ReadBool('WindowSize', 'Max', false);
572    
573     if FWindowHeight <= 0 then FWindowHeight := 400;
574     if FWindowWidth <= 0 then FWindowWidth := 600;
575    
576     FListStyle := TViewStyle(ini.ReadInteger('ViewStyle', 'ListView', Ord(vsReport)));
577    
578     FEditWindowTop := ini.ReadInteger('EditorWindowSize', 'Top', -1);
579     FEditWindowLeft := ini.ReadInteger('EditorWindowSize', 'Left', -1);
580     FEditWindowHeight := ini.ReadInteger('EditorWindowSize', 'Height', -1);
581     FEditWindowWidth := ini.ReadInteger('EditorWindowSize', 'Width', -1);
582     FEditWindowMax := ini.ReadBool('EditorWindowSize', 'Max', False);
583    
584     //???若??????/span>
585     FStdToolBarVisible := ini.ReadBool('ToolBar', 'StdVisible', True);
586     FAddressBarVisible := ini.ReadBool('ToolBar', 'AddressVisible', True);
587     FLinkBarVisible := ini.ReadBool('ToolBar', 'LinkVisible', True);
588     FListToolBarVisible := ini.ReadBool('ToolBar', 'ListVisible', True);
589     FListNameBarVisible := ini.ReadBool('ToolBar', 'ListNameVisible', True);
590     FBrowserToolBarVisible := ini.ReadBool('ToolBar', 'BrowserVisible', True);
591     FBrowserNameBarVisible := ini.ReadBool('ToolBar', 'BrowserNameVisible', True);
592     //???若??????rapable
593     FListToolBarWrapable := ini.ReadBool('ToolBar', 'ListWrapable', False);
594     FBrowserToolBarWrapable := ini.ReadBool('ToolBar', 'BrowserWrapable', False);
595    
596     FBrowserTabVisible := ini.ReadBool('Tab', 'BrowserTabVisible', True);
597     FBrowserTabPosition := TGikoTabPosition(ini.ReadInteger('Tab', 'BrowserTabPosition', Ord(gtpTop)));
598     FBrowserTabAppend := TGikoTabAppend(ini.ReadInteger('Tab', 'BrowserTabAppend', Ord(gtaFirst)));
599     FBrowserTabStyle := TGikoTabStyle(ini.ReadInteger('Tab', 'BrowserTabStyle', Ord(gtsFlat)));
600    
601     FMessageBarVisible := ini.ReadBool('MessageBar', 'Visible', True);
602     FMessegeBarHeight := ini.ReadInteger('MessageBar', 'Height', 30);
603    
604     FStatusBarVisible := ini.ReadBool('StatusBar', 'Visible', True);
605    
606     FCabinetVisible := ini.ReadBool('Cabinet', 'Visible', True);
607     FCabinetWidth := ini.ReadInteger('Cabinet', 'Width', 200);
608    
609     FListOrientation := TGikoListOrientation(ini.ReadInteger('List', 'Orientation', Ord(gloHorizontal)));
610     FListHeight := ini.ReadInteger('List', 'Height', 180);
611     FListHeightState := TGikoListState(ini.ReadInteger('List', 'HeightState', Ord(glsNormal)));
612     FListWidth := ini.ReadInteger('List', 'Width', 180);
613     FListWidthState := TGikoListState(ini.ReadInteger('List', 'WidthState', Ord(glsNormal)));
614     // FListHeightMax := ini.ReadBool('List', 'HeightMax', False);
615     // FListWidthMax := ini.ReadBool('List', 'WidthMax', False);
616    
617     wkList := TStringList.Create;
618     try
619     ini.ReadSection('Name', wkList);
620     for i := 0 to wkList.Count - 1 do begin
621     wkStr := ini.ReadString('Name', wkList[i], '');
622     if (wkStr <> '') and (FNameList.IndexOf(wkStr) = -1) then
623     FNameList.Add(wkStr);
624     end;
625     ini.ReadSection('Mail', wkList);
626     for i := 0 to wkList.Count - 1 do begin
627     wkStr := ini.ReadString('Mail', wkList[i], '');
628     if (wkStr <> '') and (FMailList.IndexOf(wkStr) = -1) then
629     FMailList.Add(wkStr);
630     end;
631     ini.ReadSection('SelectText', wkList);
632     for i := 0 to wkList.Count - 1 do begin
633     wkStr := ini.ReadString('SelectText', wkList[i], '');
634     if (wkStr <> '') and (FSelectTextList.IndexOf(wkStr) = -1) then
635     FSelectTextList.Add(wkStr);
636     end;
637     finally
638     wkList.Free;
639     end;
640    
641     //???鴻????????
642     wkList := TStringList.Create;
643     try
644     ini.ReadSection('BBSColumnWidth', wkList);
645     if Length(FBBSColumnWidth) <> wkList.Count then begin
646     ini.EraseSection('BBSColumnWidth');
647     end;
648     for i := 0 to Length(FBBSColumnWidth) - 1 do begin
649     BBSColumnWidth[i] := ini.ReadInteger('BBSColumnWidth', 'ID' + IntToStr(i), DEFAULT_BBS_WIDTH[i]);
650     end;
651     ini.ReadSection('CategoryColumnWidth', wkList);
652     if Length(FCategoryColumnWidth) <> wkList.Count then begin
653     ini.EraseSection('CategoryColumnWidth');
654     end;
655     for i := 0 to Length(FCategoryColumnWidth) - 1 do begin
656     CategoryColumnWidth[i] := ini.ReadInteger('CategoryColumnWidth', 'ID' + IntToStr(i), DEFAULT_CATEGORY_WIDTH[i]);
657     end;
658     ini.ReadSection('BoardColumnWidth', wkList);
659     if Length(FBoardColumnWidth) <> wkList.Count then begin
660     ini.EraseSection('BoardColumnWidth');
661     end;
662     for i := 0 to Length(FBoardColumnWidth) - 1 do begin
663     BoardColumnWidth[i] := ini.ReadInteger('BoardColumnWidth', 'ID' + IntToStr(i), DEFAULT_BOARD_WIDTH[i]);
664     end;
665     finally
666     wkList.Free;
667     end;
668    
669    
670     //???鴻?????/span>
671     FListViewNo := ini.ReadBool('Function', 'ListViewNo', True);
672     //CSS
673     FUseCSS := ini.ReadBool('CSS', 'UseCSS', True);
674     //CSS???<?ゃ????
675     FCSSFileName := ini.ReadString('CSS', 'FileName', 'default.css');
676    
677     //Mail罨?茵?ず
678     FShowMail := ini.ReadBool('Thread', 'ShowMail', True);
679 yoffy 1.2 //???≪?????c???????鴻???????≪????茵?ず
680 hi_ 1.1 FUnActivePopup := ini.ReadBool('Thread', 'UnActivePopup', False);
681 yoffy 1.2 //???鴻???????≪???????????若???若????
682     FResPopupHeaderBold := ini.ReadBool('Thread', 'ResPopupHeaderBold', True);
683 hi_ 1.1
684     //???ょ∈茯?
685     FDeleteMsg := ini.ReadBool('Function', 'LogDeleteMessage', True);
686    
687     //???違????????
688     FLogFolder := ini.ReadString('Folder', 'LogFolder', ExtractFilePath(Application.ExeName) + 'Log');
689     NewLogFolder := '';
690    
691     //??RL
692     FBoardURL2ch := ini.ReadString('BoardURL', '2ch', DEFAULT_2CH_BOARD_URL);
693    
694     //茯?荐主?????若??D?祉???鴻???若??
695     FUserID := ini.ReadString('Attestation', 'UserID', '');
696     FPassword := Decrypt(ini.ReadString('Attestation', 'Password', ''));
697     FAutoLogin := ini.ReadBool('Attestation', 'AutoLogin', False);
698    
699     //URL??????????莎桁???≪????/span>
700     FURLApp := ini.ReadBool('URLApp', 'Select', False);
701     FURLAppFile := ini.ReadString('URLApp', 'File', '');
702    
703     //mailto????????????篏?
704     FOpenMailer := ini.ReadBool('Mailto', 'Open', True);
705    
706     //???????≪????篏?臀?/span>
707     FPopupPosition := TGikoPopupPosition(ini.ReadInteger('Browser', 'PopupPosition', Ord(gppLeftBottom)));
708    
709     //?≪?????鴻????/span>
710     FURLDisplay := ini.ReadBool('AddressBar', 'URLDisplay', False);
711     FAddressBarTabStop := ini.ReadBool('AddressBar', 'TabStop', True);
712     FLinkAddAddressBar := ini.ReadBool('AddressBar', 'LinkAdd', False);
713     FAddressHistoryCount := ini.ReadInteger('AddressBar', 'HistoryCount', 100);
714    
715     //?糸????????ャ??/span>
716     FPreviewVisible := ini.ReadBool('Browser', 'PreviewVisible', True);
717     FPreviewSize := TGikoPreviewSize(ini.ReadInteger('Browser', 'PreviewSize', Ord(gpsMedium)));
718     FPreviewWait := ini.ReadInteger('Browser', 'PreviewWait', 500);
719    
720     //?鴻??????筝?荀ф?贋?違?≪?ゃ?潟??/span>
721     FListIconVisible := ini.ReadBool('ThreadList', 'StateIconVisible', True);
722    
723     //?吾??莨若?炊?????激?恰???私戎??┃絎?
724     FUseMachineTime := ini.ReadBool('PostTime', 'UseMachineTime', False);
725     FTimeAdjustSec := ini.ReadInteger('PostTime', 'TimeAdjustSec', 0);
726     FTimeAdjust := ini.ReadBool('PostTime', 'TimeAdjust', True);
727    
728     //?泣???潟??
729     if Exists then begin
730     for i := 0 to GetSoundCount - 1 do begin
731     SoundFileName[i] := ini.ReadString('Sound', SoundName[i], '');
732     if not FileExists(SoundFileName[i]) then
733     SoundFileName[i] := '';
734     end;
735     end else begin
736     s := ExtractFileDir(Application.ExeName) + '\sound\';
737     SoundFileName[0] := s + '??緇?????.wav';
738     SoundFileName[1] := s + '??緇?????(綏???).wav';
739     SoundFileName[2] := s + '???贋??wav';
740     SoundFileName[3] := '';
741     SoundFileName[4] := s + '??????wav';
742     end;
743    
744     //???若??????/span>
745     for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
746     CoolSet.FCoolID := ini.ReadInteger('MainCoolBar', 'ID' + IntToStr(i), -1);
747     CoolSet.FCoolWidth := ini.ReadInteger('MainCoolBar', 'Width' + IntToStr(i), -1);
748     CoolSet.FCoolBreak := ini.ReadBool('MainCoolBar', 'Break' + IntToStr(i), False);
749     MainCoolSet[i] := CoolSet;
750     end;
751     for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
752     CoolSet.FCoolID := ini.ReadInteger('ListCoolBar', 'ID' + IntToStr(i), -1);
753     CoolSet.FCoolWidth := ini.ReadInteger('ListCoolBar', 'Width' + IntToStr(i), -1);
754     CoolSet.FCoolBreak := ini.ReadBool('ListCoolBar', 'Break' + IntToStr(i), False);
755 yoffy 1.2 ListCoolSet[i] := CoolSet;
756 hi_ 1.1 end;
757     for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
758     CoolSet.FCoolID := ini.ReadInteger('BrowserCoolBar', 'ID' + IntToStr(i), -1);
759     CoolSet.FCoolWidth := ini.ReadInteger('BrowserCoolBar', 'Width' + IntToStr(i), -1);
760     CoolSet.FCoolBreak := ini.ReadBool('BrowserCoolBar', 'Break' + IntToStr(i), False);
761     BrowserCoolSet[i] := CoolSet;
762     end;
763 h677 1.3
764     //???若????
765     FAbonCutoffNum := ini.ReadInteger('Abon','CutOffnum',0);
766     FAbonDeleterlo := ini.ReadBool('Abon','Deleterlo',false);
767     FAbonReplaceul := ini.ReadBool('Abon','Replaceul',false);
768     FPopUpAbon := ini.ReadBool('abon','Popup',false);
769 hi_ 1.1 finally
770     ini.Free;
771     end;
772     end;
773    
774     //荐?????<?ゃ???絖?(system)
775     procedure TSetting.WriteSystemSettingFile();
776     var
777     ini: TMemIniFile;
778     begin
779     ini := TMemIniFile.Create(GetFileName());
780     try
781     //??篆<???????<?泣?ゃ??/span>
782     ini.WriteInteger('HTTP', 'RecvBufferSize', FRecvBufferSize);
783     //HTTP1.1篏睡??/span>
784     ini.WriteBool('HTTP', 'Protocol', FProtocol);
785     //???????傑・膓?HTTP1.1篏睡??/span>
786     ini.WriteBool('HTTP', 'ProxyProtocol', FProxyProtocol);
787    
788     ini.WriteBool('ReadProxy', 'Proxy', FReadProxy);
789     ini.WriteString('ReadProxy', 'Address', FReadProxyAddress);
790     ini.WriteInteger('ReadProxy', 'Port', FReadProxyPort);
791     ini.WriteString('ReadProxy', 'UserID', FReadProxyUserID);
792     ini.WriteString('ReadProxy', 'Password', FReadProxyPassword);
793    
794     ini.WriteBool('WriteProxy', 'Proxy', FWriteProxy);
795     ini.WriteString('WriteProxy', 'Address', FWriteProxyAddress);
796     ini.WriteInteger('WriteProxy', 'Port', FWriteProxyPort);
797     ini.WriteString('WriteProxy', 'UserID', FWriteProxyUserID);
798     ini.WriteString('WriteProxy', 'Password', FWriteProxyPassword);
799    
800     ini.WriteString('Window', 'CabinetFontName', FCabinetFontName);
801     ini.WriteInteger('Window', 'CabinetFontSize', FCabinetFontSize);
802     ini.WriteString('Window', 'CabinetFontColor', ColorToString(FCabinetFontColor));
803     ini.WriteString('Window', 'CabinetBackColor', ColorToString(FCabinetBackColor));
804    
805     ini.WriteString('Window', 'ListFontName', FListFontName);
806     ini.WriteInteger('Window', 'ListFontSize', FListFontSize);
807     ini.WriteString('Window', 'ListFontColor', ColorToString(FListFontColor));
808     ini.WriteString('Window', 'ListBackColor', ColorToString(FListBackColor));
809    
810     ini.WriteString('Window', 'EditorFontName', FEditorFontName);
811     ini.WriteInteger('Window', 'EditorFontSize', FEditorFontSize);
812     ini.WriteString('Window', 'EditorFontColor', ColorToString(FEditorFontColor));
813     ini.WriteString('Window', 'EditorBackColor', ColorToString(FEditorBackColor));
814    
815     ini.WriteString('Window', 'BrowserTabFontName', FBrowserTabFontName);
816     ini.WriteInteger('Window', 'BrowserTabFontSize', FBrowserTabFontSize);
817     ini.WriteBool('Window', 'BrowserTabFontBold', FBrowserTabFontBold);
818     ini.WriteBool('Window', 'BrowserTabFontItalic', FBrowserTabFontItalic);
819    
820     ini.WriteString('Window', 'HintFontName', FHintFontName);
821     ini.WriteInteger('Window', 'HintFontSize', FHintFontSize);
822     ini.WriteString('Window', 'HintFontColor', ColorToString(FHintFontColor));
823     ini.WriteString('Window', 'HintBackColor', ColorToString(FHintBackColor));
824    
825     ini.UpdateFile;
826     finally
827     ini.Free;
828     end;
829     end;
830    
831     //荐?????<?ゃ???絖?(window)
832     procedure TSetting.WriteWindowSettingFile();
833     var
834     i: Integer;
835     ini: TMemIniFile;
836     CoolSet: TCoolSet;
837     begin
838     ini := TMemIniFile.Create(GetFileName());
839     try
840     ini.WriteInteger('WindowSize', 'Top', WindowTop);
841     ini.WriteInteger('WindowSize', 'Left', WindowLeft);
842     ini.WriteInteger('WindowSize', 'Height', WindowHeight);
843     ini.WriteInteger('WindowSize', 'Width', WindowWidth);
844     ini.WriteBool('WindowSize', 'Max', WindowMax);
845    
846     ini.WriteInteger('ViewStyle', 'ListView', Ord(ListStyle));
847    
848     ini.WriteInteger('EditorWindowSize', 'Top', EditWindowTop);
849     ini.WriteInteger('EditorWindowSize', 'Left', EditWindowLeft);
850     ini.WriteInteger('EditorWindowSize', 'Height', EditWindowHeight);
851     ini.WriteInteger('EditorWindowSize', 'Width', EditWindowWidth);
852     ini.WriteBool('EditorWindowSize', 'Max', EditWindowMax);
853    
854     //???若??????/span>
855     ini.WriteBool('ToolBar', 'StdVisible', FStdToolBarVisible);
856     ini.WriteBool('ToolBar', 'AddressVisible', FAddressBarVisible);
857     ini.WriteBool('ToolBar', 'LinkVisible', FLinkBarVisible);
858     ini.WriteBool('ToolBar', 'ListVisible', FListToolBarVisible);
859     ini.WriteBool('ToolBar', 'ListNameVisible', FListNameBarVisible);
860     ini.WriteBool('ToolBar', 'BrowserVisible', FBrowserToolBarVisible);
861     ini.WriteBool('ToolBar', 'BrowserNameVisible', FBrowserNameBarVisible);
862     //???若??????rapable
863     ini.WriteBool('ToolBar', 'ListWrapable', FListToolBarWrapable);
864     ini.WriteBool('ToolBar', 'BrowserWrapable', FBrowserToolBarWrapable);
865    
866     //?帥??
867     ini.WriteBool('Tab', 'BrowserTabVisible', FBrowserTabVisible);
868     ini.WriteInteger('Tab', 'BrowserTabPosition', Ord(FBrowserTabPosition));
869     ini.WriteInteger('Tab', 'BrowserTabAppend', Ord(FBrowserTabAppend));
870     ini.WriteInteger('Tab', 'BrowserTabStyle', Ord(FBrowserTabStyle));
871    
872     //?<???祉?若?吾????/span>
873     ini.WriteBool('MessageBar', 'Visible', FMessageBarVisible);
874     ini.WriteInteger('MessageBar', 'Height', FMessegeBarHeight);
875    
876     //?鴻???若?帥?鴻????/span>
877     ini.WriteBool('StatusBar', 'Visible', FStatusBarVisible);
878    
879     //???c????????
880     ini.WriteBool('Cabinet', 'Visible', FCabinetVisible);
881     ini.WriteInteger('Cabinet', 'Width', FCabinetWidth);
882    
883     //???鴻?????泣?ゃ?冴?????贋梓綛?/span>
884     ini.WriteInteger('List', 'Orientation', Ord(FListOrientation));
885     ini.WriteInteger('List', 'Height', FListHeight);
886     ini.WriteInteger('List', 'HeightState', Ord(FListHeightState));
887     ini.WriteInteger('List', 'Width', FListWidth);
888     ini.WriteInteger('List', 'WidthState', Ord(FListWidthState));
889     // ini.WriteBool('List', 'HeightMax', FListHeightMax);
890     // ini.WriteBool('List', 'WidthMax', FListWidthMax);
891    
892    
893     // ini.WriteInteger('Window', 'BrowserFontSize', BrowserFontSize);
894    
895     //???鴻????埈;腓?/span>
896     ini.WriteBool('Function', 'ListViewNo', FListViewNo);
897     //CSS篏睡??/span>
898     ini.WriteBool('CSS', 'UseCSS', FUseCSS);
899     //CSS???<?ゃ????
900     ini.WriteString('CSS', 'FileName', FCSSFileName);
901     //Mail罨?茵?ず
902     ini.WriteBool('Thread', 'ShowMail', FShowMail);
903     //???医???ょ∈茯?
904     ini.WriteBool('Function', 'LogDeleteMessage', FDeleteMsg);
905     //???≪?????c???????????≪????茵?ず
906     ini.WriteBool('Thread', 'UnActivePopup', FUnActivePopup);
907 yoffy 1.2 //???鴻???????≪???????????若???若????
908     ini.WriteBool('Thread', 'ResPopupHeaderBold', FResPopupHeaderBold);
909 hi_ 1.1
910     ini.WriteString('BoardURL', '2ch', FBoardURL2ch);
911    
912     //茯?荐主?????若??D?祉???鴻???若??
913     ini.WriteString('Attestation', 'UserID', FUserID);
914     ini.WriteString('Attestation', 'Password', Encrypt(FPassword));
915     ini.WriteBool('Attestation', 'AutoLogin', FAutoLogin);
916    
917     //URL??????????莎桁???≪????/span>
918     ini.WriteBool('URLApp', 'Select', FURLApp);
919     ini.WriteString('URLApp', 'File', FURLAppFile);
920    
921     //mailto????????????篏?
922     ini.WriteBool('Mailto', 'Open', FOpenMailer);
923    
924     //???????≪????篏?臀?/span>
925     ini.WriteInteger('Browser', 'PopupPosition', Ord(FPopupPosition));
926    
927     //?≪?????鴻????/span>
928     ini.WriteBool('AddressBar', 'URLDisplay', FURLDisplay);
929     ini.WriteBool('AddressBar', 'TabStop', FAddressBarTabStop);
930     ini.WriteBool('AddressBar', 'LinkAdd', FLinkAddAddressBar);
931     ini.WriteInteger('AddressBar', 'HistoryCount', FAddressHistoryCount);
932    
933     //?糸????????ャ??/span>
934     ini.WriteBool('Browser', 'PreviewVisible', FPreviewVisible);
935     ini.WriteInteger('Browser', 'PreviewSize', Ord(FPreviewSize));
936     ini.WriteInteger('Browser', 'PreviewWait', FPreviewWait);
937    
938     //?鴻??????筝?荀ф?贋?違?≪?ゃ?潟??/span>
939     ini.WriteBool('ThreadList', 'StateIconVisible', FListIconVisible);
940    
941     //?吾??莨若?炊?????激?恰???私戎??┃絎?
942     ini.WriteBool('PostTime', 'UseMachineTime', FUseMachineTime);
943     ini.WriteInteger('PostTime', 'TimeAdjustSec', FTimeAdjustSec);
944     ini.WriteBool('PostTime', 'TimeAdjust', FTimeAdjust);
945    
946     //???鴻????????
947     for i := 0 to Length(FBBSColumnWidth) - 1 do begin
948     ini.WriteInteger('BBSColumnWidth', 'ID' + IntToStr(i), FBBSColumnWidth[i]);
949     end;
950     for i := 0 to Length(FCategoryColumnWidth) - 1 do begin
951     ini.WriteInteger('CategoryColumnWidth', 'ID' + IntToStr(i), FCategoryColumnWidth[i]);
952     end;
953     for i := 0 to Length(FBoardColumnWidth) - 1 do begin
954     ini.WriteInteger('BoardColumnWidth', 'ID' + IntToStr(i), FBoardColumnWidth[i]);
955     end;
956    
957     //?泣???潟??
958     for i := 0 to GetSoundCount - 1 do begin
959     if not FileExists(SoundFileName[i]) then
960     SoundFileName[i] := '';
961     ini.WriteString('Sound', SoundName[i], SoundFileName[i]);
962     end;
963    
964     //CoolBar
965     ini.EraseSection('MainCoolBar');
966     for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
967     CoolSet := MainCoolSet[i];
968     ini.WriteInteger('MainCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
969     ini.WriteInteger('MainCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
970     ini.WriteBool('MainCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
971     end;
972 yoffy 1.2 ini.EraseSection('ListCoolBar');
973 hi_ 1.1 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
974     CoolSet := ListCoolSet[i];
975     ini.WriteInteger('ListCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
976     ini.WriteInteger('ListCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
977     ini.WriteBool('ListCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
978     end;
979     ini.EraseSection('BrowserCoolBar');
980     for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
981     CoolSet := BrowserCoolSet[i];
982     ini.WriteInteger('BrowserCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
983     ini.WriteInteger('BrowserCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
984     ini.WriteBool('BrowserCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
985     end;
986 h677 1.3
987     //???若????
988     ini.WriteInteger('Abon','CutOffnum',FAbonCutoffNum);
989     ini.WriteBool('Abon','Deleterlo',FAbonDeleterlo);
990     ini.WriteBool('Abon','Replaceul',FAbonReplaceul);
991     ini.WriteBool('abon','Popup',FPopUpAbon);
992 hi_ 1.1
993     ini.UpdateFile;
994     finally
995     ini.Free;
996     end;
997     end;
998    
999     //荐?????<?ゃ???絖?(name & mail)
1000     procedure TSetting.WriteNameMailSettingFile();
1001     var
1002     i: Integer;
1003     ini: TMemIniFile;
1004     begin
1005     ini := TMemIniFile.Create(GetFileName());
1006     try
1007     ini.EraseSection('Name');
1008     ini.EraseSection('Mail');
1009     ini.EraseSection('SelectText');
1010     for i := 0 to FNameList.Count - 1 do begin
1011     ini.WriteString('Name', Format('%.2d', [i + 1]), FNameList[i]);
1012     if i >= 39 then
1013     Break;
1014     end;
1015     for i := 0 to FMailList.Count - 1 do begin
1016     ini.WriteString('Mail', Format('%.2d', [i + 1]), FMailList[i]);
1017     if i >= 39 then
1018     Break;
1019     end;
1020     for i := 0 to FSelectTextList.Count - 1 do begin
1021     ini.WriteString('SelectText', Format('%.2d', [i + 1]), FSelectTextList[i]);
1022     if i >= 39 then
1023     Break;
1024     end;
1025     ini.UpdateFile;
1026     finally
1027     ini.Free;
1028     end;
1029     end;
1030    
1031     procedure TSetting.WriteFolderSettingFile();
1032     var
1033     ini: TMemIniFile;
1034     begin
1035     ini := TMemIniFile.Create(GetFileName());
1036     try
1037     if ExtractFilePath(Application.ExeName) + 'Log' = NewLogFolder then
1038     ini.DeleteKey('Folder', 'LogFolder')
1039     else
1040     ini.WriteString('Folder', 'LogFolder', NewLogFolder);
1041     ini.UpdateFile;
1042     finally
1043     ini.Free;
1044     end;
1045     end;
1046    
1047     //???鴻????????????????/span>
1048     function TSetting.GetBBSColumnWidth(index: Integer): Integer;
1049     begin
1050     Result := IfThen(index in [0..Length(FBBSColumnWidth) - 1], FBBSColumnWidth[index], 0);
1051     end;
1052    
1053     function TSetting.GetCategoryColumnWidth(index: Integer): Integer;
1054     begin
1055     Result := IfThen(index in [0..Length(FCategoryColumnWidth) - 1], FCategoryColumnWidth[index], 0);
1056     end;
1057    
1058     function TSetting.GetBoardColumnWidth(index: Integer): Integer;
1059     begin
1060     Result := IfThen(index in [0..Length(FBoardColumnWidth) - 1], FBoardColumnWidth[index], 0);
1061     end;
1062    
1063     procedure TSetting.SetBBSColumnWidth(index: Integer; value: Integer);
1064     begin
1065     if index in [0..Length(FBBSColumnWidth) - 1] then
1066     FBBSColumnWidth[index] := value;
1067     end;
1068    
1069     procedure TSetting.SetCategoryColumnWidth(index: Integer; value: Integer);
1070     begin
1071     if index in [0..Length(FCategoryColumnWidth) - 1] then
1072     FCategoryColumnWidth[index] := value;
1073     end;
1074    
1075     procedure TSetting.SetBoardColumnWidth(index: Integer; value: Integer);
1076     begin
1077     if index in [0..Length(FBoardColumnWidth) - 1] then
1078     FBoardColumnWidth[index] := value;
1079     end;
1080    
1081     function TSetting.GetSoundCount: Integer;
1082     begin
1083     Result := Length(SOUND_NAME);
1084     end;
1085    
1086     function TSetting.GetSoundName(Index: Integer): string;
1087     begin
1088     if (Index < GetSoundCount) and (Index >= 0) then
1089     Result := SOUND_NAME[Index].Name
1090     else
1091     Result := '';
1092     end;
1093    
1094     function TSetting.GetSoundViewName(Index: Integer): string;
1095     begin
1096     if (Index < GetSoundCount) and (Index >= 0) then
1097     Result := SOUND_NAME[Index].ViewName
1098     else
1099     Result := '';
1100     end;
1101    
1102     function TSetting.GetSoundFileName(Index: Integer): string;
1103     begin
1104     if (Index < GetSoundCount) and (Index >= 0) then
1105     Result := SOUND_NAME[Index].FileName
1106     else
1107     Result := '';
1108     end;
1109    
1110     procedure TSetting.SetSoundFileName(Index: Integer; value: string);
1111     begin
1112     if (Index < GetSoundCount) and (Index >= 0) then
1113     SOUND_NAME[Index].FileName := value;
1114     end;
1115    
1116     function TSetting.FindSoundFileName(Name: string): string;
1117     var
1118     i: Integer;
1119     begin
1120     for i := 0 to GetSoundCount - 1 do begin
1121     if SoundName[i] = Name then begin
1122     Result := SoundFileName[i];
1123     Exit;
1124     end;
1125     end;
1126     Result := '';
1127     end;
1128    
1129     function TSetting.Encrypt(s: string): string;
1130     var
1131     cryptObj: THogeCryptAuto;
1132     inputStream, outputStream: TStringStream;
1133     begin
1134     inputStream := TStringStream.Create(s);
1135     outputStream := TStringStream.Create('');
1136     cryptObj := THogeCryptAuto.Create;
1137     try
1138     // ???桁??
1139     cryptObj.Encrypt(inputStream, GIKO_ENCRYPT_TEXT, outputStream);
1140    
1141     // ???ゃ?????????у?荀?????????????鴻???????
1142     Result := HogeBase64Encode(outputStream.DataString);
1143     finally
1144     cryptObj.Free;
1145     outputStream.Free;
1146     inputStream.Free;
1147     end;
1148     end;
1149    
1150     function TSetting.Decrypt(s: string): string;
1151     var
1152     cryptObj: THogeCryptAuto;
1153     inputStream, outputStream: TStringStream;
1154     begin
1155     try
1156     inputStream := TStringStream.Create(HogeBase64Decode(s));
1157     except
1158     Result := '';
1159     Exit;
1160     end;
1161     outputStream := TStringStream.Create('');
1162     cryptObj := THogeCryptAuto.Create;
1163     try
1164     // 緇??/span>
1165     cryptObj.Decrypt(inputStream, GIKO_ENCRYPT_TEXT, outputStream);
1166     Result := outputStream.DataString;
1167     finally
1168     cryptObj.Free;
1169     outputStream.Free;
1170     inputStream.Free;
1171     end;
1172     end;
1173    
1174     function TSetting.GetMainCoolSet(Index: Integer): TCoolSet;
1175     begin
1176     if Index in [0..MAIN_COOLBAND_COUNT - 1] then
1177     Result := FMainCoolBar[Index]
1178     else begin
1179     Result.FCoolID := -1;
1180     Result.FCoolWidth := -1;
1181     Result.FCoolBreak := False;
1182     end;
1183     end;
1184    
1185     function TSetting.GetBoardCoolSet(Index: Integer): TCoolSet;
1186     begin
1187     if Index in [0..LIST_COOLBAND_COUNT - 1] then
1188     Result := FListCoolBar[Index]
1189     else begin
1190     Result.FCoolID := -1;
1191     Result.FCoolWidth := -1;
1192     Result.FCoolBreak := False;
1193     end;
1194     end;
1195    
1196     function TSetting.GetBrowserCoolSet(Index: Integer): TCoolSet;
1197     begin
1198     if Index in [0..BROWSER_COOLBAND_COUNT - 1] then
1199     Result := FBrowserCoolBar[Index]
1200     else begin
1201     Result.FCoolID := -1;
1202     Result.FCoolWidth := -1;
1203     Result.FCoolBreak := False;
1204     end;
1205     end;
1206    
1207     procedure TSetting.SetMainCoolSet(Index: Integer; CoolSet: TCoolSet);
1208     begin
1209     if Index in [0..MAIN_COOLBAND_COUNT - 1] then
1210     FMainCoolBar[Index] := CoolSet;
1211     end;
1212    
1213     procedure TSetting.SetBoardCoolSet(Index: Integer; CoolSet: TCoolSet);
1214     begin
1215     if Index in [0..LIST_COOLBAND_COUNT - 1] then
1216     FListCoolBar[Index] := CoolSet;
1217     end;
1218    
1219     procedure TSetting.SetBrowserCoolSet(Index: Integer; CoolSet: TCoolSet);
1220     begin
1221     if Index in [0..BROWSER_COOLBAND_COUNT - 1] then
1222     FBrowserCoolBar[Index] := CoolSet;
1223     end;
1224    
1225    
1226     end.
1227    

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