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.6 - (hide annotations) (download) (as text)
Thu Sep 25 21:10:07 2003 UTC (20 years, 6 months ago) by yoffy
Branch: MAIN
CVS Tags: b41
Changes since 1.5: +40 -18 lines
File MIME type: text/x-pascal
・ブラウザ(スレ表示)に関するスタイル設定の実装。現状 UI は無し。

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

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