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|
\83b
\83v
\83A
\83b
\83v
\95\
\8e¦
164 FUnActivePopup: Boolean;
166 //
\83\8d\83O
\83t
\83H
\83\8b\83_
168 FNewLogFolder: string;
170 //
\83\8a\83X
\83g
\83J
\83\89\83\80\83w
\83b
\83_
\81[
\83T
\83C
\83Y
171 FBBSColumnWidth: array[0..0] of Integer;
172 FCategoryColumnWidth: array[0..3] of Integer;
173 FBoardColumnWidth: array[0..6] of Integer;
175 //
\8di
\8d\9e\82Ý
\95¶
\8e\9a\97ñ
176 FSelectTextList: TStringList;
179 FBoardURL2ch: string;
181 //
\83\86\81[
\83UID
\81E
\83p
\83X
\83\8f\81[
\83h
186 //URL
\83N
\83\8a\83b
\83N
\8e\9e\8bN
\93®
\83A
\83v
\83\8a
190 //mailto
\83N
\83\8a\83b
\83N
\8e\9e\93®
\8dì
191 FOpenMailer: Boolean;
196 //CoolBar
\81i
\83\81\83C
\83\93\81E
\94Â
\81E
\83u
\83\89\83E
\83U
\81j
197 FMainCoolBar: array[0..MAIN_COOLBAND_COUNT - 1] of TCoolSet;
198 FListCoolBar: array[0..LIST_COOLBAND_COUNT] of TCoolSet;
199 FBrowserCoolBar: array[0..BROWSER_COOLBAND_COUNT - 1] of TCoolSet;
202 FListToolBarWrapable: Boolean;
203 FBrowserToolBarWrapable: Boolean;
205 //
\83|
\83b
\83v
\83A
\83b
\83v
\88Ê
\92u
206 FPopupPosition: TGikoPopupPosition;
208 //
\83A
\83h
\83\8c\83X
\83o
\81[
209 FURLDisplay: Boolean;
210 FAddressBarTabStop: Boolean;
211 FLinkAddAddressBar: Boolean;
212 FAddressHistoryCount: Integer;
214 //
\89æ
\91\9c\83v
\83\8c\83r
\83\85\81[
215 FPreviewVisible: Boolean;
216 FPreviewSize: TGikoPreviewSize;
217 FPreviewWait: Integer;
219 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\8dX
\90V
\83A
\83C
\83R
\83\93\95\
\8e¦
220 FListIconVisible: Boolean;
222 //
\8f\91\82«
\8d\9e\82Ý
\8e\9e\83}
\83V
\83\93\8e\9e\8aÔ
\8eg
\97p
\90Ý
\92è
223 FUseMachineTime: Boolean;
224 FTimeAdjustSec: Integer;
225 FTimeAdjust: Boolean;
227 function GetMainCoolSet(Index: Integer): TCoolSet;
228 function GetBoardCoolSet(Index: Integer): TCoolSet;
229 function GetBrowserCoolSet(Index: Integer): TCoolSet;
230 procedure SetMainCoolSet(Index: Integer; CoolSet: TCoolSet);
231 procedure SetBoardCoolSet(Index: Integer; CoolSet: TCoolSet);
232 procedure SetBrowserCoolSet(Index: Integer; CoolSet: TCoolSet);
234 function GetBBSColumnWidth(index: Integer): Integer;
235 function GetCategoryColumnWidth(index: Integer): Integer;
236 function GetBoardColumnWidth(index: Integer): Integer;
237 procedure SetBBSColumnWidth(index: Integer; value: Integer);
238 procedure SetCategoryColumnWidth(index: Integer; value: Integer);
239 procedure SetBoardColumnWidth(index: Integer; value: Integer);
241 function GetSoundName(Index: Integer): string;
242 function GetSoundViewName(Index: Integer): string;
243 function GetSoundFileName(Index: Integer): string;
244 procedure SetSoundFileName(Index: Integer; value: string);
245 function Encrypt(s: string): string;
246 function Decrypt(s: string): string;
251 destructor Destroy; override;
252 function GetFileName: string;
253 procedure ReadSettingFile;
254 procedure WriteSystemSettingFile;
255 procedure WriteWindowSettingFile;
256 procedure WriteNameMailSettingFile;
257 procedure WriteFolderSettingFile();
258 function GetSoundCount: Integer;
259 function FindSoundFileName(Name: string): string;
261 //
\8eó
\90M
\83o
\83b
\83t
\83@
\83T
\83C
\83Y
262 property RecvBufferSize: Integer read FRecvBufferSize write FRecvBufferSize;
264 property Protocol: Boolean read FProtocol write FProtocol;
265 //
\83v
\83\8d\83L
\83V
\90Ú
\91±HTTP1.1
\8eg
\97p
266 property ProxyProtocol: Boolean read FProxyProtocol write FProxyProtocol;
268 property ReadProxy: Boolean read FReadProxy write FReadProxy;
269 property ReadProxyAddress: string read FReadProxyAddress write FReadProxyAddress;
270 property ReadProxyPort: Integer read FReadProxyPort write FReadProxyPort;
271 property ReadProxyUserID: string read FReadProxyUserID write FReadProxyUserID;
272 property ReadProxyPassword: string read FReadProxyPassword write FReadProxyPassword;
274 property WriteProxy: Boolean read FWriteProxy write FWriteProxy;
275 property WriteProxyAddress: string read FWriteProxyAddress write FWriteProxyAddress;
276 property WriteProxyPort: Integer read FWriteProxyPort write FWriteProxyPort;
277 property WriteProxyUserID: string read FWriteProxyUserID write FWriteProxyUserID;
278 property WriteProxyPassword: string read FWriteProxyPassword write FWriteProxyPassword;
280 property CabinetFontName: string read FCabinetFontName write FCabinetFontName;
281 property CabinetFontSize: Integer read FCabinetFontSize write FCabinetFontSize;
282 property CabinetFontBold: Boolean read FCabinetFontBold write FCabinetFontBold;
283 property CabinetFontItalic: Boolean read FCabinetFontItalic write FCabinetFontItalic;
284 property CabinetFontColor: TColor read FCabinetFontColor write FCabinetFontColor;
285 property CabinetBackColor: TColor read FCabinetBackColor write FCabinetBackColor;
287 property ListFontName: string read FListFontName write FListFontName;
288 property ListFontSize: Integer read FListFontSize write FListFontSize;
289 property ListFontBold: Boolean read FListFontBold write FListFontBold;
290 property ListFontItalic: Boolean read FListFontItalic write FListFontItalic;
291 property ListFontColor: TColor read FListFontColor write FListFontColor;
292 property ListBackColor: TColor read FListBackColor write FListBackColor;
294 // property BrowserFontColor: TColor read FBrowserFontColor write FBrowserFontColor;
295 // property BrowserBackColor: TColor read FBrowserBackColor write FBrowserBackColor;
296 // property BrowserFontSize: Integer read FBrowserFontSize write FBrowserFontSize;
298 property EditorFontName: string read FEditorFontName write FEditorFontName;
299 property EditorFontSize: Integer read FEditorFontSize write FEditorFontSize;
300 property EditorFontBold: Boolean read FEditorFontBold write FEditorFontBold;
301 property EditorFontItalic: Boolean read FEditorFontItalic write FEditorFontItalic;
302 property EditorFontColor: TColor read FEditorFontColor write FEditorFontColor;
303 property EditorBackColor: TColor read FEditorBackColor write FEditorBackColor;
305 property BrowserTabFontName: string read FBrowserTabFontName write FBrowserTabFontName;
306 property BrowserTabFontSize: Integer read FBrowserTabFontSize write FBrowserTabFontSize;
307 property BrowserTabFontBold: Boolean read FBrowserTabFontBold write FBrowserTabFontBold;
308 property BrowserTabFontItalic: Boolean read FBrowserTabFontItalic write FBrowserTabFontItalic;
310 property HintFontName: string read FHintFontName write FHintFontName;
311 property HintFontSize: Integer read FHintFontSize write FHintFontSize;
312 //property HintFontBold: Boolean read FHintFontBold write FHintFontBold;
313 //property HintFontItalic: Boolean read FHintFontItalic write FHintFontItalic;
314 property HintFontColor: TColor read FHintFontColor write FHintFontColor;
315 property HintBackColor: TColor read FHintBackColor write FHintBackColor;
317 property WindowTop: Integer read FWindowTop write FWindowTop;
318 property WindowLeft: Integer read FWindowLeft write FWindowLeft;
319 property WindowHeight: Integer read FWindowHeight write FWindowHeight;
320 property WindowWidth: Integer read FWindowWidth write FWindowWidth;
321 property WindowMax: Boolean read FWindowMax write FWindowMax;
322 property ListStyle: TViewStyle read FListStyle write FListStyle;
324 property StdToolBarVisible: Boolean read FStdToolBarVisible write FStdToolBarVisible;
325 property AddressBarVisible: Boolean read FAddressBarVisible write FAddressBarVisible;
326 property LinkBarVisible: Boolean read FLinkBarVisible write FLinkBarVisible;
327 property ListToolBarVisible: Boolean read FListToolBarVisible write FListToolBarVisible;
328 property ListNameBarVisible: Boolean read FListNameBarVisible write FListNameBarVisible;
329 property BrowserToolBarVisible: Boolean read FBrowserToolBarVisible write FBrowserToolBarVisible;
330 property BrowserNameBarVisible: Boolean read FBrowserNameBarVisible write FBrowserNameBarVisible;
332 property BrowserTabVisible: Boolean read FBrowserTabVisible write FBrowserTabVisible;
333 property BrowserTabPosition: TGikoTabPosition read FBrowserTabPosition write FBrowserTabPosition;
334 property BrowserTabAppend: TGikoTabAppend read FBrowserTabAppend write FBrowserTabAppend;
335 property BrowserTabStyle: TGikoTabStyle read FBrowserTabStyle write FBrowserTabStyle;
337 property MessageBarVisible: Boolean read FMessageBarVisible write FMessageBarVisible;
338 property MessegeBarHeight: Integer read FMessegeBarHeight write FMessegeBarHeight;
340 property StatusBarVisible: Boolean read FStatusBarVisible write FStatusBarVisible;
342 property CabinetVisible: Boolean read FCabinetVisible write FCabinetVisible;
343 property CabinetWidth: Integer read FCabinetWidth write FCabinetWidth;
345 property ListOrientation: TGikoListOrientation read FListOrientation write FListOrientation;
346 property ListHeight: Integer read FListHeight write FListHeight;
347 property ListHeightState: TGikoListState read FListHeightState write FListHeightState;
348 property ListWidth: Integer read FListWidth write FListWidth;
349 property ListWidthState: TGikoListState read FListWidthState write FListWidthState;
350 // property ListHeightMax: Boolean read FListHeightMax write FListHeightMax;
351 // property ListWidthMax: Boolean read FListWidthMax write FListWidthMax;
353 property NameList: TStringList read FNameList write FNameList;
354 property MailList: TStringList read FMailList write FMailList;
355 property SelectTextList: TStringList read FSelectTextList write FSelectTextList;
357 property EditWindowTop: Integer read FEditWindowTop write FEditWindowTop;
358 property EditWindowLeft: Integer read FEditWindowLeft write FEditWindowLeft;
359 property EditWindowHeight: Integer read FEditWindowHeight write FEditWindowHeight;
360 property EditWindowWidth: Integer read FEditWindowWidth write FEditWindowWidth;
361 property EditWindowMax: Boolean read FEditWindowMax write FEditWindowMax;
363 property ListViewNo: Boolean read FListViewNo write FListViewNo;
364 property UseCSS: Boolean read FUseCSS write FUseCSS;
365 property CSSFileName: string read FCSSFileName write FCSSFileName;
367 property ShowMail: Boolean read FShowMail write FShowMail;
368 property UnActivePopup: Boolean read FUnActivePopup write FUnActivePopup;
370 property LogFolder: string read FLogFolder write FLogFolder;
371 property NewLogFolder: string read FNewLogFolder write FNewLogFolder;
373 property BBSColumnWidth[index: Integer]: Integer read GetBBSColumnWidth write SetBBSColumnWidth;
374 property CategoryColumnWidth[index: Integer]: Integer read GetCategoryColumnWidth write SetCategoryColumnWidth;
375 property BoardColumnWidth[index: Integer]: Integer read GetBoardColumnWidth write SetBoardColumnWidth;
377 property SoundName[index: Integer]: string read GetSoundName;
378 property SoundViewName[index: Integer]: string read GetSoundViewName;
379 property SoundFileName[index: Integer]: string read GetSoundFileName write SetSoundFileName;
381 property BoardURL2ch: string read FBoardURL2ch write FBoardURL2ch;
383 property UserID: string read FUserID write FUserID;
384 property Password: string read FPassword write FPassword;
385 property AutoLogin: Boolean read FAutoLogin write FAutoLogin;
387 property URLApp: Boolean read FURLApp write FURLApp;
388 property URLAppFile: string read FURLAppFile write FURLAppFile;
390 property OpenMailer: Boolean read FOpenMailer write FOpenMailer;
392 property DeleteMsg: Boolean read FDeleteMsg write FDeleteMsg;
394 property MainCoolSet[Index: Integer]: TCoolSet read GetMainCoolSet write SetMainCoolSet;
395 property ListCoolSet[Index: Integer]: TCoolSet read GetBoardCoolSet write SetBoardCoolSet;
396 property BrowserCoolSet[Index: Integer]: TCoolSet read GetBrowserCoolSet write SetBrowserCoolSet;
398 property ListToolBarWrapable: Boolean read FListToolBarWrapable write FListToolBarWrapable;
399 property BrowserToolBarWrapable: Boolean read FBrowserToolBarWrapable write FBrowserToolBarWrapable;
401 property PopupPosition: TGikoPopupPosition read FPopupPosition write FPopupPosition;
403 property URLDisplay: Boolean read FURLDisplay write FURLDisplay;
404 property AddressBarTabStop: Boolean read FAddressBarTabStop write FAddressBarTabStop;
405 property LinkAddAddressBar: Boolean read FLinkAddAddressBar write FLinkAddAddressBar;
406 property AddressHistoryCount: Integer read FAddressHistoryCount write FAddressHistoryCount;
408 property PreviewVisible: Boolean read FPreviewVisible write FPreviewVisible;
409 property PreviewSize: TGikoPreviewSize read FPreviewSize write FPreviewSize;
410 property PreviewWait: Integer read FPreviewWait write FPreviewWait;
412 property ListIconVisible: Boolean read FListIconVisible write FListIconVisible;
414 property UseMachineTime: Boolean read FUseMachineTime write FUseMachineTime;
415 property TimeAdjustSec: Integer read FTimeAdjustSec write FTimeAdjustSec;
416 property TimeAdjust: Boolean read FTimeAdjust write FTimeAdjust;
430 INI_FILE_NAME: string = 'gikoNavi.ini';
431 DEFAULT_FONT_NAME: string = '
\82l
\82r
\82o
\83S
\83V
\83b
\83N';
432 DEFAULT_FONT_SIZE: Integer = 9;
433 DEFAULT_FONT_COLOR: string = 'clWindowText';
434 DEFAULT_WINDOW_COLOR: string = 'clWindow';
435 DEFAULT_TAB_FONT_NAME: string = '
\82l
\82r
\82o
\83S
\83V
\83b
\83N';
436 DEFAULT_TAB_FONT_SIZE: Integer = 9;
437 DEFAULT_2CH_BOARD_URL: string = 'http://www6.ocn.ne.jp/~mirv/2chmenu.html';
438 //'http://www.2ch.net/newbbsmenu.html';
439 GIKO_ENCRYPT_TEXT: string = 'gikoNaviEncryptText';
442 SOUND_NAME: array[0..4] of TSoundName = (
443 (Name: 'New'; ViewName: '
\8eæ
\93¾
\90¬
\8c÷'; FileName: ''),
444 (Name: 'NewDiff'; ViewName: '
\8eæ
\93¾
\90¬
\8c÷(
\8d·
\95ª)'; FileName: ''),
445 (Name: 'NoChange'; ViewName: '
\96¢
\8dX
\90V'; FileName: ''),
446 // (Name: 'RoundEnd'; ViewName: '
\8f\84\89ñ
\8fI
\97¹(
\8eæ
\93¾
\82 \82è)'; FileName: ''),
447 // (Name: 'RoundNone'; ViewName: '
\8f\84\89ñ
\8fI
\97¹(
\8eæ
\93¾
\82È
\82µ)'; FileName: ''),
448 (Name: 'ResEnd'; ViewName: '
\83\8c\83X
\91\97\90M
\8a®
\97¹'; FileName: ''),
449 (Name: 'Error'; ViewName: '
\83G
\83\89\81['; FileName: ''));
451 //
\83R
\83\93\83X
\83g
\83\89\83N
\83^
452 constructor TSetting.Create();
454 FNameList := TStringList.Create;
455 FMailList := TStringList.Create;
456 FSelectTextList := TStringList.Create;
458 FNameList.Duplicates := dupIgnore;
459 FMailList.Duplicates := dupIgnore;
460 FSelectTextList.Duplicates := dupIgnore;
464 //
\83f
\83X
\83g
\83\89\83N
\83^
465 destructor TSetting.Destroy();
468 FSelectTextList.Free;
473 //
\8f\89\8aú
\89»
\83t
\83@
\83C
\83\8b\96¼
\8eæ
\93¾
\81i
\83p
\83X
\81{
\83t
\83@
\83C
\83\8b\96¼
\81j
474 function TSetting.GetFileName(): string;
476 Result := ExtractFilePath(Application.ExeName) + INI_FILE_NAME;
479 //
\90Ý
\92è
\83t
\83@
\83C
\83\8b\93Ç
\8d\9e
480 procedure TSetting.ReadSettingFile();
482 DEFAULT_BBS_WIDTH: array[0..0] of Integer = (140);
483 DEFAULT_CATEGORY_WIDTH: array[0..2] of Integer = (150, 80, 130);
484 DEFAULT_BOARD_WIDTH: array[0..6] of Integer = (350, 60, 60, 60, 60, 80, 130);
495 Exists := FileExists(GetFileName);
496 ini := TMemIniFile.Create(GetFileName);
498 //
\8eó
\90M
\83o
\83b
\83t
\83@
\83T
\83C
\83Y
499 FRecvBufferSize := ini.ReadInteger('HTTP', 'RecvBufferSize', 4096);
501 FProtocol := ini.ReadBool('HTTP', 'Protocol', True);
502 //
\83v
\83\8d\83L
\83V
\90Ú
\91±HTTP1.1
\8eg
\97p
503 FProxyProtocol := ini.ReadBool('HTTP', 'ProxyProtocol', False);
505 FReadProxy := ini.ReadBool('ReadProxy', 'Proxy', false);
506 FReadProxyAddress := ini.ReadString('ReadProxy', 'Address', '');
507 FReadProxyPort := ini.ReadInteger('ReadProxy', 'Port', 0);
508 FReadProxyUserID := ini.ReadString('ReadProxy', 'UserID', '');
509 FReadProxyPassword := ini.ReadString('ReadProxy', 'Password', '');
511 FWriteProxy := ini.ReadBool('WriteProxy', 'Proxy', false);
512 FWriteProxyAddress := ini.ReadString('WriteProxy', 'Address', '');
513 FWriteProxyPort := ini.ReadInteger('WriteProxy', 'Port', 0);
514 FWriteProxyUserID := ini.ReadString('WriteProxy', 'UserID', '');
515 FWriteProxyPassword := ini.ReadString('WriteProxy', 'Password', '');
517 FCabinetFontName := ini.ReadString('Window', 'CabinetFontName', DEFAULT_FONT_NAME);
518 FCabinetFontSize := ini.ReadInteger('Window', 'CabinetFontSize', DEFAULT_FONT_SIZE);
519 FCabinetFontBold := ini.ReadBool('Window', 'CabinetFontBold', False);
520 FCabinetFontItalic := ini.ReadBool('Window', 'CabinetFontItalic', False);
521 FCabinetFontColor := StringToColor(ini.ReadString('Window', 'CabinetFontColor', DEFAULT_FONT_COLOR));
522 FCabinetBackColor := StringToColor(ini.ReadString('Window', 'CabinetBackColor', DEFAULT_WINDOW_COLOR));
524 FListFontName := ini.ReadString('Window', 'ListFontName', DEFAULT_FONT_NAME);
525 FListFontSize := ini.ReadInteger('Window', 'ListFontSize', DEFAULT_FONT_SIZE);
526 FListFontBold := ini.ReadBool('Window', 'ListFontBold', False);
527 FListFontItalic := ini.ReadBool('Window', 'ListFontItalic', False);
528 FListFontColor := StringToColor(ini.ReadString('Window', 'ListFontColor', DEFAULT_FONT_COLOR));
529 FListBackColor := StringToColor(ini.ReadString('Window', 'ListBackColor', DEFAULT_WINDOW_COLOR));
531 FEditorFontName := ini.ReadString('Window', 'EditorFontName', DEFAULT_FONT_NAME);
532 FEditorFontSize := ini.ReadInteger('Window', 'EditorFontSize', DEFAULT_FONT_SIZE);
533 FEditorFontBold := ini.ReadBool('Window', 'EditorFontBold', False);
534 FEditorFontItalic := ini.ReadBool('Window', 'EditorFontItalic', False);
535 FEditorFontColor := StringToColor(ini.ReadString('Window', 'EditorFontColor', DEFAULT_FONT_COLOR));
536 FEditorBackColor := StringToColor(ini.ReadString('Window', 'EditorBackColor', DEFAULT_WINDOW_COLOR));
538 FBrowserTabFontName := ini.ReadString('Window', 'BrowserTabFontName', DEFAULT_TAB_FONT_NAME);
539 FBrowserTabFontSize := ini.ReadInteger('Window', 'BrowserTabFontSize', DEFAULT_TAB_FONT_SIZE);
540 FBrowserTabFontBold := ini.ReadBool('Window', 'BrowserTabFontBold', False);
541 FBrowserTabFontItalic := ini.ReadBool('Window', 'BrowserTabFontItalic', False);
543 FHintFontName := ini.ReadString('Window', 'HintFontName', Screen.HintFont.Name);
544 FHintFontSize := ini.ReadInteger('Window', 'HintFontSize', Screen.HintFont.Size);
545 //FHintFontBold := ini.ReadBool('Window', 'HintFontBold', False);
546 //FHintFontItalic := ini.ReadBool('Window', 'HintFontItalic', False);
547 FHintFontColor := StringToColor(ini.ReadString('Window', 'HintFontColor', DEFAULT_FONT_COLOR));
548 FHintBackColor := StringToColor(ini.ReadString('Window', 'HintBackColor', 'clInfoBk'));
550 FWindowTop := ini.ReadInteger('WindowSize', 'Top', -1);
551 FWindowLeft := ini.ReadInteger('WindowSize', 'Left', -1);
552 FWindowHeight := ini.ReadInteger('WindowSize', 'Height', -1);
553 FWindowWidth := ini.ReadInteger('WindowSize', 'Width', -1);
554 FWindowMax := ini.ReadBool('WindowSize', 'Max', false);
556 if FWindowHeight <= 0 then FWindowHeight := 400;
557 if FWindowWidth <= 0 then FWindowWidth := 600;
559 FListStyle := TViewStyle(ini.ReadInteger('ViewStyle', 'ListView', Ord(vsReport)));
561 FEditWindowTop := ini.ReadInteger('EditorWindowSize', 'Top', -1);
562 FEditWindowLeft := ini.ReadInteger('EditorWindowSize', 'Left', -1);
563 FEditWindowHeight := ini.ReadInteger('EditorWindowSize', 'Height', -1);
564 FEditWindowWidth := ini.ReadInteger('EditorWindowSize', 'Width', -1);
565 FEditWindowMax := ini.ReadBool('EditorWindowSize', 'Max', False);
567 //
\83c
\81[
\83\8b\83o
\81[
568 FStdToolBarVisible := ini.ReadBool('ToolBar', 'StdVisible', True);
569 FAddressBarVisible := ini.ReadBool('ToolBar', 'AddressVisible', True);
570 FLinkBarVisible := ini.ReadBool('ToolBar', 'LinkVisible', True);
571 FListToolBarVisible := ini.ReadBool('ToolBar', 'ListVisible', True);
572 FListNameBarVisible := ini.ReadBool('ToolBar', 'ListNameVisible', True);
573 FBrowserToolBarVisible := ini.ReadBool('ToolBar', 'BrowserVisible', True);
574 FBrowserNameBarVisible := ini.ReadBool('ToolBar', 'BrowserNameVisible', True);
575 //
\83c
\81[
\83\8b\83o
\81[Wrapable
576 FListToolBarWrapable := ini.ReadBool('ToolBar', 'ListWrapable', False);
577 FBrowserToolBarWrapable := ini.ReadBool('ToolBar', 'BrowserWrapable', False);
579 FBrowserTabVisible := ini.ReadBool('Tab', 'BrowserTabVisible', True);
580 FBrowserTabPosition := TGikoTabPosition(ini.ReadInteger('Tab', 'BrowserTabPosition', Ord(gtpTop)));
581 FBrowserTabAppend := TGikoTabAppend(ini.ReadInteger('Tab', 'BrowserTabAppend', Ord(gtaFirst)));
582 FBrowserTabStyle := TGikoTabStyle(ini.ReadInteger('Tab', 'BrowserTabStyle', Ord(gtsFlat)));
584 FMessageBarVisible := ini.ReadBool('MessageBar', 'Visible', True);
585 FMessegeBarHeight := ini.ReadInteger('MessageBar', 'Height', 30);
587 FStatusBarVisible := ini.ReadBool('StatusBar', 'Visible', True);
589 FCabinetVisible := ini.ReadBool('Cabinet', 'Visible', True);
590 FCabinetWidth := ini.ReadInteger('Cabinet', 'Width', 200);
592 FListOrientation := TGikoListOrientation(ini.ReadInteger('List', 'Orientation', Ord(gloHorizontal)));
593 FListHeight := ini.ReadInteger('List', 'Height', 180);
594 FListHeightState := TGikoListState(ini.ReadInteger('List', 'HeightState', Ord(glsNormal)));
595 FListWidth := ini.ReadInteger('List', 'Width', 180);
596 FListWidthState := TGikoListState(ini.ReadInteger('List', 'WidthState', Ord(glsNormal)));
597 // FListHeightMax := ini.ReadBool('List', 'HeightMax', False);
598 // FListWidthMax := ini.ReadBool('List', 'WidthMax', False);
600 wkList := TStringList.Create;
602 ini.ReadSection('Name', wkList);
603 for i := 0 to wkList.Count - 1 do begin
604 wkStr := ini.ReadString('Name', wkList[i], '');
605 if (wkStr <> '') and (FNameList.IndexOf(wkStr) = -1) then
606 FNameList.Add(wkStr);
608 ini.ReadSection('Mail', wkList);
609 for i := 0 to wkList.Count - 1 do begin
610 wkStr := ini.ReadString('Mail', wkList[i], '');
611 if (wkStr <> '') and (FMailList.IndexOf(wkStr) = -1) then
612 FMailList.Add(wkStr);
614 ini.ReadSection('SelectText', wkList);
615 for i := 0 to wkList.Count - 1 do begin
616 wkStr := ini.ReadString('SelectText', wkList[i], '');
617 if (wkStr <> '') and (FSelectTextList.IndexOf(wkStr) = -1) then
618 FSelectTextList.Add(wkStr);
624 //
\83\8a\83X
\83g
\83J
\83\89\83\80
625 wkList := TStringList.Create;
627 ini.ReadSection('BBSColumnWidth', wkList);
628 if Length(FBBSColumnWidth) <> wkList.Count then begin
629 ini.EraseSection('BBSColumnWidth');
631 for i := 0 to Length(FBBSColumnWidth) - 1 do begin
632 BBSColumnWidth[i] := ini.ReadInteger('BBSColumnWidth', 'ID' + IntToStr(i), DEFAULT_BBS_WIDTH[i]);
634 ini.ReadSection('CategoryColumnWidth', wkList);
635 if Length(FCategoryColumnWidth) <> wkList.Count then begin
636 ini.EraseSection('CategoryColumnWidth');
638 for i := 0 to Length(FCategoryColumnWidth) - 1 do begin
639 CategoryColumnWidth[i] := ini.ReadInteger('CategoryColumnWidth', 'ID' + IntToStr(i), DEFAULT_CATEGORY_WIDTH[i]);
641 ini.ReadSection('BoardColumnWidth', wkList);
642 if Length(FBoardColumnWidth) <> wkList.Count then begin
643 ini.EraseSection('BoardColumnWidth');
645 for i := 0 to Length(FBoardColumnWidth) - 1 do begin
646 BoardColumnWidth[i] := ini.ReadInteger('BoardColumnWidth', 'ID' + IntToStr(i), DEFAULT_BOARD_WIDTH[i]);
653 //
\83\8a\83X
\83g
\94Ô
\8d\86
654 FListViewNo := ini.ReadBool('Function', 'ListViewNo', True);
656 FUseCSS := ini.ReadBool('CSS', 'UseCSS', True);
657 //CSS
\83t
\83@
\83C
\83\8b\96¼
658 FCSSFileName := ini.ReadString('CSS', 'FileName', 'default.css');
661 FShowMail := ini.ReadBool('Thread', 'ShowMail', True);
662 //
\94ñ
\83A
\83N
\83e
\83B
\83u
\8e\9e\83|
\83b
\83v
\83A
\83b
\83v
\95\
\8e¦
663 FUnActivePopup := ini.ReadBool('Thread', 'UnActivePopup', False);
666 FDeleteMsg := ini.ReadBool('Function', 'LogDeleteMessage', True);
668 //
\83\8d\83O
\83t
\83H
\83\8b\83_
669 FLogFolder := ini.ReadString('Folder', 'LogFolder', ExtractFilePath(Application.ExeName) + 'Log');
673 FBoardURL2ch := ini.ReadString('BoardURL', '2ch', DEFAULT_2CH_BOARD_URL);
675 //
\94F
\8fØ
\97p
\83\86\81[
\83UID
\81E
\83p
\83X
\83\8f\81[
\83h
676 FUserID := ini.ReadString('Attestation', 'UserID', '');
677 FPassword := Decrypt(ini.ReadString('Attestation', 'Password', ''));
678 FAutoLogin := ini.ReadBool('Attestation', 'AutoLogin', False);
680 //URL
\83N
\83\8a\83b
\83N
\8e\9e\8bN
\93®
\83A
\83v
\83\8a
681 FURLApp := ini.ReadBool('URLApp', 'Select', False);
682 FURLAppFile := ini.ReadString('URLApp', 'File', '');
684 //mailto
\83N
\83\8a\83b
\83N
\8e\9e\93®
\8dì
685 FOpenMailer := ini.ReadBool('Mailto', 'Open', True);
687 //
\83|
\83b
\83v
\83A
\83b
\83v
\88Ê
\92u
688 FPopupPosition := TGikoPopupPosition(ini.ReadInteger('Browser', 'PopupPosition', Ord(gppLeftBottom)));
690 //
\83A
\83h
\83\8c\83X
\83o
\81[
691 FURLDisplay := ini.ReadBool('AddressBar', 'URLDisplay', False);
692 FAddressBarTabStop := ini.ReadBool('AddressBar', 'TabStop', True);
693 FLinkAddAddressBar := ini.ReadBool('AddressBar', 'LinkAdd', False);
694 FAddressHistoryCount := ini.ReadInteger('AddressBar', 'HistoryCount', 100);
696 //
\89æ
\91\9c\83v
\83\8c\83r
\83\85\81[
697 FPreviewVisible := ini.ReadBool('Browser', 'PreviewVisible', True);
698 FPreviewSize := TGikoPreviewSize(ini.ReadInteger('Browser', 'PreviewSize', Ord(gpsMedium)));
699 FPreviewWait := ini.ReadInteger('Browser', 'PreviewWait', 500);
701 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\8dX
\90V
\83A
\83C
\83R
\83\93
702 FListIconVisible := ini.ReadBool('ThreadList', 'StateIconVisible', True);
704 //
\8f\91\82«
\8d\9e\82Ý
\8e\9e\83}
\83V
\83\93\8e\9e\8d\8f\8eg
\97p
\90Ý
\92è
705 FUseMachineTime := ini.ReadBool('PostTime', 'UseMachineTime', False);
706 FTimeAdjustSec := ini.ReadInteger('PostTime', 'TimeAdjustSec', 0);
707 FTimeAdjust := ini.ReadBool('PostTime', 'TimeAdjust', True);
711 for i := 0 to GetSoundCount - 1 do begin
712 SoundFileName[i] := ini.ReadString('Sound', SoundName[i], '');
713 if not FileExists(SoundFileName[i]) then
714 SoundFileName[i] := '';
717 s := ExtractFileDir(Application.ExeName) + '\sound\';
718 SoundFileName[0] := s + '
\8eæ
\93¾
\90¬
\8c÷.wav';
719 SoundFileName[1] := s + '
\8eæ
\93¾
\90¬
\8c÷(
\8d·
\95ª).wav';
720 SoundFileName[2] := s + '
\96¢
\8dX
\90V.wav';
721 SoundFileName[3] := '';
722 SoundFileName[4] := s + '
\83G
\83\89\81[.wav';
725 //
\83N
\81[
\83\8b\83o
\81[
726 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
727 CoolSet.FCoolID := ini.ReadInteger('MainCoolBar', 'ID' + IntToStr(i), -1);
728 CoolSet.FCoolWidth := ini.ReadInteger('MainCoolBar', 'Width' + IntToStr(i), -1);
729 CoolSet.FCoolBreak := ini.ReadBool('MainCoolBar', 'Break' + IntToStr(i), False);
730 MainCoolSet[i] := CoolSet;
732 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
733 CoolSet.FCoolID := ini.ReadInteger('ListCoolBar', 'ID' + IntToStr(i), -1);
734 CoolSet.FCoolWidth := ini.ReadInteger('ListCoolBar', 'Width' + IntToStr(i), -1);
735 CoolSet.FCoolBreak := ini.ReadBool('ListCoolBar', 'Break' + IntToStr(i), False);
736 LIstCoolSet[i] := CoolSet;
738 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
739 CoolSet.FCoolID := ini.ReadInteger('BrowserCoolBar', 'ID' + IntToStr(i), -1);
740 CoolSet.FCoolWidth := ini.ReadInteger('BrowserCoolBar', 'Width' + IntToStr(i), -1);
741 CoolSet.FCoolBreak := ini.ReadBool('BrowserCoolBar', 'Break' + IntToStr(i), False);
742 BrowserCoolSet[i] := CoolSet;
749 //
\90Ý
\92è
\83t
\83@
\83C
\83\8b\95Û
\91¶(system)
750 procedure TSetting.WriteSystemSettingFile();
754 ini := TMemIniFile.Create(GetFileName());
756 //
\8eó
\90M
\83o
\83b
\83t
\83@
\83T
\83C
\83Y
757 ini.WriteInteger('HTTP', 'RecvBufferSize', FRecvBufferSize);
759 ini.WriteBool('HTTP', 'Protocol', FProtocol);
760 //
\83v
\83\8d\83L
\83V
\90Ú
\91±HTTP1.1
\8eg
\97p
761 ini.WriteBool('HTTP', 'ProxyProtocol', FProxyProtocol);
763 ini.WriteBool('ReadProxy', 'Proxy', FReadProxy);
764 ini.WriteString('ReadProxy', 'Address', FReadProxyAddress);
765 ini.WriteInteger('ReadProxy', 'Port', FReadProxyPort);
766 ini.WriteString('ReadProxy', 'UserID', FReadProxyUserID);
767 ini.WriteString('ReadProxy', 'Password', FReadProxyPassword);
769 ini.WriteBool('WriteProxy', 'Proxy', FWriteProxy);
770 ini.WriteString('WriteProxy', 'Address', FWriteProxyAddress);
771 ini.WriteInteger('WriteProxy', 'Port', FWriteProxyPort);
772 ini.WriteString('WriteProxy', 'UserID', FWriteProxyUserID);
773 ini.WriteString('WriteProxy', 'Password', FWriteProxyPassword);
775 ini.WriteString('Window', 'CabinetFontName', FCabinetFontName);
776 ini.WriteInteger('Window', 'CabinetFontSize', FCabinetFontSize);
777 ini.WriteString('Window', 'CabinetFontColor', ColorToString(FCabinetFontColor));
778 ini.WriteString('Window', 'CabinetBackColor', ColorToString(FCabinetBackColor));
780 ini.WriteString('Window', 'ListFontName', FListFontName);
781 ini.WriteInteger('Window', 'ListFontSize', FListFontSize);
782 ini.WriteString('Window', 'ListFontColor', ColorToString(FListFontColor));
783 ini.WriteString('Window', 'ListBackColor', ColorToString(FListBackColor));
785 ini.WriteString('Window', 'EditorFontName', FEditorFontName);
786 ini.WriteInteger('Window', 'EditorFontSize', FEditorFontSize);
787 ini.WriteString('Window', 'EditorFontColor', ColorToString(FEditorFontColor));
788 ini.WriteString('Window', 'EditorBackColor', ColorToString(FEditorBackColor));
790 ini.WriteString('Window', 'BrowserTabFontName', FBrowserTabFontName);
791 ini.WriteInteger('Window', 'BrowserTabFontSize', FBrowserTabFontSize);
792 ini.WriteBool('Window', 'BrowserTabFontBold', FBrowserTabFontBold);
793 ini.WriteBool('Window', 'BrowserTabFontItalic', FBrowserTabFontItalic);
795 ini.WriteString('Window', 'HintFontName', FHintFontName);
796 ini.WriteInteger('Window', 'HintFontSize', FHintFontSize);
797 ini.WriteString('Window', 'HintFontColor', ColorToString(FHintFontColor));
798 ini.WriteString('Window', 'HintBackColor', ColorToString(FHintBackColor));
806 //
\90Ý
\92è
\83t
\83@
\83C
\83\8b\95Û
\91¶(window)
807 procedure TSetting.WriteWindowSettingFile();
813 ini := TMemIniFile.Create(GetFileName());
815 ini.WriteInteger('WindowSize', 'Top', WindowTop);
816 ini.WriteInteger('WindowSize', 'Left', WindowLeft);
817 ini.WriteInteger('WindowSize', 'Height', WindowHeight);
818 ini.WriteInteger('WindowSize', 'Width', WindowWidth);
819 ini.WriteBool('WindowSize', 'Max', WindowMax);
821 ini.WriteInteger('ViewStyle', 'ListView', Ord(ListStyle));
823 ini.WriteInteger('EditorWindowSize', 'Top', EditWindowTop);
824 ini.WriteInteger('EditorWindowSize', 'Left', EditWindowLeft);
825 ini.WriteInteger('EditorWindowSize', 'Height', EditWindowHeight);
826 ini.WriteInteger('EditorWindowSize', 'Width', EditWindowWidth);
827 ini.WriteBool('EditorWindowSize', 'Max', EditWindowMax);
829 //
\83c
\81[
\83\8b\83o
\81[
830 ini.WriteBool('ToolBar', 'StdVisible', FStdToolBarVisible);
831 ini.WriteBool('ToolBar', 'AddressVisible', FAddressBarVisible);
832 ini.WriteBool('ToolBar', 'LinkVisible', FLinkBarVisible);
833 ini.WriteBool('ToolBar', 'ListVisible', FListToolBarVisible);
834 ini.WriteBool('ToolBar', 'ListNameVisible', FListNameBarVisible);
835 ini.WriteBool('ToolBar', 'BrowserVisible', FBrowserToolBarVisible);
836 ini.WriteBool('ToolBar', 'BrowserNameVisible', FBrowserNameBarVisible);
837 //
\83c
\81[
\83\8b\83o
\81[Wrapable
838 ini.WriteBool('ToolBar', 'ListWrapable', FListToolBarWrapable);
839 ini.WriteBool('ToolBar', 'BrowserWrapable', FBrowserToolBarWrapable);
842 ini.WriteBool('Tab', 'BrowserTabVisible', FBrowserTabVisible);
843 ini.WriteInteger('Tab', 'BrowserTabPosition', Ord(FBrowserTabPosition));
844 ini.WriteInteger('Tab', 'BrowserTabAppend', Ord(FBrowserTabAppend));
845 ini.WriteInteger('Tab', 'BrowserTabStyle', Ord(FBrowserTabStyle));
847 //
\83\81\83b
\83Z
\81[
\83W
\83o
\81[
848 ini.WriteBool('MessageBar', 'Visible', FMessageBarVisible);
849 ini.WriteInteger('MessageBar', 'Height', FMessegeBarHeight);
851 //
\83X
\83e
\81[
\83^
\83X
\83o
\81[
852 ini.WriteBool('StatusBar', 'Visible', FStatusBarVisible);
854 //
\83L
\83\83\83r
\83l
\83b
\83g
855 ini.WriteBool('Cabinet', 'Visible', FCabinetVisible);
856 ini.WriteInteger('Cabinet', 'Width', FCabinetWidth);
858 //
\83\8a\83X
\83g
\82Ì
\83T
\83C
\83Y
\82Æ
\90\82\92¼
\90\85\95½
859 ini.WriteInteger('List', 'Orientation', Ord(FListOrientation));
860 ini.WriteInteger('List', 'Height', FListHeight);
861 ini.WriteInteger('List', 'HeightState', Ord(FListHeightState));
862 ini.WriteInteger('List', 'Width', FListWidth);
863 ini.WriteInteger('List', 'WidthState', Ord(FListWidthState));
864 // ini.WriteBool('List', 'HeightMax', FListHeightMax);
865 // ini.WriteBool('List', 'WidthMax', FListWidthMax);
868 // ini.WriteInteger('Window', 'BrowserFontSize', BrowserFontSize);
870 //
\83\8a\83X
\83g
\94Ô
\8d\86\95\
\8e¦
871 ini.WriteBool('Function', 'ListViewNo', FListViewNo);
873 ini.WriteBool('CSS', 'UseCSS', FUseCSS);
874 //CSS
\83t
\83@
\83C
\83\8b\96¼
875 ini.WriteString('CSS', 'FileName', FCSSFileName);
877 ini.WriteBool('Thread', 'ShowMail', FShowMail);
878 //
\83\8d\83O
\8dí
\8f\9c\8am
\94F
879 ini.WriteBool('Function', 'LogDeleteMessage', FDeleteMsg);
880 //
\94ñ
\83A
\83N
\83e
\83B
\83u
\8e\9e\83|
\83b
\83v
\83A
\83b
\83v
\95\
\8e¦
881 ini.WriteBool('Thread', 'UnActivePopup', FUnActivePopup);
883 ini.WriteString('BoardURL', '2ch', FBoardURL2ch);
885 //
\94F
\8fØ
\97p
\83\86\81[
\83UID
\81E
\83p
\83X
\83\8f\81[
\83h
886 ini.WriteString('Attestation', 'UserID', FUserID);
887 ini.WriteString('Attestation', 'Password', Encrypt(FPassword));
888 ini.WriteBool('Attestation', 'AutoLogin', FAutoLogin);
890 //URL
\83N
\83\8a\83b
\83N
\8e\9e\8bN
\93®
\83A
\83v
\83\8a
891 ini.WriteBool('URLApp', 'Select', FURLApp);
892 ini.WriteString('URLApp', 'File', FURLAppFile);
894 //mailto
\83N
\83\8a\83b
\83N
\8e\9e\93®
\8dì
895 ini.WriteBool('Mailto', 'Open', FOpenMailer);
897 //
\83|
\83b
\83v
\83A
\83b
\83v
\88Ê
\92u
898 ini.WriteInteger('Browser', 'PopupPosition', Ord(FPopupPosition));
900 //
\83A
\83h
\83\8c\83X
\83o
\81[
901 ini.WriteBool('AddressBar', 'URLDisplay', FURLDisplay);
902 ini.WriteBool('AddressBar', 'TabStop', FAddressBarTabStop);
903 ini.WriteBool('AddressBar', 'LinkAdd', FLinkAddAddressBar);
904 ini.WriteInteger('AddressBar', 'HistoryCount', FAddressHistoryCount);
906 //
\89æ
\91\9c\83v
\83\8c\83r
\83\85\81[
907 ini.WriteBool('Browser', 'PreviewVisible', FPreviewVisible);
908 ini.WriteInteger('Browser', 'PreviewSize', Ord(FPreviewSize));
909 ini.WriteInteger('Browser', 'PreviewWait', FPreviewWait);
911 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\8dX
\90V
\83A
\83C
\83R
\83\93
912 ini.WriteBool('ThreadList', 'StateIconVisible', FListIconVisible);
914 //
\8f\91\82«
\8d\9e\82Ý
\8e\9e\83}
\83V
\83\93\8e\9e\8d\8f\8eg
\97p
\90Ý
\92è
915 ini.WriteBool('PostTime', 'UseMachineTime', FUseMachineTime);
916 ini.WriteInteger('PostTime', 'TimeAdjustSec', FTimeAdjustSec);
917 ini.WriteBool('PostTime', 'TimeAdjust', FTimeAdjust);
919 //
\83\8a\83X
\83g
\83J
\83\89\83\80
920 for i := 0 to Length(FBBSColumnWidth) - 1 do begin
921 ini.WriteInteger('BBSColumnWidth', 'ID' + IntToStr(i), FBBSColumnWidth[i]);
923 for i := 0 to Length(FCategoryColumnWidth) - 1 do begin
924 ini.WriteInteger('CategoryColumnWidth', 'ID' + IntToStr(i), FCategoryColumnWidth[i]);
926 for i := 0 to Length(FBoardColumnWidth) - 1 do begin
927 ini.WriteInteger('BoardColumnWidth', 'ID' + IntToStr(i), FBoardColumnWidth[i]);
931 for i := 0 to GetSoundCount - 1 do begin
932 if not FileExists(SoundFileName[i]) then
933 SoundFileName[i] := '';
934 ini.WriteString('Sound', SoundName[i], SoundFileName[i]);
938 ini.EraseSection('MainCoolBar');
939 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
940 CoolSet := MainCoolSet[i];
941 ini.WriteInteger('MainCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
942 ini.WriteInteger('MainCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
943 ini.WriteBool('MainCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
945 ini.EraseSection('BoardCoolBar');
946 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
947 CoolSet := ListCoolSet[i];
948 ini.WriteInteger('ListCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
949 ini.WriteInteger('ListCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
950 ini.WriteBool('ListCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
952 ini.EraseSection('BrowserCoolBar');
953 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
954 CoolSet := BrowserCoolSet[i];
955 ini.WriteInteger('BrowserCoolBar', 'ID' + IntToStr(i), CoolSet.FCoolID);
956 ini.WriteInteger('BrowserCoolBar', 'Width' + IntToStr(i), CoolSet.FCoolWidth);
957 ini.WriteBool('BrowserCoolBar', 'Break' + IntToStr(i), CoolSet.FCoolBreak);
966 //
\90Ý
\92è
\83t
\83@
\83C
\83\8b\95Û
\91¶(name & mail)
967 procedure TSetting.WriteNameMailSettingFile();
972 ini := TMemIniFile.Create(GetFileName());
974 ini.EraseSection('Name');
975 ini.EraseSection('Mail');
976 ini.EraseSection('SelectText');
977 for i := 0 to FNameList.Count - 1 do begin
978 ini.WriteString('Name', Format('%.2d', [i + 1]), FNameList[i]);
982 for i := 0 to FMailList.Count - 1 do begin
983 ini.WriteString('Mail', Format('%.2d', [i + 1]), FMailList[i]);
987 for i := 0 to FSelectTextList.Count - 1 do begin
988 ini.WriteString('SelectText', Format('%.2d', [i + 1]), FSelectTextList[i]);
998 procedure TSetting.WriteFolderSettingFile();
1002 ini := TMemIniFile.Create(GetFileName());
1004 if ExtractFilePath(Application.ExeName) + 'Log' = NewLogFolder then
1005 ini.DeleteKey('Folder', 'LogFolder')
1007 ini.WriteString('Folder', 'LogFolder', NewLogFolder);
1014 //
\83\8a\83X
\83g
\83J
\83\89\83\80\83w
\83b
\83_
\81[
1015 function TSetting.GetBBSColumnWidth(index: Integer): Integer;
1017 Result := IfThen(index in [0..Length(FBBSColumnWidth) - 1], FBBSColumnWidth[index], 0);
1020 function TSetting.GetCategoryColumnWidth(index: Integer): Integer;
1022 Result := IfThen(index in [0..Length(FCategoryColumnWidth) - 1], FCategoryColumnWidth[index], 0);
1025 function TSetting.GetBoardColumnWidth(index: Integer): Integer;
1027 Result := IfThen(index in [0..Length(FBoardColumnWidth) - 1], FBoardColumnWidth[index], 0);
1030 procedure TSetting.SetBBSColumnWidth(index: Integer; value: Integer);
1032 if index in [0..Length(FBBSColumnWidth) - 1] then
1033 FBBSColumnWidth[index] := value;
1036 procedure TSetting.SetCategoryColumnWidth(index: Integer; value: Integer);
1038 if index in [0..Length(FCategoryColumnWidth) - 1] then
1039 FCategoryColumnWidth[index] := value;
1042 procedure TSetting.SetBoardColumnWidth(index: Integer; value: Integer);
1044 if index in [0..Length(FBoardColumnWidth) - 1] then
1045 FBoardColumnWidth[index] := value;
1048 function TSetting.GetSoundCount: Integer;
1050 Result := Length(SOUND_NAME);
1053 function TSetting.GetSoundName(Index: Integer): string;
1055 if (Index < GetSoundCount) and (Index >= 0) then
1056 Result := SOUND_NAME[Index].Name
1061 function TSetting.GetSoundViewName(Index: Integer): string;
1063 if (Index < GetSoundCount) and (Index >= 0) then
1064 Result := SOUND_NAME[Index].ViewName
1069 function TSetting.GetSoundFileName(Index: Integer): string;
1071 if (Index < GetSoundCount) and (Index >= 0) then
1072 Result := SOUND_NAME[Index].FileName
1077 procedure TSetting.SetSoundFileName(Index: Integer; value: string);
1079 if (Index < GetSoundCount) and (Index >= 0) then
1080 SOUND_NAME[Index].FileName := value;
1083 function TSetting.FindSoundFileName(Name: string): string;
1087 for i := 0 to GetSoundCount - 1 do begin
1088 if SoundName[i] = Name then begin
1089 Result := SoundFileName[i];
1096 function TSetting.Encrypt(s: string): string;
1098 cryptObj: THogeCryptAuto;
1099 inputStream, outputStream: TStringStream;
1101 inputStream := TStringStream.Create(s);
1102 outputStream := TStringStream.Create('');
1103 cryptObj := THogeCryptAuto.Create;
1106 cryptObj.Encrypt(inputStream, GIKO_ENCRYPT_TEXT, outputStream);
1108 //
\83o
\83C
\83i
\83\8a\82È
\82Ì
\82Å
\95K
\97v
\82É
\89\9e\82¶
\82Ä
\83e
\83L
\83X
\83g
\82É
\95Ï
\8a·
1109 Result := HogeBase64Encode(outputStream.DataString);
1117 function TSetting.Decrypt(s: string): string;
1119 cryptObj: THogeCryptAuto;
1120 inputStream, outputStream: TStringStream;
1123 inputStream := TStringStream.Create(HogeBase64Decode(s));
1128 outputStream := TStringStream.Create('');
1129 cryptObj := THogeCryptAuto.Create;
1132 cryptObj.Decrypt(inputStream, GIKO_ENCRYPT_TEXT, outputStream);
1133 Result := outputStream.DataString;
1141 function TSetting.GetMainCoolSet(Index: Integer): TCoolSet;
1143 if Index in [0..MAIN_COOLBAND_COUNT - 1] then
1144 Result := FMainCoolBar[Index]
1146 Result.FCoolID := -1;
1147 Result.FCoolWidth := -1;
1148 Result.FCoolBreak := False;
1152 function TSetting.GetBoardCoolSet(Index: Integer): TCoolSet;
1154 if Index in [0..LIST_COOLBAND_COUNT - 1] then
1155 Result := FListCoolBar[Index]
1157 Result.FCoolID := -1;
1158 Result.FCoolWidth := -1;
1159 Result.FCoolBreak := False;
1163 function TSetting.GetBrowserCoolSet(Index: Integer): TCoolSet;
1165 if Index in [0..BROWSER_COOLBAND_COUNT - 1] then
1166 Result := FBrowserCoolBar[Index]
1168 Result.FCoolID := -1;
1169 Result.FCoolWidth := -1;
1170 Result.FCoolBreak := False;
1174 procedure TSetting.SetMainCoolSet(Index: Integer; CoolSet: TCoolSet);
1176 if Index in [0..MAIN_COOLBAND_COUNT - 1] then
1177 FMainCoolBar[Index] := CoolSet;
1180 procedure TSetting.SetBoardCoolSet(Index: Integer; CoolSet: TCoolSet);
1182 if Index in [0..LIST_COOLBAND_COUNT - 1] then
1183 FListCoolBar[Index] := CoolSet;
1186 procedure TSetting.SetBrowserCoolSet(Index: Integer; CoolSet: TCoolSet);
1188 if Index in [0..BROWSER_COOLBAND_COUNT - 1] then
1189 FBrowserCoolBar[Index] := CoolSet;