| 184 |
FSelectTextList: TStringList; |
FSelectTextList: TStringList; |
| 185 |
|
|
| 186 |
//板一覧URL |
//板一覧URL |
| 187 |
FBoardURL2ch: string; |
//FBoardURL2ch: string; |
| 188 |
|
FBoardURLs: TStringList; |
| 189 |
|
FBoardURLSelected: Integer; |
| 190 |
|
|
| 191 |
//ユーザID・パスワード |
//ユーザID・パスワード |
| 192 |
FUserID: string; |
FUserID: string; |
| 234 |
FTimeAdjustSec: Integer; |
FTimeAdjustSec: Integer; |
| 235 |
FTimeAdjust: Boolean; |
FTimeAdjust: Boolean; |
| 236 |
|
|
| 237 |
//あぼ〜ん |
//あぼ〜ん |
| 238 |
FAbonDeleterlo : Boolean; //&rlo;を削るか |
FAbonDeleterlo : Boolean; //&rlo;を削るか |
| 239 |
FAbonReplaceul : Boolean; //<ul>タグを<br>タグに置換するか |
FAbonReplaceul : Boolean; //<ul>タグを<br>タグに置換するか |
| 240 |
FPopUpAbon : Boolean; //レスポップアップ時のあぼ〜ん有効 |
FPopUpAbon : Boolean; //レスポップアップ時のあぼ〜ん有効 |
| 241 |
FShowNGLinesNum : Boolean; //該当したNGワードファイルの行数を表示 |
FShowNGLinesNum : Boolean; //該当したNGワードファイルの行数を表示 |
| 242 |
FAddResAnchor : Boolean; //NGレスへのレスアンカーを追加する |
FAddResAnchor : Boolean; //NGレスへのレスアンカーを追加する |
| 243 |
|
|
| 244 |
// スレッド絞込フィールドの幅 |
// スレッド絞込フィールドの幅 |
| 245 |
FSelectComboBoxWidth : Integer; |
FSelectComboBoxWidth : Integer; |
| 246 |
|
|
| 247 |
// 最後に選択されたオプションダイアログのタブ |
// 最後に選択されたオプションダイアログのタブ |
| 248 |
FOptionDialogTabIndex: Integer; |
FOptionDialogTabIndex: Integer; |
| 249 |
|
|
| 250 |
// 最後に選択されたキャビネット |
// 最後に選択されたキャビネット |
| 251 |
FCabinetIndex: Integer; |
FCabinetIndex: Integer; |
| 252 |
|
|
| 253 |
function GetMainCoolSet(Index: Integer): TCoolSet; |
function GetMainCoolSet(Index: Integer): TCoolSet; |
| 254 |
function GetBoardCoolSet(Index: Integer): TCoolSet; |
function GetBoardCoolSet(Index: Integer): TCoolSet; |
| 270 |
procedure SetSoundFileName(Index: Integer; value: string); |
procedure SetSoundFileName(Index: Integer; value: string); |
| 271 |
function Encrypt(s: string): string; |
function Encrypt(s: string): string; |
| 272 |
function Decrypt(s: string): string; |
function Decrypt(s: string): string; |
| 273 |
|
|
| 274 |
|
procedure MakeURLIniFile(); |
| 275 |
protected |
protected |
| 276 |
|
|
| 277 |
public |
public |
| 278 |
constructor Create; |
constructor Create; |
| 279 |
destructor Destroy; override; |
destructor Destroy; override; |
| 280 |
function GetFileName: string; |
function GetFileName: string; |
| 281 |
|
function GetBoardURLFileName: string; |
| 282 |
procedure ReadSettingFile; |
procedure ReadSettingFile; |
| 283 |
|
procedure ReadBoardURLsFile; |
| 284 |
procedure WriteSystemSettingFile; |
procedure WriteSystemSettingFile; |
| 285 |
procedure WriteWindowSettingFile; |
procedure WriteWindowSettingFile; |
| 286 |
procedure WriteNameMailSettingFile; |
procedure WriteNameMailSettingFile; |
| 287 |
procedure WriteFolderSettingFile(); |
procedure WriteFolderSettingFile(); |
| 288 |
|
procedure WriteBoardURLSettingFile; |
| 289 |
function GetSoundCount: Integer; |
function GetSoundCount: Integer; |
| 290 |
function FindSoundFileName(Name: string): string; |
function FindSoundFileName(Name: string): string; |
| 291 |
|
|
| 414 |
property SoundViewName[index: Integer]: string read GetSoundViewName; |
property SoundViewName[index: Integer]: string read GetSoundViewName; |
| 415 |
property SoundFileName[index: Integer]: string read GetSoundFileName write SetSoundFileName; |
property SoundFileName[index: Integer]: string read GetSoundFileName write SetSoundFileName; |
| 416 |
|
|
| 417 |
property BoardURL2ch: string read FBoardURL2ch write FBoardURL2ch; |
//property BoardURL2ch: string read FBoardURL2ch write FBoardURL2ch; |
| 418 |
|
property BoardURLs: TStringList read FBoardURLs write FBoardURLs; |
| 419 |
|
property BoardURLSelected: Integer read FBoardURLSelected write FBoardURLSelected; |
| 420 |
property UserID: string read FUserID write FUserID; |
property UserID: string read FUserID write FUserID; |
| 421 |
property Password: string read FPassword write FPassword; |
property Password: string read FPassword write FPassword; |
| 422 |
property AutoLogin: Boolean read FAutoLogin write FAutoLogin; |
property AutoLogin: Boolean read FAutoLogin write FAutoLogin; |
| 483 |
|
|
| 484 |
const |
const |
| 485 |
INI_FILE_NAME: string = 'gikoNavi.ini'; |
INI_FILE_NAME: string = 'gikoNavi.ini'; |
| 486 |
|
BOARD_URL_INI_FILE_NAME: string = 'url.ini'; |
| 487 |
DEFAULT_FONT_NAME: string = 'MS Pゴシック'; |
DEFAULT_FONT_NAME: string = 'MS Pゴシック'; |
| 488 |
DEFAULT_FONT_SIZE: Integer = 9; |
DEFAULT_FONT_SIZE: Integer = 9; |
| 489 |
DEFAULT_FONT_COLOR: string = 'clWindowText'; |
DEFAULT_FONT_COLOR: string = 'clWindowText'; |
| 490 |
DEFAULT_WINDOW_COLOR: string = 'clWindow'; |
DEFAULT_WINDOW_COLOR: string = 'clWindow'; |
| 491 |
DEFAULT_TAB_FONT_NAME: string = 'MS Pゴシック'; |
DEFAULT_TAB_FONT_NAME: string = 'MS Pゴシック'; |
| 492 |
DEFAULT_TAB_FONT_SIZE: Integer = 9; |
DEFAULT_TAB_FONT_SIZE: Integer = 9; |
| 493 |
DEFAULT_2CH_BOARD_URL: string = 'http://www6.ocn.ne.jp/~mirv/2chmenu.html'; |
DEFAULT_2CH_BOARD_URL1: string = 'http://www6.ocn.ne.jp/~mirv/2chmenu.html'; |
| 494 |
|
DEFAULT_2CH_BOARD_URL2: string = 'http://www.ff.iij4u.or.jp/~ch2/bbstable.html'; |
| 495 |
//'http://www.2ch.net/newbbsmenu.html'; |
//'http://www.2ch.net/newbbsmenu.html'; |
| 496 |
GIKO_ENCRYPT_TEXT: string = 'gikoNaviEncryptText'; |
GIKO_ENCRYPT_TEXT: string = 'gikoNaviEncryptText'; |
| 497 |
|
|
| 511 |
FNameList := TStringList.Create; |
FNameList := TStringList.Create; |
| 512 |
FMailList := TStringList.Create; |
FMailList := TStringList.Create; |
| 513 |
FSelectTextList := TStringList.Create; |
FSelectTextList := TStringList.Create; |
| 514 |
|
FBoardURLs := TStringList.Create; |
| 515 |
FNameList.Duplicates := dupIgnore; |
FNameList.Duplicates := dupIgnore; |
| 516 |
FMailList.Duplicates := dupIgnore; |
FMailList.Duplicates := dupIgnore; |
| 517 |
|
FBoardURLs.Duplicates := dupIgnore; |
| 518 |
FSelectTextList.Duplicates := dupIgnore; |
FSelectTextList.Duplicates := dupIgnore; |
| 519 |
ReadSettingFile(); |
ReadSettingFile(); |
| 520 |
|
ReadBoardURLsFile(); |
| 521 |
end; |
end; |
| 522 |
|
|
| 523 |
//デストラクタ |
//デストラクタ |
| 525 |
begin |
begin |
| 526 |
inherited; |
inherited; |
| 527 |
FSelectTextList.Free; |
FSelectTextList.Free; |
| 528 |
|
FBoardURLs.Free; |
| 529 |
FMailList.Free; |
FMailList.Free; |
| 530 |
FNameList.Free; |
FNameList.Free; |
| 531 |
end; |
end; |
| 536 |
Result := ExtractFilePath(Application.ExeName) + INI_FILE_NAME; |
Result := ExtractFilePath(Application.ExeName) + INI_FILE_NAME; |
| 537 |
end; |
end; |
| 538 |
|
|
| 539 |
|
//板更新用URL設定ファイル名(パス+ファイル名) |
| 540 |
|
function TSetting.GetBoardURLFileName(): string; |
| 541 |
|
begin |
| 542 |
|
Result := ExtractFilePath(Application.ExeName) + BOARD_URL_INI_FILE_NAME; |
| 543 |
|
end; |
| 544 |
|
|
| 545 |
//設定ファイル読込 |
//設定ファイル読込 |
| 546 |
procedure TSetting.ReadSettingFile(); |
procedure TSetting.ReadSettingFile(); |
| 547 |
const |
const |
| 750 |
NewLogFolder := ''; |
NewLogFolder := ''; |
| 751 |
|
|
| 752 |
//板URL |
//板URL |
| 753 |
FBoardURL2ch := ini.ReadString('BoardURL', '2ch', DEFAULT_2CH_BOARD_URL); |
//複数登録できるようにしてFBoardURLsにした 2003/10/05 |
| 754 |
|
//FBoardURL2ch := ini.ReadString('BoardURL', '2ch', DEFAULT_2CH_BOARD_URL); |
| 755 |
|
|
| 756 |
//認証用ユーザID・パスワード |
//認証用ユーザID・パスワード |
| 757 |
FUserID := ini.ReadString('Attestation', 'UserID', ''); |
FUserID := ini.ReadString('Attestation', 'UserID', ''); |
| 835 |
ini.Free; |
ini.Free; |
| 836 |
end; |
end; |
| 837 |
end; |
end; |
| 838 |
|
//板更新用URL読み込み |
| 839 |
|
procedure TSetting.ReadBoardURLsFile(); |
| 840 |
|
var |
| 841 |
|
ini: TMemIniFile; |
| 842 |
|
urlNum: Integer; |
| 843 |
|
i : Integer; |
| 844 |
|
begin |
| 845 |
|
if not FileExists(GetBoardURLFileName()) then |
| 846 |
|
MakeURLIniFile(); |
| 847 |
|
ini := TMemIniFile.Create(GetBoardURLFileName()); |
| 848 |
|
try |
| 849 |
|
urlNum := ini.ReadInteger('URL','count',0); |
| 850 |
|
BoardURLSelected := ini.ReadInteger('URL','selected',0); |
| 851 |
|
for i := 0 to urlNum - 1 do begin |
| 852 |
|
FBoardURLs.Append(ini.ReadString('URL',IntToStr(i+1),'')); |
| 853 |
|
end; |
| 854 |
|
finally |
| 855 |
|
ini.Free; |
| 856 |
|
end; |
| 857 |
|
|
| 858 |
|
end; |
| 859 |
//設定ファイル保存(system) |
//設定ファイル保存(system) |
| 860 |
procedure TSetting.WriteSystemSettingFile(); |
procedure TSetting.WriteSystemSettingFile(); |
| 861 |
var |
var |
| 1005 |
//レスポップアップヘッダーボールド |
//レスポップアップヘッダーボールド |
| 1006 |
ini.WriteBool('Thread', 'ResPopupHeaderBold', FResPopupHeaderBold); |
ini.WriteBool('Thread', 'ResPopupHeaderBold', FResPopupHeaderBold); |
| 1007 |
|
|
| 1008 |
ini.WriteString('BoardURL', '2ch', FBoardURL2ch); |
//ini.WriteString('BoardURL', '2ch', FBoardURL2ch); |
| 1009 |
|
|
| 1010 |
//認証用ユーザID・パスワード |
//認証用ユーザID・パスワード |
| 1011 |
ini.WriteString('Attestation', 'UserID', FUserID); |
ini.WriteString('Attestation', 'UserID', FUserID); |
| 1143 |
ini.Free; |
ini.Free; |
| 1144 |
end; |
end; |
| 1145 |
end; |
end; |
| 1146 |
|
//板更新用BoardURLを保存 |
| 1147 |
|
procedure TSetting.WriteBoardURLSettingFile(); |
| 1148 |
|
var |
| 1149 |
|
ini: TMemIniFile; |
| 1150 |
|
i : Integer; |
| 1151 |
|
oldcount : Integer; |
| 1152 |
|
begin |
| 1153 |
|
ini := TMemIniFile.Create(GetBoardURLFileName()); |
| 1154 |
|
try |
| 1155 |
|
oldcount := ini.ReadInteger('URL','count',FBoardURLs.Count); |
| 1156 |
|
ini.WriteInteger('URL','count',FBoardURLs.Count); |
| 1157 |
|
ini.WriteInteger('URL','selected',BoardURLSelected); |
| 1158 |
|
for i := 0 to FBoardURLs.Count -1 do begin |
| 1159 |
|
ini.WriteString('URL',IntToStr(i+1),FBoardURLs.Strings[i]); |
| 1160 |
|
end; |
| 1161 |
|
if oldcount > FBoardURLs.Count then begin |
| 1162 |
|
for i := FBoardURLs.Count to oldcount do begin |
| 1163 |
|
ini.DeleteKey('URL',IntToStr(i+1)); |
| 1164 |
|
end; |
| 1165 |
|
end; |
| 1166 |
|
ini.UpdateFile; |
| 1167 |
|
finally |
| 1168 |
|
ini.Free; |
| 1169 |
|
end; |
| 1170 |
|
end; |
| 1171 |
|
|
| 1172 |
//リストカラムヘッダー |
//リストカラムヘッダー |
| 1173 |
function TSetting.GetBBSColumnWidth(index: Integer): Integer; |
function TSetting.GetBBSColumnWidth(index: Integer): Integer; |
| 1347 |
FBrowserCoolBar[Index] := CoolSet; |
FBrowserCoolBar[Index] := CoolSet; |
| 1348 |
end; |
end; |
| 1349 |
|
|
| 1350 |
|
//url.iniがないときに生成する |
| 1351 |
|
procedure TSetting.MakeURLIniFile(); |
| 1352 |
|
var |
| 1353 |
|
ini: TMemIniFile; |
| 1354 |
|
begin |
| 1355 |
|
ini := TMemIniFile.Create(GetBoardURLFileName()); |
| 1356 |
|
try |
| 1357 |
|
ini.WriteInteger('URL','count',2); |
| 1358 |
|
ini.WriteInteger('URL','selected',2); |
| 1359 |
|
ini.WriteString('URL','1',DEFAULT_2CH_BOARD_URL1); |
| 1360 |
|
ini.WriteString('URL','2',DEFAULT_2CH_BOARD_URL2); |
| 1361 |
|
ini.UpdateFile; |
| 1362 |
|
finally |
| 1363 |
|
ini.Free; |
| 1364 |
|
end; |
| 1365 |
|
end; |
| 1366 |
|
|
| 1367 |
end. |
end. |
| 1368 |
|
|