6 SysUtils, Classes, Graphics, Forms, Math, IniFiles, UCryptAuto, UBase64,
10 MAIN_COOLBAND_COUNT = 4; //
\83\81\83C
\83\93CoolBand
\82Ì
\90\94
11 LIST_COOLBAND_COUNT = 2; //
\94ÂCoolBand
\82Ì
\90\94
12 BROWSER_COOLBAND_COUNT = 3; //
\83u
\83\89\83E
\83UCoolBand
\82Ì
\90\94
15 TGikoTabPosition = (gtpTop, gtpBottom); //
\83^
\83u
\88Ê
\92u
16 TGikoTabAppend = (gtaFirst, gtpLast); //
\83^
\83u
\92Ç
\89Á
\88Ê
\92u
17 TGikoTabStyle = (gtsTab, gtsButton, gtsFlat); //
\83^
\83u
\83X
\83^
\83C
\83\8b
18 TGikoListOrientation = (gloHorizontal, gloVertical); //
\83\8a\83X
\83g
\90\82\92¼
\81E
\90\85\95½
19 TGikoListState = (glsMax, glsNormal, glsMin); //
\83\8a\83X
\83g
\83T
\83C
\83Y
\8fó
\91Ô
20 //
\83|
\83b
\83v
\83A
\83b
\83v
\95\
\8e¦
\88Ê
\92u
21 TGikoPopupPosition = (gppRightTop, gppTop, gppLeftTop,
22 gppRight, gppCenter, gppLeft,
23 gppRightBottom, gppBottom, gppLeftBottom);
24 //
\83v
\83\8c\83r
\83\85\81[
\83T
\83C
\83Y
25 TGikoPreviewSize = (gpsXLarge, gpsLarge, gpsMedium, gpsSmall, gpsXSmall);
27 //CoolBar
\90Ý
\92è
\83\8c\83R
\81[
\83h
34 TSetting = class(TObject)
36 //
\8eó
\90M
\83o
\83b
\83t
\83@
\83T
\83C
\83Y
37 FRecvBufferSize: Integer;
40 //
\83v
\83\8d\83L
\83V
\90Ú
\91±HTTP1.1
\8eg
\97p
41 FProxyProtocol: Boolean;
43 //
\83v
\83\8d\83L
\83V
\81i
\93Ç
\8d\9e\97p
\81j
45 FReadProxyAddress: string;
46 FReadProxyPort: Integer;
47 FReadProxyUserID: string;
48 FReadProxyPassword: string;
50 //
\83v
\83\8d\83L
\83V
\81i
\8f\91\8d\9e\97p
\81j
52 FWriteProxyAddress: string;
53 FWriteProxyPort: Integer;
54 FWriteProxyUserID: string;
55 FWriteProxyPassword: string;
57 //
\83L
\83\83\83r
\83l
\83b
\83g
58 FCabinetFontName: string;
59 FCabinetFontSize: Integer;
60 FCabinetFontBold: Boolean;
61 FCabinetFontItalic: Boolean;
62 FCabinetFontColor: TColor;
63 FCabinetBackColor: TColor;
66 FListFontName: string;
67 FListFontSize: Integer;
68 FListFontBold: Boolean;
69 FListFontItalic: Boolean;
70 FListFontColor: TColor;
71 FListBackColor: TColor;
74 //FBrowserFontColor: TColor;
75 //FBrowserBackColor: TColor;
76 //FBrowserFontSize: Integer;
79 FEditorFontName: string;
80 FEditorFontSize: Integer;
81 FEditorFontBold: Boolean;
82 FEditorFontItalic: Boolean;
83 FEditorFontColor: TColor;
84 FEditorBackColor: TColor;
86 //
\83^
\83u
\83t
\83H
\83\93\83g
87 FBrowserTabFontName: string;
88 FBrowserTabFontSize: Integer;
89 FBrowserTabFontBold: Boolean;
90 FBrowserTabFontItalic: Boolean;
92 //
\83q
\83\93\83g
\83E
\83B
\83\93\83h
\83E
93 FHintFontName: string;
94 FHintFontSize: Integer;
95 //FHintFontBold: Boolean;
96 //FHintFontItalic: Boolean;
97 FHintFontColor: TColor;
98 FHintBackColor: TColor;
100 //
\83E
\83B
\83\93\83h
\83E
\83T
\83C
\83Y
102 FWindowLeft: Integer;
103 FWindowHeight: Integer;
104 FWindowWidth: Integer;
106 //
\83\8a\83X
\83g
\83r
\83\85\81[
\83X
\83^
\83C
\83\8b
107 FListStyle: TViewStyle;
109 //
\83c
\81[
\83\8b\83o
\81[
\95\
\8e¦
110 FStdToolBarVisible: Boolean;
111 FAddressBarVisible: Boolean;
112 FLinkBarVisible: Boolean;
113 FListToolBarVisible: Boolean;
114 FListNameBarVisible: Boolean;
115 FBrowserToolBarVisible: Boolean;
116 FBrowserNameBarVisible: Boolean;
118 //
\83u
\83\89\83E
\83U
\83^
\83u
119 FBrowserTabVisible: Boolean;
120 FBrowserTabPosition: TGikoTabPosition;
121 FBrowserTabAppend: TGikoTabAppend;
122 FBrowserTabStyle: TGikoTabStyle;
124 //
\83\81\83b
\83Z
\81[
\83W
\83o
\81[
125 FMessageBarVisible: Boolean;
126 FMessegeBarHeight: Integer;
128 //
\83X
\83e
\81[
\83^
\83X
\83o
\81[
129 FStatusBarVisible: Boolean;
131 //
\83L
\83\83\83r
\83l
\83b
\83g
\89Â
\8e\8b\81E
\83T
\83C
\83Y
132 FCabinetVisible: Boolean;
133 FCabinetWidth: Integer;
135 //
\83\8a\83X
\83g
\81E
\83u
\83\89\83E
\83U
\83T
\83C
\83Y
136 FListOrientation: TGikoListOrientation;
137 FListHeight: Integer;
138 FListHeightState: TGikoListState;
140 FListWidthState: TGikoListState;
141 // FListHeightMax: Boolean;
142 // FListWidthMax: Boolean;
144 //
\91\97\90M
\97p
\96¼
\91O
\81E
\83\81\81[
\83\8b
145 FNameList: TStringList;
146 FMailList: TStringList;
148 //
\83G
\83f
\83B
\83^
\81[
\83E
\83B
\83\93\83h
\83E
\83T
\83C
\83Y
149 FEditWindowTop: Integer;
150 FEditWindowLeft: Integer;
151 FEditWindowHeight: Integer;
152 FEditWindowWidth: Integer;
153 FEditWindowMax: Boolean;
155 //
\83\8a\83X
\83g
\94Ô
\8d\86\95\
\8e¦
156 FListViewNo: Boolean;
159 //CSS
\83t
\83@
\83C
\83\8b\96¼
160 FCSSFileName: string;
163 //
\94ñ
\83A
\83N
\83e
\83B
\83u
\8e\9e\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\95\
\8e¦
164 FUnActivePopup: Boolean;
165 //
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\83w
\83b
\83_
\81[
\83{
\81[
\83\8b\83h
166 FResPopupHeaderBold: Boolean;
168 //
\83\8d\83O
\83t
\83H
\83\8b\83_
170 FNewLogFolder: string;
172 //
\83\8a\83X
\83g
\83J
\83\89\83\80\83w
\83b
\83_
\81[
\83T
\83C
\83Y
173 FBBSColumnWidth: array[0..0] of Integer;
174 FCategoryColumnWidth: array[0..3] of Integer;
175 FBoardColumnWidth: array[0..6] of Integer;
177 //
\8di
\8d\9e\82Ý
\95¶
\8e\9a\97ñ
178 FSelectTextList: TStringList;
181 FBoardURL2ch: string;
183 //
\83\86\81[
\83UID
\81E
\83p
\83X
\83\8f\81[
\83h
188 //URL
\83N
\83\8a\83b
\83N
\8e\9e\8bN
\93®
\83A
\83v
\83\8a
192 //mailto
\83N
\83\8a\83b
\83N
\8e\9e\93®
\8dì
193 FOpenMailer: Boolean;
198 //CoolBar
\81i
\83\81\83C
\83\93\81E
\94Â
\81E
\83u
\83\89\83E
\83U
\81j
199 FMainCoolBar: array[0..MAIN_COOLBAND_COUNT - 1] of TCoolSet;
200 FListCoolBar: array[0..LIST_COOLBAND_COUNT - 1] of TCoolSet;
201 FBrowserCoolBar: array[0..BROWSER_COOLBAND_COUNT - 1] of TCoolSet;
204 FListToolBarWrapable: Boolean;
205 FBrowserToolBarWrapable: Boolean;
207 //
\83|
\83b
\83v
\83A
\83b
\83v
\88Ê
\92u
208 FPopupPosition: TGikoPopupPosition;
210 //
\83A
\83h
\83\8c\83X
\83o
\81[
211 FURLDisplay: Boolean;
212 FAddressBarTabStop: Boolean;
213 FLinkAddAddressBar: Boolean;
214 FAddressHistoryCount: Integer;
216 //
\89æ
\91\9c\83v
\83\8c\83r
\83\85\81[
217 FPreviewVisible: Boolean;
218 FPreviewSize: TGikoPreviewSize;
219 FPreviewWait: Integer;
221 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\8dX
\90V
\83A
\83C
\83R
\83\93\95\
\8e¦
222 FListIconVisible: Boolean;
224 //
\8f\91\82«
\8d\9e\82Ý
\8e\9e\83}
\83V
\83\93\8e\9e\8aÔ
\8eg
\97p
\90Ý
\92è
225 FUseMachineTime: Boolean;
226 FTimeAdjustSec: Integer;
227 FTimeAdjust: Boolean;
229 function GetMainCoolSet(Index: Integer): TCoolSet;
230 function GetBoardCoolSet(Index: Integer): TCoolSet;
231 function GetBrowserCoolSet(Index: Integer): TCoolSet;
232 procedure SetMainCoolSet(Index: Integer; CoolSet: TCoolSet);
233 procedure SetBoardCoolSet(Index: Integer; CoolSet: TCoolSet);
234 procedure SetBrowserCoolSet(Index: Integer; CoolSet: TCoolSet);
236 function GetBBSColumnWidth(index: Integer): Integer;
237 function GetCategoryColumnWidth(index: Integer): Integer;
238 function GetBoardColumnWidth(index: Integer): Integer;
239 procedure SetBBSColumnWidth(index: Integer; value: Integer);
240 procedure SetCategoryColumnWidth(index: Integer; value: Integer);
241 procedure SetBoardColumnWidth(index: Integer; value: Integer);
243 function GetSoundName(Index: Integer): string;
244 function GetSoundViewName(Index: Integer): string;
245 function GetSoundFileName(Index: Integer): string;
246 procedure SetSoundFileName(Index: Integer; value: string);
247 function Encrypt(s: string): string;
248 function Decrypt(s: string): string;
253 destructor Destroy; override;
254 function GetFileName: string;
255 procedure ReadSettingFile;
256 procedure WriteSystemSettingFile;
257 procedure WriteWindowSettingFile;
258 procedure WriteNameMailSettingFile;
259 procedure WriteFolderSettingFile();
260 function GetSoundCount: Integer;
261 function FindSoundFileName(Name: string): string;
263 //
\8eó
\90M
\83o
\83b
\83t
\83@
\83T
\83C
\83Y
264 property RecvBufferSize: Integer read FRecvBufferSize write FRecvBufferSize;
266 property Protocol: Boolean read FProtocol write FProtocol;
267 //
\83v
\83\8d\83L
\83V
\90Ú
\91±HTTP1.1
\8eg
\97p
268 property ProxyProtocol: Boolean read FProxyProtocol write FProxyProtocol;
270 property ReadProxy: Boolean read FReadProxy write FReadProxy;
271 property ReadProxyAddress: string read FReadProxyAddress write FReadProxyAddress;
272 property ReadProxyPort: Integer read FReadProxyPort write FReadProxyPort;
273 property ReadProxyUserID: string read FReadProxyUserID write FReadProxyUserID;
274 property ReadProxyPassword: string read FReadProxyPassword write FReadProxyPassword;
276 property WriteProxy: Boolean read FWriteProxy write FWriteProxy;
277 property WriteProxyAddress: string read FWriteProxyAddress write FWriteProxyAddress;
278 property WriteProxyPort: Integer read FWriteProxyPort write FWriteProxyPort;
279 property WriteProxyUserID: string read FWriteProxyUserID write FWriteProxyUserID;
280 property WriteProxyPassword: string read FWriteProxyPassword write FWriteProxyPassword;
282 property CabinetFontName: string read FCabinetFontName write FCabinetFontName;
283 property CabinetFontSize: Integer read FCabinetFontSize write FCabinetFontSize;
284 property CabinetFontBold: Boolean read FCabinetFontBold write FCabinetFontBold;
285 property CabinetFontItalic: Boolean read FCabinetFontItalic write FCabinetFontItalic;
286 property CabinetFontColor: TColor read FCabinetFontColor write FCabinetFontColor;
287 property CabinetBackColor: TColor read FCabinetBackColor write FCabinetBackColor;
289 property ListFontName: string read FListFontName write FListFontName;
290 property ListFontSize: Integer read FListFontSize write FListFontSize;
291 property ListFontBold: Boolean read FListFontBold write FListFontBold;
292 property ListFontItalic: Boolean read FListFontItalic write FListFontItalic;
293 property ListFontColor: TColor read FListFontColor write FListFontColor;
294 property ListBackColor: TColor read FListBackColor write FListBackColor;
296 // property BrowserFontColor: TColor read FBrowserFontColor write FBrowserFontColor;
297 // property BrowserBackColor: TColor read FBrowserBackColor write FBrowserBackColor;
298 // property BrowserFontSize: Integer read FBrowserFontSize write FBrowserFontSize;
300 property EditorFontName: string read FEditorFontName write FEditorFontName;
301 property EditorFontSize: Integer read FEditorFontSize write FEditorFontSize;
302 property EditorFontBold: Boolean read FEditorFontBold write FEditorFontBold;
303 property EditorFontItalic: Boolean read FEditorFontItalic write FEditorFontItalic;
304 property EditorFontColor: TColor read FEditorFontColor write FEditorFontColor;
305 property EditorBackColor: TColor read FEditorBackColor write FEditorBackColor;
307 property BrowserTabFontName: string read FBrowserTabFontName write FBrowserTabFontName;
308 property BrowserTabFontSize: Integer read FBrowserTabFontSize write FBrowserTabFontSize;
309 property BrowserTabFontBold: Boolean read FBrowserTabFontBold write FBrowserTabFontBold;
310 property BrowserTabFontItalic: Boolean read FBrowserTabFontItalic write FBrowserTabFontItalic;
312 property HintFontName: string read FHintFontName write FHintFontName;
313 property HintFontSize: Integer read FHintFontSize write FHintFontSize;
314 //property HintFontBold: Boolean read FHintFontBold write FHintFontBold;
315 //property HintFontItalic: Boolean read FHintFontItalic write FHintFontItalic;
316 property HintFontColor: TColor read FHintFontColor write FHintFontColor;
317 property HintBackColor: TColor read FHintBackColor write FHintBackColor;
319 property WindowTop: Integer read FWindowTop write FWindowTop;
320 property WindowLeft: Integer read FWindowLeft write FWindowLeft;
321 property WindowHeight: Integer read FWindowHeight write FWindowHeight;
322 property WindowWidth: Integer read FWindowWidth write FWindowWidth;
323 property WindowMax: Boolean read FWindowMax write FWindowMax;
324 property ListStyle: TViewStyle read FListStyle write FListStyle;
326 property StdToolBarVisible: Boolean read FStdToolBarVisible write FStdToolBarVisible;
327 property AddressBarVisible: Boolean read FAddressBarVisible write FAddressBarVisible;
328 property LinkBarVisible: Boolean read FLinkBarVisible write FLinkBarVisible;
329 property ListToolBarVisible: Boolean read FListToolBarVisible write FListToolBarVisible;
330 property ListNameBarVisible: Boolean read FListNameBarVisible write FListNameBarVisible;
331 property BrowserToolBarVisible: Boolean read FBrowserToolBarVisible write FBrowserToolBarVisible;
332 property BrowserNameBarVisible: Boolean read FBrowserNameBarVisible write FBrowserNameBarVisible;
334 property BrowserTabVisible: Boolean read FBrowserTabVisible write FBrowserTabVisible;
335 property BrowserTabPosition: TGikoTabPosition read FBrowserTabPosition write FBrowserTabPosition;
336 property BrowserTabAppend: TGikoTabAppend read FBrowserTabAppend write FBrowserTabAppend;
337 property BrowserTabStyle: TGikoTabStyle read FBrowserTabStyle write FBrowserTabStyle;
339 property MessageBarVisible: Boolean read FMessageBarVisible write FMessageBarVisible;
340 property MessegeBarHeight: Integer read FMessegeBarHeight write FMessegeBarHeight;
342 property StatusBarVisible: Boolean read FStatusBarVisible write FStatusBarVisible;
344 property CabinetVisible: Boolean read FCabinetVisible write FCabinetVisible;
345 property CabinetWidth: Integer read FCabinetWidth write FCabinetWidth;
347 property ListOrientation: TGikoListOrientation read FListOrientation write FListOrientation;
348 property ListHeight: Integer read FListHeight write FListHeight;
349 property ListHeightState: TGikoListState read FListHeightState write FListHeightState;
350 property ListWidth: Integer read FListWidth write FListWidth;
351 property ListWidthState: TGikoListState read FListWidthState write FListWidthState;
352 // property ListHeightMax: Boolean read FListHeightMax write FListHeightMax;
353 // property ListWidthMax: Boolean read FListWidthMax write FListWidthMax;
355 property NameList: TStringList read FNameList write FNameList;
356 property MailList: TStringList read FMailList write FMailList;
357 property SelectTextList: TStringList read FSelectTextList write FSelectTextList;
359 property EditWindowTop: Integer read FEditWindowTop write FEditWindowTop;
360 property EditWindowLeft: Integer read FEditWindowLeft write FEditWindowLeft;
361 property EditWindowHeight: Integer read FEditWindowHeight write FEditWindowHeight;
362 property EditWindowWidth: Integer read FEditWindowWidth write FEditWindowWidth;
363 property EditWindowMax: Boolean read FEditWindowMax write FEditWindowMax;
365 property ListViewNo: Boolean read FListViewNo write FListViewNo;
366 property UseCSS: Boolean read FUseCSS write FUseCSS;
367 property CSSFileName: string read FCSSFileName write FCSSFileName;
369 property ShowMail: Boolean read FShowMail write FShowMail;
370 property UnActivePopup: Boolean read FUnActivePopup write FUnActivePopup;
371 property ResPopupHeaderBold: Boolean read FResPopupHeaderBold write FResPopupHeaderBold;
373 property LogFolder: string read FLogFolder write FLogFolder;
374 property NewLogFolder: string read FNewLogFolder write FNewLogFolder;
376 property BBSColumnWidth[index: Integer]: Integer read GetBBSColumnWidth write SetBBSColumnWidth;
377 property CategoryColumnWidth[index: Integer]: Integer read GetCategoryColumnWidth write SetCategoryColumnWidth;
378 property BoardColumnWidth[index: Integer]: Integer read GetBoardColumnWidth write SetBoardColumnWidth;
380 property SoundName[index: Integer]: string read GetSoundName;
381 property SoundViewName[index: Integer]: string read GetSoundViewName;
382 property SoundFileName[index: Integer]: string read GetSoundFileName write SetSoundFileName;
384 property BoardURL2ch: string read FBoardURL2ch write FBoardURL2ch;
386 property UserID: string read FUserID write FUserID;
387 property Password: string read FPassword write FPassword;
388 property AutoLogin: Boolean read FAutoLogin write FAutoLogin;
390 property URLApp: Boolean read FURLApp write FURLApp;
391 property URLAppFile: string read FURLAppFile write FURLAppFile;
393 property OpenMailer: Boolean read FOpenMailer write FOpenMailer;
395 property DeleteMsg: Boolean read FDeleteMsg write FDeleteMsg;
397 property MainCoolSet[Index: Integer]: TCoolSet read GetMainCoolSet write SetMainCoolSet;
398 property ListCoolSet[Index: Integer]: TCoolSet read GetBoardCoolSet write SetBoardCoolSet;
399 property BrowserCoolSet[Index: Integer]: TCoolSet read GetBrowserCoolSet write SetBrowserCoolSet;
401 property ListToolBarWrapable: Boolean read FListToolBarWrapable write FListToolBarWrapable;
402 property BrowserToolBarWrapable: Boolean read FBrowserToolBarWrapable write FBrowserToolBarWrapable;
404 property PopupPosition: TGikoPopupPosition read FPopupPosition write FPopupPosition;
406 property URLDisplay: Boolean read FURLDisplay write FURLDisplay;
407 property AddressBarTabStop: Boolean read FAddressBarTabStop write FAddressBarTabStop;
408 property LinkAddAddressBar: Boolean read FLinkAddAddressBar write FLinkAddAddressBar;
409 property AddressHistoryCount: Integer read FAddressHistoryCount write FAddressHistoryCount;
411 property PreviewVisible: Boolean read FPreviewVisible write FPreviewVisible;
412 property PreviewSize: TGikoPreviewSize read FPreviewSize write FPreviewSize;
413 property PreviewWait: Integer read FPreviewWait write FPreviewWait;
415 property ListIconVisible: Boolean read FListIconVisible write FListIconVisible;
417 property UseMachineTime: Boolean read FUseMachineTime write FUseMachineTime;
418 property TimeAdjustSec: Integer read FTimeAdjustSec write FTimeAdjustSec;
419 property TimeAdjust: Boolean read FTimeAdjust write FTimeAdjust;
433 INI_FILE_NAME: string = 'gikoNavi.ini';
434 DEFAULT_FONT_NAME: string = '
\82l
\82r
\82o
\83S
\83V
\83b
\83N';
435 DEFAULT_FONT_SIZE: Integer = 9;
436 DEFAULT_FONT_COLOR: string = 'clWindowText';
437 DEFAULT_WINDOW_COLOR: string = 'clWindow';
438 DEFAULT_TAB_FONT_NAME: string = '
\82l
\82r
\82o
\83S
\83V
\83b
\83N';
439 DEFAULT_TAB_FONT_SIZE: Integer = 9;
440 DEFAULT_2CH_BOARD_URL: string = 'http://www6.ocn.ne.jp/~mirv/2chmenu.html';
441 //'http://www.2ch.net/newbbsmenu.html';
442 GIKO_ENCRYPT_TEXT: string = 'gikoNaviEncryptText';
445 SOUND_NAME: array[0..4] of TSoundName = (
446 (Name: 'New'; ViewName: '
\8eæ
\93¾
\90¬
\8c÷'; FileName: ''),
447 (Name: 'NewDiff'; ViewName: '
\8eæ
\93¾
\90¬
\8c÷(
\8d·
\95ª)'; FileName: ''),
448 (Name: 'NoChange'; ViewName: '
\96¢
\8dX
\90V'; FileName: ''),
449 // (Name: 'RoundEnd'; ViewName: '
\8f\84\89ñ
\8fI
\97¹(
\8eæ
\93¾
\82 \82è)'; FileName: ''),
450 // (Name: 'RoundNone'; ViewName: '
\8f\84\89ñ
\8fI
\97¹(
\8eæ
\93¾
\82È
\82µ)'; FileName: ''),
451 (Name: 'ResEnd'; ViewName: '
\83\8c\83X
\91\97\90M
\8a®
\97¹'; FileName: ''),
452 (Name: 'Error'; ViewName: '
\83G
\83\89\81['; FileName: ''));
454 //
\83R
\83\93\83X
\83g
\83\89\83N
\83^
455 constructor TSetting.Create();
457 FNameList := TStringList.Create;
458 FMailList := TStringList.Create;
459 FSelectTextList := TStringList.Create;
461 FNameList.Duplicates := dupIgnore;
462 FMailList.Duplicates := dupIgnore;
463 FSelectTextList.Duplicates := dupIgnore;
467 //
\83f
\83X
\83g
\83\89\83N
\83^
468 destructor TSetting.Destroy();
471 FSelectTextList.Free;
476 //
\8f\89\8aú
\89»
\83t
\83@
\83C
\83\8b\96¼
\8eæ
\93¾
\81i
\83p
\83X
\81{
\83t
\83@
\83C
\83\8b\96¼
\81j
477 function TSetting.GetFileName(): string;
479 Result := ExtractFilePath(Application.ExeName) + INI_FILE_NAME;
482 //
\90Ý
\92è
\83t
\83@
\83C
\83\8b\93Ç
\8d\9e
483 procedure TSetting.ReadSettingFile();
485 DEFAULT_BBS_WIDTH: array[0..0] of Integer = (140);
486 DEFAULT_CATEGORY_WIDTH: array[0..2] of Integer = (150, 80, 130);
487 DEFAULT_BOARD_WIDTH: array[0..6] of Integer = (350, 60, 60, 60, 60, 80, 130);
498 Exists := FileExists(GetFileName);
499 ini := TMemIniFile.Create(GetFileName);
501 //
\8eó
\90M
\83o
\83b
\83t
\83@
\83T
\83C
\83Y
502 FRecvBufferSize := ini.ReadInteger('HTTP', 'RecvBufferSize', 4096);
504 FProtocol := ini.ReadBool('HTTP', 'Protocol', True);
505 //
\83v
\83\8d\83L
\83V
\90Ú
\91±HTTP1.1
\8eg
\97p
506 FProxyProtocol := ini.ReadBool('HTTP', 'ProxyProtocol', False);
508 FReadProxy := ini.ReadBool('ReadProxy', 'Proxy', false);
509 FReadProxyAddress := ini.ReadString('ReadProxy', 'Address', '');
510 FReadProxyPort := ini.ReadInteger('ReadProxy', 'Port', 0);
511 FReadProxyUserID := ini.ReadString('ReadProxy', 'UserID', '');
512 FReadProxyPassword := ini.ReadString('ReadProxy', 'Password', '');
514 FWriteProxy := ini.ReadBool('WriteProxy', 'Proxy', false);
515 FWriteProxyAddress := ini.ReadString('WriteProxy', 'Address', '');
516 FWriteProxyPort := ini.ReadInteger('WriteProxy', 'Port', 0);
517 FWriteProxyUserID := ini.ReadString('WriteProxy', 'UserID', '');
518 FWriteProxyPassword := ini.ReadString('WriteProxy', 'Password', '');
520 FCabinetFontName := ini.ReadString('Window', 'CabinetFontName', DEFAULT_FONT_NAME);
521 FCabinetFontSize := ini.ReadInteger('Window', 'CabinetFontSize', DEFAULT_FONT_SIZE);
522 FCabinetFontBold := ini.ReadBool('Window', 'CabinetFontBold', False);
523 FCabinetFontItalic := ini.ReadBool('Window', 'CabinetFontItalic', False);
524 FCabinetFontColor := StringToColor(ini.ReadString('Window', 'CabinetFontColor', DEFAULT_FONT_COLOR));
525 FCabinetBackColor := StringToColor(ini.ReadString('Window', 'CabinetBackColor', DEFAULT_WINDOW_COLOR));
527 FListFontName := ini.ReadString('Window', 'ListFontName', DEFAULT_FONT_NAME);
528 FListFontSize := ini.ReadInteger('Window', 'ListFontSize', DEFAULT_FONT_SIZE);
529 FListFontBold := ini.ReadBool('Window', 'ListFontBold', False);
530 FListFontItalic := ini.ReadBool('Window', 'ListFontItalic', False);
531 FListFontColor := StringToColor(ini.ReadString('Window', 'ListFontColor', DEFAULT_FONT_COLOR));
532 FListBackColor := StringToColor(ini.ReadString('Window', 'ListBackColor', DEFAULT_WINDOW_COLOR));
534 FEditorFontName := ini.ReadString('Window', 'EditorFontName', DEFAULT_FONT_NAME);
535 FEditorFontSize := ini.ReadInteger('Window', 'EditorFontSize', DEFAULT_FONT_SIZE);
536 FEditorFontBold := ini.ReadBool('Window', 'EditorFontBold', False);
537 FEditorFontItalic := ini.ReadBool('Window', 'EditorFontItalic', False);
538 FEditorFontColor := StringToColor(ini.ReadString('Window', 'EditorFontColor', DEFAULT_FONT_COLOR));
539 FEditorBackColor := StringToColor(ini.ReadString('Window', 'EditorBackColor', DEFAULT_WINDOW_COLOR));
541 FBrowserTabFontName := ini.ReadString('Window', 'BrowserTabFontName', DEFAULT_TAB_FONT_NAME);
542 FBrowserTabFontSize := ini.ReadInteger('Window', 'BrowserTabFontSize', DEFAULT_TAB_FONT_SIZE);
543 FBrowserTabFontBold := ini.ReadBool('Window', 'BrowserTabFontBold', False);
544 FBrowserTabFontItalic := ini.ReadBool('Window', 'BrowserTabFontItalic', False);
546 FHintFontName := ini.ReadString('Window', 'HintFontName', Screen.HintFont.Name);
547 FHintFontSize := ini.ReadInteger('Window', 'HintFontSize', Screen.HintFont.Size);
548 //FHintFontBold := ini.ReadBool('Window', 'HintFontBold', False);
549 //FHintFontItalic := ini.ReadBool('Window', 'HintFontItalic', False);
550 FHintFontColor := StringToColor(ini.ReadString('Window', 'HintFontColor', DEFAULT_FONT_COLOR));
551 FHintBackColor := StringToColor(ini.ReadString('Window', 'HintBackColor', 'clInfoBk'));
553 FWindowTop := ini.ReadInteger('WindowSize', 'Top', -1);
554 FWindowLeft := ini.ReadInteger('WindowSize', 'Left', -1);
555 FWindowHeight := ini.ReadInteger('WindowSize', 'Height', -1);
556 FWindowWidth := ini.ReadInteger('WindowSize', 'Width', -1);
557 FWindowMax := ini.ReadBool('WindowSize', 'Max', false);
559 if FWindowHeight <= 0 then FWindowHeight := 400;
560 if FWindowWidth <= 0 then FWindowWidth := 600;
562 FListStyle := TViewStyle(ini.ReadInteger('ViewStyle', 'ListView', Ord(vsReport)));
564 FEditWindowTop := ini.ReadInteger('EditorWindowSize', 'Top', -1);
565 FEditWindowLeft := ini.ReadInteger('EditorWindowSize', 'Left', -1);
566 FEditWindowHeight := ini.ReadInteger('EditorWindowSize', 'Height', -1);
567 FEditWindowWidth := ini.ReadInteger('EditorWindowSize', 'Width', -1);
568 FEditWindowMax := ini.ReadBool('EditorWindowSize', 'Max', False);
570 //
\83c
\81[
\83\8b\83o
\81[
571 FStdToolBarVisible := ini.ReadBool('ToolBar', 'StdVisible', True);
572 FAddressBarVisible := ini.ReadBool('ToolBar', 'AddressVisible', True);
573 FLinkBarVisible := ini.ReadBool('ToolBar', 'LinkVisible', True);
574 FListToolBarVisible := ini.ReadBool('ToolBar', 'ListVisible', True);
575 FListNameBarVisible := ini.ReadBool('ToolBar', 'ListNameVisible', True);
576 FBrowserToolBarVisible := ini.ReadBool('ToolBar', 'BrowserVisible', True);
577 FBrowserNameBarVisible := ini.ReadBool('ToolBar', 'BrowserNameVisible', True);
578 //
\83c
\81[
\83\8b\83o
\81[Wrapable
579 FListToolBarWrapable := ini.ReadBool('ToolBar', 'ListWrapable', False);
580 FBrowserToolBarWrapable := ini.ReadBool('ToolBar', 'BrowserWrapable', False);
582 FBrowserTabVisible := ini.ReadBool('Tab', 'BrowserTabVisible', True);
583 FBrowserTabPosition := TGikoTabPosition(ini.ReadInteger('Tab', 'BrowserTabPosition', Ord(gtpTop)));
584 FBrowserTabAppend := TGikoTabAppend(ini.ReadInteger('Tab', 'BrowserTabAppend', Ord(gtaFirst)));
585 FBrowserTabStyle := TGikoTabStyle(ini.ReadInteger('Tab', 'BrowserTabStyle', Ord(gtsFlat)));
587 FMessageBarVisible := ini.ReadBool('MessageBar', 'Visible', True);
588 FMessegeBarHeight := ini.ReadInteger('MessageBar', 'Height', 30);
590 FStatusBarVisible := ini.ReadBool('StatusBar', 'Visible', True);
592 FCabinetVisible := ini.ReadBool('Cabinet', 'Visible', True);
593 FCabinetWidth := ini.ReadInteger('Cabinet', 'Width', 200);
595 FListOrientation := TGikoListOrientation(ini.ReadInteger('List', 'Orientation', Ord(gloHorizontal)));
596 FListHeight := ini.ReadInteger('List', 'Height', 180);
597 FListHeightState := TGikoListState(ini.ReadInteger('List', 'HeightState', Ord(glsNormal)));
598 FListWidth := ini.ReadInteger('List', 'Width', 180);
599 FListWidthState := TGikoListState(ini.ReadInteger('List', 'WidthState', Ord(glsNormal)));
600 // FListHeightMax := ini.ReadBool('List', 'HeightMax', False);
601 // FListWidthMax := ini.ReadBool('List', 'WidthMax', False);
603 wkList := TStringList.Create;
605 ini.ReadSection('Name', wkList);
606 for i := 0 to wkList.Count - 1 do begin
607 wkStr := ini.ReadString('Name', wkList[i], '');
608 if (wkStr <> '') and (FNameList.IndexOf(wkStr) = -1) then
609 FNameList.Add(wkStr);
611 ini.ReadSection('Mail', wkList);
612 for i := 0 to wkList.Count - 1 do begin
613 wkStr := ini.ReadString('Mail', wkList[i], '');
614 if (wkStr <> '') and (FMailList.IndexOf(wkStr) = -1) then
615 FMailList.Add(wkStr);
617 ini.ReadSection('SelectText', wkList);
618 for i := 0 to wkList.Count - 1 do begin
619 wkStr := ini.ReadString('SelectText', wkList[i], '');
620 if (wkStr <> '') and (FSelectTextList.IndexOf(wkStr) = -1) then
621 FSelectTextList.Add(wkStr);
627 //
\83\8a\83X
\83g
\83J
\83\89\83\80
628 wkList := TStringList.Create;
630 ini.ReadSection('BBSColumnWidth', wkList);
631 if Length(FBBSColumnWidth) <> wkList.Count then begin
632 ini.EraseSection('BBSColumnWidth');
634 for i := 0 to Length(FBBSColumnWidth) - 1 do begin
635 BBSColumnWidth[i] := ini.ReadInteger('BBSColumnWidth', 'ID' + IntToStr(i), DEFAULT_BBS_WIDTH[i]);
637 ini.ReadSection('CategoryColumnWidth', wkList);
638 if Length(FCategoryColumnWidth) <> wkList.Count then begin
639 ini.EraseSection('CategoryColumnWidth');
641 for i := 0 to Length(FCategoryColumnWidth) - 1 do begin
642 CategoryColumnWidth[i] := ini.ReadInteger('CategoryColumnWidth', 'ID' + IntToStr(i), DEFAULT_CATEGORY_WIDTH[i]);
644 ini.ReadSection('BoardColumnWidth', wkList);
645 if Length(FBoardColumnWidth) <> wkList.Count then begin
646 ini.EraseSection('BoardColumnWidth');
648 for i := 0 to Length(FBoardColumnWidth) - 1 do begin
649 BoardColumnWidth[i] := ini.ReadInteger('BoardColumnWidth', 'ID' + IntToStr(i), DEFAULT_BOARD_WIDTH[i]);
656 //
\83\8a\83X
\83g
\94Ô
\8d\86
657 FListViewNo := ini.ReadBool('Function', 'ListViewNo', True);
659 FUseCSS := ini.ReadBool('CSS', 'UseCSS', True);
660 //CSS
\83t
\83@
\83C
\83\8b\96¼
661 FCSSFileName := ini.ReadString('CSS', 'FileName', 'default.css');
664 FShowMail := ini.ReadBool('Thread', 'ShowMail', True);
665 //
\94ñ
\83A
\83N
\83e
\83B
\83u
\8e\9e\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\95\
\8e¦
666 FUnActivePopup := ini.ReadBool('Thread', 'UnActivePopup', False);
667 //
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\83w
\83b
\83_
\81[
\83{
\81[
\83\8b\83h
668 FResPopupHeaderBold := ini.ReadBool('Thread', 'ResPopupHeaderBold', True);
671 FDeleteMsg := ini.ReadBool('Function', 'LogDeleteMessage', True);
673 //
\83\8d\83O
\83t
\83H
\83\8b\83_
674 FLogFolder := ini.ReadString('Folder', 'LogFolder', ExtractFilePath(Application.ExeName) + 'Log');
678 FBoardURL2ch := ini.ReadString('BoardURL', '2ch', DEFAULT_2CH_BOARD_URL);
680 //
\94F
\8fØ
\97p
\83\86\81[
\83UID
\81E
\83p
\83X
\83\8f\81[
\83h
681 FUserID := ini.ReadString('Attestation', 'UserID', '');
682 FPassword := Decrypt(ini.ReadString('Attestation', 'Password', ''));
683 FAutoLogin := ini.ReadBool('Attestation', 'AutoLogin', False);
685 //URL
\83N
\83\8a\83b
\83N
\8e\9e\8bN
\93®
\83A
\83v
\83\8a
686 FURLApp := ini.ReadBool('URLApp', 'Select', False);
687 FURLAppFile := ini.ReadString('URLApp', 'File', '');
689 //mailto
\83N
\83\8a\83b
\83N
\8e\9e\93®
\8dì
690 FOpenMailer := ini.ReadBool('Mailto', 'Open', True);
692 //
\83|
\83b
\83v
\83A
\83b
\83v
\88Ê
\92u
693 FPopupPosition := TGikoPopupPosition(ini.ReadInteger('Browser', 'PopupPosition', Ord(gppLeftBottom)));
695 //
\83A
\83h
\83\8c\83X
\83o
\81[
696 FURLDisplay := ini.ReadBool('AddressBar', 'URLDisplay', False);
697 FAddressBarTabStop := ini.ReadBool('AddressBar', 'TabStop', True);
698 FLinkAddAddressBar := ini.ReadBool('AddressBar', 'LinkAdd', False);
699 FAddressHistoryCount := ini.ReadInteger('AddressBar', 'HistoryCount', 100);
701 //
\89æ
\91\9c\83v
\83\8c\83r
\83\85\81[
702 FPreviewVisible := ini.ReadBool('Browser', 'PreviewVisible', True);
703 FPreviewSize := TGikoPreviewSize(ini.ReadInteger('Browser', 'PreviewSize', Ord(gpsMedium)));
704 FPreviewWait := ini.ReadInteger('Browser', 'PreviewWait', 500);
706 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\8dX
\90V
\83A
\83C
\83R
\83\93
707 FListIconVisible := ini.ReadBool('ThreadList', 'StateIconVisible', True);
709 //
\8f\91\82«
\8d\9e\82Ý
\8e\9e\83}
\83V
\83\93\8e\9e\8d\8f\8eg
\97p
\90Ý
\92è
710 FUseMachineTime := ini.ReadBool('PostTime', 'UseMachineTime', False);
711 FTimeAdjustSec := ini.ReadInteger('PostTime', 'TimeAdjustSec', 0);
712 FTimeAdjust := ini.ReadBool('PostTime', 'TimeAdjust', True);
716 for i := 0 to GetSoundCount - 1 do begin
717 SoundFileName[i] := ini.ReadString('Sound', SoundName[i], '');
718 if not FileExists(SoundFileName[i]) then
719 SoundFileName[i] := '';
722 s := ExtractFileDir(Application.ExeName) + '\sound\';
723 SoundFileName[0] := s + '
\8eæ
\93¾
\90¬
\8c÷.wav';
724 SoundFileName[1] := s + '
\8eæ
\93¾
\90¬
\8c÷(
\8d·
\95ª).wav';
725 SoundFileName[2] := s + '
\96¢
\8dX
\90V.wav';
726 SoundFileName[3] := '';
727 SoundFileName[4] := s + '
\83G
\83\89\81[.wav';
730 //
\83N
\81[
\83\8b\83o
\81[
731 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
732 CoolSet.FCoolID := ini.ReadInteger('MainCoolBar', 'ID' + IntToStr(i), -1);
733 CoolSet.FCoolWidth := ini.ReadInteger('MainCoolBar', 'Width' + IntToStr(i), -1);
734 CoolSet.FCoolBreak := ini.ReadBool('MainCoolBar', 'Break' + IntToStr(i), False);
735 MainCoolSet[i] := CoolSet;
737 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
738 CoolSet.FCoolID := ini.ReadInteger('ListCoolBar', 'ID' + IntToStr(i), -1);
739 CoolSet.FCoolWidth := ini.ReadInteger('ListCoolBar', 'Width' + IntToStr(i), -1);
740 CoolSet.FCoolBreak := ini.ReadBool('ListCoolBar', 'Break' + IntToStr(i), False);
741 ListCoolSet[i] := CoolSet;
743 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
744 CoolSet.FCoolID := ini.ReadInteger('BrowserCoolBar', 'ID' + IntToStr(i), -1);
745 CoolSet.FCoolWidth := ini.ReadInteger('BrowserCoolBar', 'Width' + IntToStr(i), -1);
746 CoolSet.FCoolBreak := ini.ReadBool('BrowserCoolBar', 'Break' + IntToStr(i), False);
747 BrowserCoolSet[i] := CoolSet;
754 //
\90Ý
\92è
\83t
\83@
\83C
\83\8b\95Û
\91¶(system)
755 procedure TSetting.WriteSystemSettingFile();
759 ini := TMemIniFile.Create(GetFileName());
761 //
\8eó
\90M
\83o
\83b
\83t
\83@
\83T
\83C
\83Y
762 ini.WriteInteger('HTTP', 'RecvBufferSize', FRecvBufferSize);
764 ini.WriteBool('HTTP', 'Protocol', FProtocol);
765 //
\83v
\83\8d\83L
\83V
\90Ú
\91±HTTP1.1
\8eg
\97p
766 ini.WriteBool('HTTP', 'ProxyProtocol', FProxyProtocol);
768 ini.WriteBool('ReadProxy', 'Proxy', FReadProxy);
769 ini.WriteString('ReadProxy', 'Address', FReadProxyAddress);
770 ini.WriteInteger('ReadProxy', 'Port', FReadProxyPort);
771 ini.WriteString('ReadProxy', 'UserID', FReadProxyUserID);
772 ini.WriteString('ReadProxy', 'Password', FReadProxyPassword);
774 ini.WriteBool('WriteProxy', 'Proxy', FWriteProxy);
775 ini.WriteString('WriteProxy', 'Address', FWriteProxyAddress);
776 ini.WriteInteger('WriteProxy', 'Port', FWriteProxyPort);
777 ini.WriteString('WriteProxy', 'UserID', FWriteProxyUserID);
778 ini.WriteString('WriteProxy', 'Password', FWriteProxyPassword);
780 ini.WriteString('Window', 'CabinetFontName', FCabinetFontName);
781 ini.WriteInteger('Window', 'CabinetFontSize', FCabinetFontSize);
782 ini.WriteString('Window', 'CabinetFontColor', ColorToString(FCabinetFontColor));
783 ini.WriteString('Window', 'CabinetBackColor', ColorToString(FCabinetBackColor));
785 ini.WriteString('Window', 'ListFontName', FListFontName);
786 ini.WriteInteger('Window', 'ListFontSize', FListFontSize);
787 ini.WriteString('Window', 'ListFontColor', ColorToString(FListFontColor));
788 ini.WriteString('Window', 'ListBackColor', ColorToString(FListBackColor));
790 ini.WriteString('Window', 'EditorFontName', FEditorFontName);
791 ini.WriteInteger('Window', 'EditorFontSize', FEditorFontSize);
792 ini.WriteString('Window', 'EditorFontColor', ColorToString(FEditorFontColor));
793 ini.WriteString('Window', 'EditorBackColor', ColorToString(FEditorBackColor));
795 ini.WriteString('Window', 'BrowserTabFontName', FBrowserTabFontName);
796 ini.WriteInteger('Window', 'BrowserTabFontSize', FBrowserTabFontSize);
797 ini.WriteBool('Window', 'BrowserTabFontBold', FBrowserTabFontBold);
798 ini.WriteBool('Window', 'BrowserTabFontItalic', FBrowserTabFontItalic);
800 ini.WriteString('Window', 'HintFontName', FHintFontName);
801 ini.WriteInteger('Window', 'HintFontSize', FHintFontSize);
802 ini.WriteString('Window', 'HintFontColor', ColorToString(FHintFontColor));
803 ini.WriteString('Window', 'HintBackColor', ColorToString(FHintBackColor));
811 //
\90Ý
\92è
\83t
\83@
\83C
\83\8b\95Û
\91¶(window)
812 procedure TSetting.WriteWindowSettingFile();
818 ini := TMemIniFile.Create(GetFileName());
820 ini.WriteInteger('WindowSize', 'Top', WindowTop);
821 ini.WriteInteger('WindowSize', 'Left', WindowLeft);
822 ini.WriteInteger('WindowSize', 'Height', WindowHeight);
823 ini.WriteInteger('WindowSize', 'Width', WindowWidth);
824 ini.WriteBool('WindowSize', 'Max', WindowMax);
826 ini.WriteInteger('ViewStyle', 'ListView', Ord(ListStyle));
828 ini.WriteInteger('EditorWindowSize', 'Top', EditWindowTop);
829 ini.WriteInteger('EditorWindowSize', 'Left', EditWindowLeft);
830 ini.WriteInteger('EditorWindowSize', 'Height', EditWindowHeight);
831 ini.WriteInteger('EditorWindowSize', 'Width', EditWindowWidth);
832 ini.WriteBool('EditorWindowSize', 'Max', EditWindowMax);
834 //
\83c
\81[
\83\8b\83o
\81[
835 ini.WriteBool('ToolBar', 'StdVisible', FStdToolBarVisible);
836 ini.WriteBool('ToolBar', 'AddressVisible', FAddressBarVisible);
837 ini.WriteBool('ToolBar', 'LinkVisible', FLinkBarVisible);
838 ini.WriteBool('ToolBar', 'ListVisible', FListToolBarVisible);
839 ini.WriteBool('ToolBar', 'ListNameVisible', FListNameBarVisible);
840 ini.WriteBool('ToolBar', 'BrowserVisible', FBrowserToolBarVisible);
841 ini.WriteBool('ToolBar', 'BrowserNameVisible', FBrowserNameBarVisible);
842 //
\83c
\81[
\83\8b\83o
\81[Wrapable
843 ini.WriteBool('ToolBar', 'ListWrapable', FListToolBarWrapable);
844 ini.WriteBool('ToolBar', 'BrowserWrapable', FBrowserToolBarWrapable);
847 ini.WriteBool('Tab', 'BrowserTabVisible', FBrowserTabVisible);
848 ini.WriteInteger('Tab', 'BrowserTabPosition', Ord(FBrowserTabPosition));
849 ini.WriteInteger('Tab', 'BrowserTabAppend', Ord(FBrowserTabAppend));
850 ini.WriteInteger('Tab', 'BrowserTabStyle', Ord(FBrowserTabStyle));
852 //
\83\81\83b
\83Z
\81[
\83W
\83o
\81[
853 ini.WriteBool('MessageBar', 'Visible', FMessageBarVisible);
854 ini.WriteInteger('MessageBar', 'Height', FMessegeBarHeight);
856 //
\83X
\83e
\81[
\83^
\83X
\83o
\81[
857 ini.WriteBool('StatusBar', 'Visible', FStatusBarVisible);
859 //
\83L
\83\83\83r
\83l
\83b
\83g
860 ini.WriteBool('Cabinet', 'Visible', FCabinetVisible);
861 ini.WriteInteger('Cabinet', 'Width', FCabinetWidth);
863 //
\83\8a\83X
\83g
\82Ì
\83T
\83C
\83Y
\82Æ
\90\82\92¼
\90\85\95½
864 ini.WriteInteger('List', 'Orientation', Ord(FListOrientation));
865 ini.WriteInteger('List', 'Height', FListHeight);
866 ini.WriteInteger('List', 'HeightState', Ord(FListHeightState));
867 ini.WriteInteger('List', 'Width', FListWidth);
868 ini.WriteInteger('List', 'WidthState', Ord(FListWidthState));
869 // ini.WriteBool('List', 'HeightMax', FListHeightMax);
870 // ini.WriteBool('List', 'WidthMax', FListWidthMax);
873 // ini.WriteInteger('Window', 'BrowserFontSize', BrowserFontSize);
875 //
\83\8a\83X
\83g
\94Ô
\8d\86\95\
\8e¦
876 ini.WriteBool('Function', 'ListViewNo', FListViewNo);
878 ini.WriteBool('CSS', 'UseCSS', FUseCSS);
879 //CSS
\83t
\83@
\83C
\83\8b\96¼
880 ini.WriteString('CSS', 'FileName', FCSSFileName);
882 ini.WriteBool('Thread', 'ShowMail', FShowMail);
883 //
\83\8d\83O
\8dí
\8f\9c\8am
\94F
884 ini.WriteBool('Function', 'LogDeleteMessage', FDeleteMsg);
885 //
\94ñ
\83A
\83N
\83e
\83B
\83u
\8e\9e\83|
\83b
\83v
\83A
\83b
\83v
\95\
\8e¦
886 ini.WriteBool('Thread', 'UnActivePopup', FUnActivePopup);
887 //
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\83w
\83b
\83_
\81[
\83{
\81[
\83\8b\83h
888 ini.WriteBool('Thread', 'ResPopupHeaderBold', FResPopupHeaderBold);
890 ini.WriteString('BoardURL', '2ch', FBoardURL2ch);
892 //
\94F
\8fØ
\97p
\83\86\81[
\83UID
\81E
\83p
\83X
\83\8f\81[
\83h
893 ini.WriteString('Attestation', 'UserID', FUserID);
894 ini.WriteString('Attestation', 'Password', Encrypt(FPassword));
895 ini.WriteBool('Attestation', 'AutoLogin', FAutoLogin);
897 //URL
\83N
\83\8a\83b
\83N
\8e\9e\8bN
\93®
\83A
\83v
\83\8a
898 ini.WriteBool('URLApp', 'Select', FURLApp);
899 ini.WriteString('URLApp', 'File', FURLAppFile);
901 //mailto
\83N
\83\8a\83b
\83N
\8e\9e\93®
\8dì
902 ini.WriteBool('Mailto', 'Open', FOpenMailer);
904 //
\83|
\83b
\83v
\83A
\83b
\83v
\88Ê
\92u
905 ini.WriteInteger('Browser', 'PopupPosition', Ord(FPopupPosition));
907 //
\83A
\83h
\83\8c\83X
\83o
\81[
908 ini.WriteBool('AddressBar', 'URLDisplay', FURLDisplay);
909 ini.WriteBool('AddressBar', 'TabStop', FAddressBarTabStop);
910 ini.WriteBool('AddressBar', 'LinkAdd', FLinkAddAddressBar);
911 ini.WriteInteger('AddressBar', 'HistoryCount', FAddressHistoryCount);
913 //
\89æ
\91\9c\83v
\83\8c\83r
\83\85\81[
914 ini.WriteBool('Browser', 'PreviewVisible', FPreviewVisible);
915 ini.WriteInteger('Browser', 'PreviewSize', Ord(FPreviewSize));
916 ini.WriteInteger('Browser', 'PreviewWait', FPreviewWait);
918 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\8dX
\90V
\83A
\83C
\83R
\83\93
919 ini.WriteBool('ThreadList', 'StateIconVisible', FListIconVisible);
921 //
\8f\91\82«
\8d\9e\82Ý
\8e\9e\83}
\83V
\83\93\8e\9e\8d\8f\8eg
\97p
\90Ý
\92è
922 ini.WriteBool('PostTime', 'UseMachineTime', FUseMachineTime);
923 ini.WriteInteger('PostTime', 'TimeAdjustSec', FTimeAdjustSec);
924 ini.WriteBool('PostTime', 'TimeAdjust', FTimeAdjust);
926 //
\83\8a\83X
\83g
\83J
\83\89\83\80
927 for i := 0 to Length(FBBSColumnWidth) - 1 do begin
928 ini.WriteInteger('BBSColumnWidth', 'ID' + IntToStr(i), FBBSColumnWidth[i]);
930 for i := 0 to Length(FCategoryColumnWidth) - 1 do begin
931 ini.WriteInteger('CategoryColumnWidth', 'ID' + IntToStr(i), FCategoryColumnWidth[i]);
933 for i := 0 to Length(FBoardColumnWidth) - 1 do begin
934 ini.WriteInteger('BoardColumnWidth', 'ID' + IntToStr(i), FBoardColumnWidth[i]);
938 for i := 0 to GetSoundCount - 1 do begin
939 if not FileExists(SoundFileName[i]) then
940 SoundFileName[i] := '';
941 ini.WriteString('Sound', SoundName[i], SoundFileName[i]);
945 ini.EraseSection('MainCoolBar');
946 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
947 CoolSet := MainCoolSet[i];
948 ini.WriteInteger('MainCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
949 ini.WriteInteger('MainCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
950 ini.WriteBool('MainCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
952 ini.EraseSection('ListCoolBar');
953 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
954 CoolSet := ListCoolSet[i];
955 ini.WriteInteger('ListCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
956 ini.WriteInteger('ListCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
957 ini.WriteBool('ListCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
959 ini.EraseSection('BrowserCoolBar');
960 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
961 CoolSet := BrowserCoolSet[i];
962 ini.WriteInteger('BrowserCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
963 ini.WriteInteger('BrowserCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
964 ini.WriteBool('BrowserCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
973 //
\90Ý
\92è
\83t
\83@
\83C
\83\8b\95Û
\91¶(name & mail)
974 procedure TSetting.WriteNameMailSettingFile();
979 ini := TMemIniFile.Create(GetFileName());
981 ini.EraseSection('Name');
982 ini.EraseSection('Mail');
983 ini.EraseSection('SelectText');
984 for i := 0 to FNameList.Count - 1 do begin
985 ini.WriteString('Name', Format('%.2d', [i + 1]), FNameList[i]);
989 for i := 0 to FMailList.Count - 1 do begin
990 ini.WriteString('Mail', Format('%.2d', [i + 1]), FMailList[i]);
994 for i := 0 to FSelectTextList.Count - 1 do begin
995 ini.WriteString('SelectText', Format('%.2d', [i + 1]), FSelectTextList[i]);
1005 procedure TSetting.WriteFolderSettingFile();
1009 ini := TMemIniFile.Create(GetFileName());
1011 if ExtractFilePath(Application.ExeName) + 'Log' = NewLogFolder then
1012 ini.DeleteKey('Folder', 'LogFolder')
1014 ini.WriteString('Folder', 'LogFolder', NewLogFolder);
1021 //
\83\8a\83X
\83g
\83J
\83\89\83\80\83w
\83b
\83_
\81[
1022 function TSetting.GetBBSColumnWidth(index: Integer): Integer;
1024 Result := IfThen(index in [0..Length(FBBSColumnWidth) - 1], FBBSColumnWidth[index], 0);
1027 function TSetting.GetCategoryColumnWidth(index: Integer): Integer;
1029 Result := IfThen(index in [0..Length(FCategoryColumnWidth) - 1], FCategoryColumnWidth[index], 0);
1032 function TSetting.GetBoardColumnWidth(index: Integer): Integer;
1034 Result := IfThen(index in [0..Length(FBoardColumnWidth) - 1], FBoardColumnWidth[index], 0);
1037 procedure TSetting.SetBBSColumnWidth(index: Integer; value: Integer);
1039 if index in [0..Length(FBBSColumnWidth) - 1] then
1040 FBBSColumnWidth[index] := value;
1043 procedure TSetting.SetCategoryColumnWidth(index: Integer; value: Integer);
1045 if index in [0..Length(FCategoryColumnWidth) - 1] then
1046 FCategoryColumnWidth[index] := value;
1049 procedure TSetting.SetBoardColumnWidth(index: Integer; value: Integer);
1051 if index in [0..Length(FBoardColumnWidth) - 1] then
1052 FBoardColumnWidth[index] := value;
1055 function TSetting.GetSoundCount: Integer;
1057 Result := Length(SOUND_NAME);
1060 function TSetting.GetSoundName(Index: Integer): string;
1062 if (Index < GetSoundCount) and (Index >= 0) then
1063 Result := SOUND_NAME[Index].Name
1068 function TSetting.GetSoundViewName(Index: Integer): string;
1070 if (Index < GetSoundCount) and (Index >= 0) then
1071 Result := SOUND_NAME[Index].ViewName
1076 function TSetting.GetSoundFileName(Index: Integer): string;
1078 if (Index < GetSoundCount) and (Index >= 0) then
1079 Result := SOUND_NAME[Index].FileName
1084 procedure TSetting.SetSoundFileName(Index: Integer; value: string);
1086 if (Index < GetSoundCount) and (Index >= 0) then
1087 SOUND_NAME[Index].FileName := value;
1090 function TSetting.FindSoundFileName(Name: string): string;
1094 for i := 0 to GetSoundCount - 1 do begin
1095 if SoundName[i] = Name then begin
1096 Result := SoundFileName[i];
1103 function TSetting.Encrypt(s: string): string;
1105 cryptObj: THogeCryptAuto;
1106 inputStream, outputStream: TStringStream;
1108 inputStream := TStringStream.Create(s);
1109 outputStream := TStringStream.Create('');
1110 cryptObj := THogeCryptAuto.Create;
1113 cryptObj.Encrypt(inputStream, GIKO_ENCRYPT_TEXT, outputStream);
1115 //
\83o
\83C
\83i
\83\8a\82È
\82Ì
\82Å
\95K
\97v
\82É
\89\9e\82¶
\82Ä
\83e
\83L
\83X
\83g
\82É
\95Ï
\8a·
1116 Result := HogeBase64Encode(outputStream.DataString);
1124 function TSetting.Decrypt(s: string): string;
1126 cryptObj: THogeCryptAuto;
1127 inputStream, outputStream: TStringStream;
1130 inputStream := TStringStream.Create(HogeBase64Decode(s));
1135 outputStream := TStringStream.Create('');
1136 cryptObj := THogeCryptAuto.Create;
1139 cryptObj.Decrypt(inputStream, GIKO_ENCRYPT_TEXT, outputStream);
1140 Result := outputStream.DataString;
1148 function TSetting.GetMainCoolSet(Index: Integer): TCoolSet;
1150 if Index in [0..MAIN_COOLBAND_COUNT - 1] then
1151 Result := FMainCoolBar[Index]
1153 Result.FCoolID := -1;
1154 Result.FCoolWidth := -1;
1155 Result.FCoolBreak := False;
1159 function TSetting.GetBoardCoolSet(Index: Integer): TCoolSet;
1161 if Index in [0..LIST_COOLBAND_COUNT - 1] then
1162 Result := FListCoolBar[Index]
1164 Result.FCoolID := -1;
1165 Result.FCoolWidth := -1;
1166 Result.FCoolBreak := False;
1170 function TSetting.GetBrowserCoolSet(Index: Integer): TCoolSet;
1172 if Index in [0..BROWSER_COOLBAND_COUNT - 1] then
1173 Result := FBrowserCoolBar[Index]
1175 Result.FCoolID := -1;
1176 Result.FCoolWidth := -1;
1177 Result.FCoolBreak := False;
1181 procedure TSetting.SetMainCoolSet(Index: Integer; CoolSet: TCoolSet);
1183 if Index in [0..MAIN_COOLBAND_COUNT - 1] then
1184 FMainCoolBar[Index] := CoolSet;
1187 procedure TSetting.SetBoardCoolSet(Index: Integer; CoolSet: TCoolSet);
1189 if Index in [0..LIST_COOLBAND_COUNT - 1] then
1190 FListCoolBar[Index] := CoolSet;
1193 procedure TSetting.SetBrowserCoolSet(Index: Integer; CoolSet: TCoolSet);
1195 if Index in [0..BROWSER_COOLBAND_COUNT - 1] then
1196 FBrowserCoolBar[Index] := CoolSet;