| 1 |
unit Setting; |
unit Setting; |
| 2 |
|
|
| 3 |
|
|
| 4 |
interface |
interface |
| 5 |
|
|
| 6 |
uses |
uses |
| 7 |
SysUtils, Classes, Graphics, Forms, Math, IniFiles, UCryptAuto, UBase64, |
SysUtils, Classes, Graphics, Forms, {Math, IniFiles, UCryptAuto, UBase64,} |
| 8 |
ComCtrls, GestureModel; |
ComCtrls, GestureModel, IniFiles, SkinFiles; |
| 9 |
|
|
| 10 |
const |
const |
| 11 |
MAIN_COOLBAND_COUNT = 4; //メインCoolBandの数 |
MAIN_COOLBAND_COUNT = 4; //メインCoolBandの数 |
| 12 |
LIST_COOLBAND_COUNT = 2; //板CoolBandの数 |
LIST_COOLBAND_COUNT = 2; //板CoolBandの数 |
| 13 |
BROWSER_COOLBAND_COUNT = 3; //ブラウザCoolBandの数 |
BROWSER_COOLBAND_COUNT = 3; //ブラウザCoolBandの数 |
| 14 |
|
|
| 15 |
BOARD_FILE_NAME = 'board.2ch'; |
|
|
CUSTOMBOARD_FILE_NAME = 'custom.2ch'; |
|
|
BOARD_DIR_NAME = 'Board'; |
|
|
KEY_SETTING_FILE_NAME = 'key.ini'; |
|
|
EKEY_SETTING_FILE_NAME = 'Ekey.ini'; |
|
|
TEMP_FOLDER = 'Temp'; |
|
|
OUTBOX_FILE_NAME = 'outbox.ini'; |
|
|
SENT_FILE_NAME = 'sent.ini'; |
|
|
CONFIG_DIR_NAME = 'config'; |
|
|
CSS_DIR_NAME = 'css'; |
|
|
SKIN_DIR_NAME = 'skin'; |
|
|
SKIN_HEADER_FILE_NAME = 'Header.html'; |
|
|
SKIN_FOOTER_FILE_NAME = 'Footer.html'; |
|
|
SKIN_NEWRES_FILE_NAME = 'NewRes.html'; |
|
|
SKIN_RES_FILE_NAME = 'Res.html'; |
|
|
SKIN_BOOKMARK_FILE_NAME = 'Bookmark.html'; |
|
|
SKIN_NEWMARK_FILE_NAME = 'Newmark.html'; |
|
|
NGWORDs_DIR_NAME : String = 'NGwords'; |
|
|
BOARD_PLUGIN_DIR_NAME = 'BoardPlugin'; |
|
|
SAMBATIME_FILE_NAME : String = 'Samba.ini'; |
|
|
IGNORE_FILE_NAME : String = 'Ignore.txt'; |
|
|
// DOLIB_LOGIN_URL = '/~tora3n2c/futen.cgi'; |
|
|
MAX_POPUP_RES : Integer = 10; |
|
|
GESTURE_FILE_NAME = 'Gestures.ini'; |
|
|
SPAMFILTER_FILE_NAME = 'SpamFilter.ini'; |
|
|
LANGUAGE_FILE_NAME = 'language.ini'; |
|
|
|
|
| 16 |
type |
type |
| 17 |
TGikoTabPosition = (gtpTop, gtpBottom); // タブ位置 |
TGikoTabPosition = (gtpTop, gtpBottom); // タブ位置 |
| 18 |
TGikoTabAppend = (gtaFirst, gtpLast); // タブ追加位置 |
TGikoTabAppend = (gtaFirst, gtaLast, gtaRight, gtaLeft); // タブ追加位置 |
| 19 |
TGikoTabStyle = (gtsTab, gtsButton, gtsFlat); // タブスタイル |
TGikoTabStyle = (gtsTab, gtsButton, gtsFlat); // タブスタイル |
| 20 |
TGikoListOrientation = (gloHorizontal, gloVertical); // リスト垂直・水平 |
TGikoListOrientation = (gloHorizontal, gloVertical); // リスト垂直・水平 |
| 21 |
TGikoListState = (glsMax, glsNormal, glsMin); // リストサイズ状態 |
TGikoListState = (glsMax, glsNormal, glsMin); // リストサイズ状態 |
| 22 |
// ポップアップ表示位置 |
// ポップアップ表示位置 |
| 23 |
TGikoPopupPosition = (gppRightTop, gppTop, gppLeftTop, |
TGikoPopupPosition = (gppLeftTop = 0, gppTop, gppRightTop, |
| 24 |
gppRight, gppCenter, gppLeft, |
gppLeft, gppCenter, gppRight, |
| 25 |
gppRightBottom, gppBottom, gppLeftBottom); |
gppLeftBottom, gppBottom, gppRightBottom); |
| 26 |
//プレビューサイズ |
//プレビューサイズ |
| 27 |
TGikoPreviewSize = (gpsXLarge, gpsLarge, gpsMedium, gpsSmall, gpsXSmall); |
TGikoPreviewSize = (gpsXLarge, gpsLarge, gpsMedium, gpsSmall, gpsXSmall); |
| 28 |
TGikoBrowserAutoMaximize = (gbmNone, gbmClick, gbmDoubleClick); |
TGikoBrowserAutoMaximize = (gbmNone, gbmClick, gbmDoubleClick); |
| 32 |
TGikoResRange = (grrAll, grrSelect, grrKoko, grrNew); |
TGikoResRange = (grrAll, grrSelect, grrKoko, grrNew); |
| 33 |
|
|
| 34 |
/// スレッド一覧表示範囲 |
/// スレッド一覧表示範囲 |
| 35 |
TGikoThreadRange = (gtrAll, gtrSelect, gtrLog, gtrNew); |
TGikoThreadRange = (gtrAll, gtrSelect, gtrLog, gtrNew, gtrLive, gtrArch); |
| 36 |
|
|
| 37 |
//! スパムフィルターアルゴリズム |
//! スパムフィルターアルゴリズム |
| 38 |
TGikoSpamFilterAlgorithm = ( |
TGikoSpamFilterAlgorithm = ( |
| 73 |
end; |
end; |
| 74 |
/// スレリストのカラム ID |
/// スレリストのカラム ID |
| 75 |
type TGikoBoardColumnID = (gbcTitle, gbcAllCount, gbcLocalCount, gbcNonAcqCount, |
type TGikoBoardColumnID = (gbcTitle, gbcAllCount, gbcLocalCount, gbcNonAcqCount, |
| 76 |
gbcNewCount, gbcUnReadCount, gbcRoundName, gbcRoundDate, gbcCreated, gbcLastModified );{gbcLastModified,} |
gbcNewCount, gbcUnReadCount, gbcRoundName, gbcRoundDate, gbcCreated, gbcLastModified, gbcVigor );{gbcLastModified,} |
| 77 |
/// スレリストのカラム名 |
/// スレリストのカラム名 |
| 78 |
const GikoBoardColumnCaption : array[0..9] of string = |
const GikoBoardColumnCaption : array[0..10] of string = |
| 79 |
( 'スレッド名', 'カウント', '取得', '未取得', '新着', |
( 'スレッド名', 'カウント', '取得', '未取得', '新着', |
| 80 |
'未読', '巡回予約', '取得日時', 'スレ作成日時', '最終更新日時' ); |
'未読', '巡回予約', '取得日時', 'スレ作成日時', '最終更新日時', '勢い' ); |
| 81 |
const GikoBoardColumnAlignment : array[0..9] of TAlignment = ( |
const GikoBoardColumnAlignment : array[0..10] of TAlignment = ( |
| 82 |
taLeftJustify, taRightJustify, taRightJustify, taRightJustify, |
taLeftJustify, taRightJustify, taRightJustify, taRightJustify, |
| 83 |
taRightJustify, taRightJustify, taLeftJustify, taLeftJustify, |
taRightJustify, taRightJustify, taLeftJustify, taLeftJustify, |
| 84 |
taLeftJustify, taLeftJustify); |
taLeftJustify, taLeftJustify, taRightJustify); |
| 85 |
/// スレリストカラム配列 |
/// スレリストカラム配列 |
| 86 |
type TGikoBoardColumnList = class( TList ) |
type TGikoBoardColumnList = class( TList ) |
| 87 |
private |
private |
| 232 |
FListViewNo: Boolean; |
FListViewNo: Boolean; |
| 233 |
//CSS表示 |
//CSS表示 |
| 234 |
FUseCSS: Boolean; |
FUseCSS: Boolean; |
|
//CSSファイル名 |
|
|
FCSSFileName: string; |
|
| 235 |
// スキン表示(一時的なもので ini に保存はされない) |
// スキン表示(一時的なもので ini に保存はされない) |
| 236 |
FUseSkin: Boolean; |
FUseSkin: Boolean; |
| 237 |
|
//かちゅ〜しゃ用のSkinを利用するか |
| 238 |
|
FUseKatjushaType : Boolean; |
| 239 |
//mail欄表示 |
//mail欄表示 |
| 240 |
FShowMail: Boolean; |
FShowMail: Boolean; |
| 241 |
/// レス表示範囲 |
/// レス表示範囲 |
| 257 |
//リストカラムヘッダーサイズ |
//リストカラムヘッダーサイズ |
| 258 |
FBBSColumnWidth: array[0..0] of Integer; |
FBBSColumnWidth: array[0..0] of Integer; |
| 259 |
FCategoryColumnWidth: array[0..2] of Integer; |
FCategoryColumnWidth: array[0..2] of Integer; |
| 260 |
FBoardColumnWidth: array[0..9] of Integer; |
FBoardColumnWidth: array[0..10] of Integer; |
| 261 |
|
|
| 262 |
/// カテゴリリストカラム順序 |
/// カテゴリリストカラム順序 |
| 263 |
FBBSColumnOrder : TGikoBBSColumnList; |
FBBSColumnOrder : TGikoBBSColumnList; |
| 348 |
FPopUpAbon : Boolean; //レスポップアップ時のあぼ〜ん有効 |
FPopUpAbon : Boolean; //レスポップアップ時のあぼ〜ん有効 |
| 349 |
FShowNGLinesNum : Boolean; //該当したNGワードファイルの行数を表示 |
FShowNGLinesNum : Boolean; //該当したNGワードファイルの行数を表示 |
| 350 |
FAddResAnchor : Boolean; //NGレスへのレスアンカーを追加する |
FAddResAnchor : Boolean; //NGレスへのレスアンカーを追加する |
| 351 |
FDeleteSyria : Boolean; //シリア語ブラクラ対策 |
FDeleteSyria : Boolean; //シリア語ブラクラ対策 |
| 352 |
|
FIgnoreKana : Boolean; //全半角ひらカナの違いを無視するか |
| 353 |
|
|
| 354 |
// スレッド絞込フィールドの幅 |
// スレッド絞込フィールドの幅 |
| 355 |
FSelectComboBoxWidth : Integer; |
FSelectComboBoxWidth : Integer; |
| 378 |
|
|
| 379 |
//Tab自動保存 |
//Tab自動保存 |
| 380 |
FTabAutoLoadSave : Boolean; |
FTabAutoLoadSave : Boolean; |
| 381 |
|
//最後に開いていたスレッドのURL |
| 382 |
|
FLastCloseTabURL: String; |
| 383 |
//にちゃん語案内サポート機能 |
//にちゃん語案内サポート機能 |
| 384 |
F2chSupport : Boolean; |
F2chSupport : Boolean; |
| 385 |
|
|
| 397 |
FGestures : TGestureModel; |
FGestures : TGestureModel; |
| 398 |
//! マウスジェスチャーを使用するかどうか |
//! マウスジェスチャーを使用するかどうか |
| 399 |
FGestureEnabled : Boolean; |
FGestureEnabled : Boolean; |
| 400 |
|
//! マウスジェスチャーをコンテキスト等の上で無効 |
| 401 |
//2ch言語設定 |
FGestureIgnoreContext : Boolean; |
|
//F2chLanguage : TStringList; |
|
|
|
|
| 402 |
//フシアナトラップ設定 |
//フシアナトラップ設定 |
| 403 |
FLocalTrapAtt : Boolean; |
FLocalTrapAtt : Boolean; |
| 404 |
FRemoteTrapAtt : Boolean; |
FRemoteTrapAtt : Boolean; |
| 410 |
FMute: Boolean; |
FMute: Boolean; |
| 411 |
//スレ絞込みで未確定文字も有効にするか |
//スレ絞込みで未確定文字も有効にするか |
| 412 |
FUseUndecided: Boolean; |
FUseUndecided: Boolean; |
|
//MessageListに出力されるメッセージ |
|
|
FMessageList : array[0..13] of string; |
|
| 413 |
|
|
| 414 |
//Be2ch |
//Be2ch |
| 415 |
//認証用ユーザID・パスワード |
//認証用ユーザID・パスワード |
| 416 |
FBeUserID: String; |
FBeUserID: String; |
| 417 |
FBeCode: String; |
FBePassword: String; |
| 418 |
FBeAutoLogin: Boolean; |
FBeAutoLogin: Boolean; |
| 419 |
FBeLogin: Boolean; |
FBeLogin: Boolean; |
| 420 |
//履歴の最大保存件数 |
//履歴の最大保存件数 |
| 421 |
FMaxRecordCount : Integer; |
FMaxRecordCount : Integer; |
| 422 |
|
|
| 423 |
|
//スレッド一覧をダウンロード後にソートするか |
| 424 |
|
FAutoSortThreadList : Boolean; |
| 425 |
|
|
| 426 |
|
//InputAssistフォームの位置 |
| 427 |
|
FInputAssistFormLeft :Integer; |
| 428 |
|
FInputAssistFormTop :Integer; |
| 429 |
|
//InputAssistフォームのサイズ |
| 430 |
|
FInputAssistFormWidth: Integer; |
| 431 |
|
FInputAssistFormHeight: Integer; |
| 432 |
|
|
| 433 |
|
//! Cookieに付加する固定コード |
| 434 |
|
FFixedCookie: String; |
| 435 |
|
//! リンク移動履歴の保持数 |
| 436 |
|
FMoveHistorySize : Integer; |
| 437 |
|
//! 最小化したときにタスクトレイに格納するか |
| 438 |
|
FStoredTaskTray : Boolean; |
| 439 |
|
//! タブの移動でループを許可する |
| 440 |
|
FLoopBrowserTabs : Boolean; |
| 441 |
|
//! 100レス表示の先頭表示レス数 |
| 442 |
|
FHeadResCount : Integer; |
| 443 |
|
//! 100レス表示数(拡張用) |
| 444 |
|
FResRangeExCount: Integer; |
| 445 |
|
//! 関連キーワード追加フラグ |
| 446 |
|
FAddKeywordLink: Boolean; |
| 447 |
|
//! dat置換を有効にする |
| 448 |
|
FReplaceDat: Boolean; |
| 449 |
|
//! sent.iniファイルのサイズ(単位MB) |
| 450 |
|
FSentIniFileSize: Integer; |
| 451 |
|
//! リンクURL取得の対象拡張子 |
| 452 |
|
FExtList: String; |
| 453 |
|
//! Skin関連 |
| 454 |
|
FSkinFiles: TSkinFiles; |
| 455 |
|
//! indexファイルを読み時にdatを検索する |
| 456 |
|
FCheckDatFile: Boolean; |
| 457 |
|
//! 同IDレスアンカー表示 |
| 458 |
|
FLimitResCountMessage: Boolean; |
| 459 |
|
//! レスポップアップ表示位置deltaX |
| 460 |
|
FRespopupDeltaX: Integer; |
| 461 |
|
//! レスポップアップ表示位置deltaY |
| 462 |
|
FRespopupDeltaY: Integer; |
| 463 |
|
//! レスポップアップタイマー |
| 464 |
|
FRespopupWait: Integer; |
| 465 |
|
//! メール欄レスポップアップ |
| 466 |
|
FRespopupMailTo: Boolean; |
| 467 |
|
//! 誤爆チェック |
| 468 |
|
FUseGobakuCheck: Boolean; |
| 469 |
|
|
| 470 |
|
//! 冒険の書用Cookie |
| 471 |
|
FBoukenCookieList: TStringList; |
| 472 |
|
|
| 473 |
function GetMainCoolSet(Index: Integer): TCoolSet; |
function GetMainCoolSet(Index: Integer): TCoolSet; |
| 474 |
function GetBoardCoolSet(Index: Integer): TCoolSet; |
function GetBoardCoolSet(Index: Integer): TCoolSet; |
| 475 |
function GetBrowserCoolSet(Index: Integer): TCoolSet; |
function GetBrowserCoolSet(Index: Integer): TCoolSet; |
| 495 |
|
|
| 496 |
procedure SetUseCSS( value: Boolean ); |
procedure SetUseCSS( value: Boolean ); |
| 497 |
procedure SetCSSFileName( fileName: string ); |
procedure SetCSSFileName( fileName: string ); |
| 498 |
|
function GetCSSFileName: string; |
| 499 |
|
//! プロキシ設定読み込み |
| 500 |
|
procedure ReadProxySettings(memIni: TMemIniFile); |
| 501 |
|
//! 各種ウィンドウ設定読み込み |
| 502 |
|
procedure ReadWindowSettings(memIni: TMemIniFile); |
| 503 |
|
//! 入力履歴読み込み(検索+メール欄+名前) |
| 504 |
|
procedure ReadInputHisotrys(memIni: TMemIniFile); |
| 505 |
|
//! リストカラム幅読み込み |
| 506 |
|
procedure ReadListColumnWidth(memIni: TMemIniFile); |
| 507 |
|
//! カテゴリリストカラム順序読み込み |
| 508 |
|
procedure ReadOrdColumn(memIni: TMemIniFile); |
| 509 |
protected |
protected |
| 510 |
|
|
| 511 |
public |
public |
| 520 |
procedure WriteNameMailSettingFile; |
procedure WriteNameMailSettingFile; |
| 521 |
procedure WriteFolderSettingFile(); |
procedure WriteFolderSettingFile(); |
| 522 |
procedure WriteBoardURLSettingFile; |
procedure WriteBoardURLSettingFile; |
| 523 |
|
procedure WriteBoukenSettingFile; |
| 524 |
function GetSoundCount: Integer; |
function GetSoundCount: Integer; |
| 525 |
function FindSoundFileName(Name: string): string; |
function FindSoundFileName(Name: string): string; |
| 526 |
|
|
| 533 |
function GetSentFileName: string; |
function GetSentFileName: string; |
| 534 |
function GetConfigDir: string; |
function GetConfigDir: string; |
| 535 |
function GetSkinDir: string; |
function GetSkinDir: string; |
|
function GetSkinHeaderFileName: string; |
|
|
function GetSkinFooterFileName: string; |
|
|
function GetSkinResFileName: string; |
|
|
function GetSkinNewResFileName: string; |
|
|
function GetSkinBookmarkFileName: string; |
|
|
function GetSkinNewmarkFileName: string; |
|
| 536 |
function GetStyleSheetDir: string; |
function GetStyleSheetDir: string; |
| 537 |
function GetOutBoxFileName: string; |
function GetOutBoxFileName: string; |
| 538 |
function GetNGWordsDir: string; |
function GetNGWordsDir: string; |
| 541 |
function GetIgnoreFileName: string; |
function GetIgnoreFileName: string; |
| 542 |
function GetGestureFileName : string; |
function GetGestureFileName : string; |
| 543 |
function GetSpamFilterFileName : string; |
function GetSpamFilterFileName : string; |
| 544 |
function GetLanguageFileName: string; |
function GetLanguageFileName: string; |
| 545 |
procedure SetMessages; |
function GetMainKeyFileName: String; |
| 546 |
function GetMessage(AType :Integer): string; |
function GetEditorKeyFileName: String; |
| 547 |
procedure WriteLogFolder(AVal : String); |
procedure WriteLogFolder(AVal : String); |
| 548 |
|
function GetInputAssistFileName : String; |
| 549 |
|
function GetReplaceFileName: String; |
| 550 |
|
function GetExtprevieFileName: String; |
| 551 |
|
function GetBoukenCookie(AHostName: String): String; |
| 552 |
|
procedure SetBoukenCookie(ACookieValue, AHostName: String); |
| 553 |
|
procedure GetBouken(AHostName: String; var Domain:String; var Cookie:String); |
| 554 |
|
{ |
| 555 |
|
\brief リンク履歴の保持サイズのsetter |
| 556 |
|
\param AVal 設定するサイズ( >0) |
| 557 |
|
} |
| 558 |
|
procedure SetMoveHistorySize(AVal : Integer); |
| 559 |
//受信バッファサイズ |
//受信バッファサイズ |
| 560 |
property RecvBufferSize: Integer read FRecvBufferSize write FRecvBufferSize; |
property RecvBufferSize: Integer read FRecvBufferSize write FRecvBufferSize; |
| 561 |
//HTTP1.1使用 |
//HTTP1.1使用 |
| 665 |
|
|
| 666 |
property ListViewNo: Boolean read FListViewNo write FListViewNo; |
property ListViewNo: Boolean read FListViewNo write FListViewNo; |
| 667 |
property UseCSS: Boolean read FUseCSS write SetUseCSS; |
property UseCSS: Boolean read FUseCSS write SetUseCSS; |
| 668 |
property CSSFileName: string read FCSSFileName write SetCSSFileName; |
property CSSFileName: string read GetCSSFileName write SetCSSFileName; |
| 669 |
|
property UseKatjushaType : Boolean read FUseKatjushaType write FUseKatjushaType; |
| 670 |
property UseSkin: Boolean read FUseSkin; |
property UseSkin: Boolean read FUseSkin; |
| 671 |
|
|
| 672 |
property ShowMail: Boolean read FShowMail write FShowMail; |
property ShowMail: Boolean read FShowMail write FShowMail; |
| 752 |
property ShowNGLinesNum : Boolean read FShowNGLinesNum write FShowNGLinesNum; |
property ShowNGLinesNum : Boolean read FShowNGLinesNum write FShowNGLinesNum; |
| 753 |
property AddResAnchor : Boolean read FAddResAnchor write FAddResAnchor; |
property AddResAnchor : Boolean read FAddResAnchor write FAddResAnchor; |
| 754 |
property DeleteSyria : Boolean read FDeleteSyria write FDeleteSyria; |
property DeleteSyria : Boolean read FDeleteSyria write FDeleteSyria; |
| 755 |
|
property IgnoreKana : Boolean read FIgnoreKana write FIgnoreKana; |
| 756 |
// スレッド絞込フィールドの幅 |
// スレッド絞込フィールドの幅 |
| 757 |
property SelectComboBoxWidth : Integer read FSelectComboBoxWidth write FSelectComboBoxWidth; |
property SelectComboBoxWidth : Integer read FSelectComboBoxWidth write FSelectComboBoxWidth; |
| 758 |
|
|
| 779 |
property SelectInterval : Integer read FSelectInterval write FSelectInterval; |
property SelectInterval : Integer read FSelectInterval write FSelectInterval; |
| 780 |
//Tab保存 |
//Tab保存 |
| 781 |
property TabAutoLoadSave: Boolean read FTabAutoLoadSave write FTabAutoLoadSave; |
property TabAutoLoadSave: Boolean read FTabAutoLoadSave write FTabAutoLoadSave; |
| 782 |
|
//タブの復元とか用 |
| 783 |
|
property LastCloseTabURL: String read FLastCloseTabURL write FLastCloseTabURL; |
| 784 |
//property Gengo: TStringList read F2chLanguage write F2chLanguage; |
//property Gengo: TStringList read F2chLanguage write F2chLanguage; |
| 785 |
property GengoSupport : Boolean read F2chSupport write F2chSupport; |
property GengoSupport : Boolean read F2chSupport write F2chSupport; |
| 786 |
property KuroutSettingTabIndex: Integer read FKuroutSettingTabIndex write FKuroutSettingTabIndex; |
property KuroutSettingTabIndex: Integer read FKuroutSettingTabIndex write FKuroutSettingTabIndex; |
| 788 |
property Gestures : TGestureModel read FGestures write FGestures; |
property Gestures : TGestureModel read FGestures write FGestures; |
| 789 |
//! マウスジェスチャーを使用するかどうか |
//! マウスジェスチャーを使用するかどうか |
| 790 |
property GestureEnabled : Boolean read FGestureEnabled write FGestureEnabled; |
property GestureEnabled : Boolean read FGestureEnabled write FGestureEnabled; |
| 791 |
|
property GestureIgnoreContext : Boolean read FGestureIgnoreContext write FGestureIgnoreContext; |
| 792 |
//フシアナトラップ設定 |
//フシアナトラップ設定 |
| 793 |
property LocalTrapAtt : Boolean read FLocalTrapAtt write FLocalTrapAtt; |
property LocalTrapAtt : Boolean read FLocalTrapAtt write FLocalTrapAtt; |
| 794 |
property RemoteTrapAtt : Boolean read FRemoteTrapAtt write FRemoteTrapAtt; |
property RemoteTrapAtt : Boolean read FRemoteTrapAtt write FRemoteTrapAtt; |
| 800 |
property UseUndecided: Boolean read FUseUndecided write FUseUndecided; |
property UseUndecided: Boolean read FUseUndecided write FUseUndecided; |
| 801 |
|
|
| 802 |
property BeUserID: string read FBeUserID write FBeUserID; |
property BeUserID: string read FBeUserID write FBeUserID; |
| 803 |
property BeCode: string read FBeCode write FBeCode; |
property BePassword: string read FBePassword write FBePassword; |
| 804 |
property BeAutoLogin: Boolean read FBeAutoLogin write FBeAutoLogin; |
property BeAutoLogin: Boolean read FBeAutoLogin write FBeAutoLogin; |
| 805 |
property BeLogin: Boolean read FBeLogin write FBeLogin; |
property BeLogin: Boolean read FBeLogin write FBeLogin; |
| 806 |
property MaxRecordCount : Integer read FMaxRecordCount write FMaxRecordCount; |
property MaxRecordCount : Integer read FMaxRecordCount write FMaxRecordCount; |
| 807 |
|
//! スレッド一覧ダウンロード後にスレッド名で昇順ソートするか |
| 808 |
|
property AutoSortThreadList : Boolean read FAutoSortThreadList write FAutoSortThreadList; |
| 809 |
|
//! InputAssistフォームの位置 |
| 810 |
|
property InputAssistFormLeft :Integer read FInputAssistFormLeft write FInputAssistFormLeft; |
| 811 |
|
property InputAssistFormTop :Integer read FInputAssistFormTop write FInputAssistFormTop; |
| 812 |
|
//! InputAssistフォームのサイズ |
| 813 |
|
property InputAssistFormWidth: Integer read FInputAssistFormWidth write FInputAssistFormWidth; |
| 814 |
|
property InputAssistFormHeight: Integer read FInputAssistFormHeight write FInputAssistFormHeight; |
| 815 |
|
//! Cookieに付加する固定コード |
| 816 |
|
property FixedCookie: String read FFixedCookie write FFixedCookie; |
| 817 |
|
//! リンク移動履歴の保持数 |
| 818 |
|
property MoveHistorySize : Integer read FMoveHistorySize write SetMoveHistorySize; |
| 819 |
|
//! 最小化時にタスクトレイに格納するか |
| 820 |
|
property StoredTaskTray : Boolean read FStoredTaskTray write FStoredTaskTray; |
| 821 |
|
//! ブラウザタブのループを許可する |
| 822 |
|
property LoopBrowserTabs : Boolean read FLoopBrowserTabs write FLoopBrowserTabs; |
| 823 |
|
//! 100レス表示の先頭表示レス数 |
| 824 |
|
property HeadResCount : Integer read FHeadResCount write FHeadResCount; |
| 825 |
|
//! 100レス表示数(拡張用) |
| 826 |
|
property ResRangeExCount: Integer read FResRangeExCount write FResRangeExCount; |
| 827 |
|
//! 関連キーワード追加フラグ |
| 828 |
|
property AddKeywordLink: Boolean read FAddKeywordLink write FAddKeywordLink; |
| 829 |
|
//! datの置換を有効にするか |
| 830 |
|
property ReplaceDat: Boolean read FReplaceDat write FReplaceDat; |
| 831 |
|
//! sent.iniファイルのサイズ(単位MB) |
| 832 |
|
property SentIniFileSize: Integer read FSentIniFileSize write FSentIniFileSize; |
| 833 |
|
//! リンクURL取得の対象拡張子 |
| 834 |
|
property ExtList: String read FExtList write FExtList; |
| 835 |
|
//! Skinファイル管理 |
| 836 |
|
property SkinFiles: TSkinFiles read FSkinFiles; |
| 837 |
|
//! インデックス読み込み時datファイルチェック |
| 838 |
|
property CheckDatFile: Boolean read FCheckDatFile write FCheckDatFile; |
| 839 |
|
property LimitResCountMessage: Boolean read FLimitResCountMessage write FLimitResCountMessage; |
| 840 |
|
//! レスポップアップ表示位置deltaX |
| 841 |
|
property RespopupDeltaX: Integer read FRespopupDeltaX write FRespopupDeltaX; |
| 842 |
|
//! レスポップアップ表示位置deltaY |
| 843 |
|
property RespopupDeltaY: Integer read FRespopupDeltaY write FRespopupDeltaY; |
| 844 |
|
//! レスポップアップタイマー |
| 845 |
|
property RespopupWait: Integer read FRespopupWait write FRespopupWait; |
| 846 |
|
property RespopupMailTo: Boolean read FRespopupMailTo write FRespopupMailTo; |
| 847 |
|
//! 誤爆チェック |
| 848 |
|
property UseGobakuCheck: Boolean read FUseGobakuCheck write FUseGobakuCheck; |
| 849 |
|
//! 冒険の書 |
| 850 |
|
property BoukenCookieList: TStringList read FBoukenCookieList write FBoukenCookieList; |
| 851 |
end; |
end; |
| 852 |
|
|
| 853 |
|
|
| 854 |
|
const |
| 855 |
|
// MAIN_COOLBAND_COUNT = 4; //メインCoolBandの数 |
| 856 |
|
// LIST_COOLBAND_COUNT = 2; //板CoolBandの数 |
| 857 |
|
// BROWSER_COOLBAND_COUNT = 3; //ブラウザCoolBandの数 |
| 858 |
|
|
| 859 |
|
BOARD_FILE_NAME = 'board.2ch'; |
| 860 |
|
CUSTOMBOARD_FILE_NAME = 'custom.2ch'; |
| 861 |
|
BOARD_DIR_NAME = 'Board'; |
| 862 |
|
KEY_SETTING_FILE_NAME = 'key.ini'; |
| 863 |
|
EKEY_SETTING_FILE_NAME = 'Ekey.ini'; |
| 864 |
|
TEMP_FOLDER = 'Temp'; |
| 865 |
|
OUTBOX_FILE_NAME = 'outbox.ini'; |
| 866 |
|
SENT_FILE_NAME = 'sent.ini'; |
| 867 |
|
CONFIG_DIR_NAME = 'config'; |
| 868 |
|
CSS_DIR_NAME = 'css'; |
| 869 |
|
SKIN_DIR_NAME = 'skin'; |
| 870 |
|
NGWORDs_DIR_NAME : String = 'NGwords'; |
| 871 |
|
BOARD_PLUGIN_DIR_NAME = 'BoardPlugin'; |
| 872 |
|
SAMBATIME_FILE_NAME : String = 'Samba.ini'; |
| 873 |
|
IGNORE_FILE_NAME : String = 'Ignore.txt'; |
| 874 |
|
// DOLIB_LOGIN_URL = '/~tora3n2c/futen.cgi'; |
| 875 |
|
MAX_POPUP_RES : Integer = 10; |
| 876 |
|
GESTURE_FILE_NAME = 'Gestures.ini'; |
| 877 |
|
SPAMFILTER_FILE_NAME = 'SpamFilter.ini'; |
| 878 |
|
LANGUAGE_FILE_NAME = 'language.ini'; |
| 879 |
|
INPUTASSIST_FILE_NAME = 'InputAssist.ini'; |
| 880 |
|
FIXED_COOKIE = ''; |
| 881 |
|
REPLACE_FILE_NAME = 'replace.ini'; |
| 882 |
|
EXT_PREVIEW_FILE_NAME = 'extpreview.ini'; |
| 883 |
|
|
| 884 |
implementation |
implementation |
| 885 |
|
|
| 886 |
|
uses |
| 887 |
|
Math, UCryptAuto, UBase64, Windows,GikoUtil; |
| 888 |
|
|
| 889 |
type |
type |
| 890 |
TSoundName = record |
TSoundName = record |
| 891 |
Name: string; |
Name: string; |
| 903 |
DEFAULT_TAB_FONT_NAME: string = 'MS Pゴシック'; |
DEFAULT_TAB_FONT_NAME: string = 'MS Pゴシック'; |
| 904 |
DEFAULT_TAB_FONT_SIZE: Integer = 9; |
DEFAULT_TAB_FONT_SIZE: Integer = 9; |
| 905 |
DEFAULT_2CH_BOARD_URL1: string = 'http://menu.2ch.net/bbsmenu.html'; |
DEFAULT_2CH_BOARD_URL1: string = 'http://menu.2ch.net/bbsmenu.html'; |
|
//OCNを削除しました |
|
|
//DEFAULT_2CH_BOARD_URL2: string = 'http://menu.2ch.net/bbsmenu.html'; |
|
|
//2005/10/1にiij4uの方は消滅 //'http://www.2ch.net/newbbsmenu.html'; |
|
| 906 |
GIKO_ENCRYPT_TEXT: string = 'gikoNaviEncryptText'; |
GIKO_ENCRYPT_TEXT: string = 'gikoNaviEncryptText'; |
| 907 |
|
|
|
DEF_MESSAGES : array[0..13] of string = ( 'ログアウトしました', |
|
|
'ログインしました - ', |
|
|
'強制ログインしました - ', |
|
|
'[スレ一覧取得完了]', |
|
|
'(名称不明)', |
|
|
'[スレ取得完了]', |
|
|
'[スレ差分取得完了]', |
|
|
'[未更新]', |
|
|
'[中断]', |
|
|
'[エラー]', |
|
|
'[レス送信終了]', |
|
|
'[新スレ送信終了]', |
|
|
'[レス送信失敗]', |
|
|
'[新スレ送信失敗]'); |
|
|
|
|
| 908 |
var |
var |
| 909 |
SOUND_NAME: array[0..4] of TSoundName = ( |
SOUND_NAME: array[0..4] of TSoundName = ( |
| 910 |
(Name: 'New'; ViewName: '取得成功'; FileName: ''), |
(Name: 'New'; ViewName: '取得成功'; FileName: ''), |
| 1001 |
FCategoryColumnOrder := TGikoCategoryColumnList.Create; |
FCategoryColumnOrder := TGikoCategoryColumnList.Create; |
| 1002 |
FBoardColumnOrder := TGikoBoardColumnList.Create; |
FBoardColumnOrder := TGikoBoardColumnList.Create; |
| 1003 |
FGestures := TGestureModel.Create; |
FGestures := TGestureModel.Create; |
| 1004 |
|
FSkinFiles := TSkinFiles.Create; |
| 1005 |
FNameList.Duplicates := dupIgnore; |
FNameList.Duplicates := dupIgnore; |
| 1006 |
FMailList.Duplicates := dupIgnore; |
FMailList.Duplicates := dupIgnore; |
| 1007 |
FBoardURLs.Duplicates := dupIgnore; |
FBoardURLs.Duplicates := dupIgnore; |
| 1008 |
FSelectTextList.Duplicates := dupIgnore; |
FSelectTextList.Duplicates := dupIgnore; |
| 1009 |
|
FBoukenCookieList := TStringList.Create; |
| 1010 |
ReadSettingFile(); |
ReadSettingFile(); |
| 1011 |
ReadBoardURLsFile(); |
ReadBoardURLsFile(); |
| 1012 |
end; |
end; |
| 1014 |
//デストラクタ |
//デストラクタ |
| 1015 |
destructor TSetting.Destroy(); |
destructor TSetting.Destroy(); |
| 1016 |
begin |
begin |
| 1017 |
|
FBoukenCookieList.Free; |
| 1018 |
|
FBoardColumnOrder.Free; |
| 1019 |
|
FCategoryColumnOrder.Free; |
| 1020 |
|
FBBSColumnOrder.Free; |
| 1021 |
|
FSelectTextList.Free; |
| 1022 |
|
FBoardURLs.Free; |
| 1023 |
|
FMailList.Free; |
| 1024 |
|
FNameList.Free; |
| 1025 |
|
FGestures.Free; |
| 1026 |
|
FSkinFiles.Free; |
| 1027 |
inherited; |
inherited; |
|
FBoardColumnOrder.Free; |
|
|
FCategoryColumnOrder.Free; |
|
|
FBBSColumnOrder.Free; |
|
|
FSelectTextList.Free; |
|
|
FBoardURLs.Free; |
|
|
FMailList.Free; |
|
|
FNameList.Free; |
|
|
FGestures.Free; |
|
| 1028 |
end; |
end; |
| 1029 |
|
|
| 1030 |
//初期化ファイル名取得(パス+ファイル名) |
//初期化ファイル名取得(パス+ファイル名) |
| 1031 |
function TSetting.GetFileName(): string; |
function TSetting.GetFileName(): string; |
| 1032 |
begin |
begin |
| 1033 |
Result := ExtractFilePath(Application.ExeName) + INI_FILE_NAME; |
Result := GetAppDir + INI_FILE_NAME; |
| 1034 |
end; |
end; |
| 1035 |
|
|
| 1036 |
//板更新用URL設定ファイル名(パス+ファイル名) |
//板更新用URL設定ファイル名(パス+ファイル名) |
| 1037 |
function TSetting.GetBoardURLFileName(): string; |
function TSetting.GetBoardURLFileName(): string; |
| 1038 |
begin |
begin |
| 1039 |
Result := ExtractFilePath(Application.ExeName) + BOARD_URL_INI_FILE_NAME; |
Result := GetAppDir + BOARD_URL_INI_FILE_NAME; |
| 1040 |
end; |
end; |
| 1041 |
|
|
| 1042 |
//設定ファイル読込 |
//設定ファイル読込 |
| 1043 |
procedure TSetting.ReadSettingFile(); |
procedure TSetting.ReadSettingFile(); |
|
const |
|
|
DEFAULT_BBS_WIDTH: array[0..0] of Integer = (140); |
|
|
DEFAULT_CATEGORY_WIDTH: array[0..2] of Integer = (150, 80, 130); |
|
|
DEFAULT_BOARD_WIDTH: array[0..9] of Integer = (350, 60, 60, 60, 60, 60, 80, 130, 130, 130); |
|
|
MAX_WIDTH: Integer = 2000; |
|
| 1044 |
var |
var |
| 1045 |
ini: TMemIniFile; |
ini: TMemIniFile; |
| 1046 |
i: Integer; |
i: Integer; |
|
id, code : Integer; |
|
|
wkList: TStringList; |
|
|
wkStr: string; |
|
| 1047 |
Exists: Boolean; |
Exists: Boolean; |
| 1048 |
s: string; |
s: string; |
|
// id: Integer; |
|
| 1049 |
CoolSet: TCoolSet; |
CoolSet: TCoolSet; |
| 1050 |
|
msg: String; |
| 1051 |
|
hostList: TStringList; |
| 1052 |
begin |
begin |
| 1053 |
Exists := FileExists(GetFileName); |
Exists := FileExists(GetFileName); |
| 1054 |
ini := TMemIniFile.Create(GetFileName); |
ini := TMemIniFile.Create(GetFileName); |
| 1060 |
//プロキシ接続HTTP1.1使用 |
//プロキシ接続HTTP1.1使用 |
| 1061 |
FProxyProtocol := ini.ReadBool('HTTP', 'ProxyProtocol', False); |
FProxyProtocol := ini.ReadBool('HTTP', 'ProxyProtocol', False); |
| 1062 |
|
|
| 1063 |
FReadProxy := ini.ReadBool('ReadProxy', 'Proxy', false); |
// プロキシ設定読み込み |
| 1064 |
FReadProxyAddress := ini.ReadString('ReadProxy', 'Address', ''); |
ReadProxySettings( ini ); |
| 1065 |
FReadProxyPort := ini.ReadInteger('ReadProxy', 'Port', 0); |
|
| 1066 |
FReadProxyUserID := ini.ReadString('ReadProxy', 'UserID', ''); |
// 各種ウィンドウの設定読み込み |
| 1067 |
FReadProxyPassword := ini.ReadString('ReadProxy', 'Password', ''); |
ReadWindowSettings( ini ); |
|
|
|
|
FWriteProxy := ini.ReadBool('WriteProxy', 'Proxy', false); |
|
|
FWriteProxyAddress := ini.ReadString('WriteProxy', 'Address', ''); |
|
|
FWriteProxyPort := ini.ReadInteger('WriteProxy', 'Port', 0); |
|
|
FWriteProxyUserID := ini.ReadString('WriteProxy', 'UserID', ''); |
|
|
FWriteProxyPassword := ini.ReadString('WriteProxy', 'Password', ''); |
|
|
|
|
|
FBrowserFontName := ini.ReadString('Window', 'BrowserFontName', ''); |
|
|
FBrowserFontSize := ini.ReadInteger('Window', 'BrowserFontSize', 0); |
|
|
FBrowserFontBold := ini.ReadInteger('Window', 'BrowserFontBold', 0); |
|
|
FBrowserFontItalic := ini.ReadInteger('Window', 'BrowserFontItalic', 0); |
|
|
FBrowserFontColor := ini.ReadInteger('Window', 'BrowserFontColor', -1); |
|
|
FBrowserBackColor := ini.ReadInteger('Window', 'BrowserBackColor', -1); |
|
|
|
|
|
FCabinetFontName := ini.ReadString('Window', 'CabinetFontName', DEFAULT_FONT_NAME); |
|
|
FCabinetFontSize := ini.ReadInteger('Window', 'CabinetFontSize', DEFAULT_FONT_SIZE); |
|
|
FCabinetFontBold := ini.ReadBool('Window', 'CabinetFontBold', False); |
|
|
FCabinetFontItalic := ini.ReadBool('Window', 'CabinetFontItalic', False); |
|
|
FCabinetFontColor := StringToColor(ini.ReadString('Window', 'CabinetFontColor', DEFAULT_FONT_COLOR)); |
|
|
FCabinetBackColor := StringToColor(ini.ReadString('Window', 'CabinetBackColor', DEFAULT_WINDOW_COLOR)); |
|
|
|
|
|
FListFontName := ini.ReadString('Window', 'ListFontName', DEFAULT_FONT_NAME); |
|
|
FListFontSize := ini.ReadInteger('Window', 'ListFontSize', DEFAULT_FONT_SIZE); |
|
|
FListFontBold := ini.ReadBool('Window', 'ListFontBold', False); |
|
|
FListFontItalic := ini.ReadBool('Window', 'ListFontItalic', False); |
|
|
FListFontColor := StringToColor(ini.ReadString('Window', 'ListFontColor', DEFAULT_FONT_COLOR)); |
|
|
FListBackColor := StringToColor(ini.ReadString('Window', 'ListBackColor', DEFAULT_WINDOW_COLOR)); |
|
|
FUseOddColorOddResNum := ini.ReadBool('Window','UseOddColor', False); |
|
|
FOddColor := StringToColor(ini.ReadString('Window', 'OddColor', DEFAULT_WINDOW_COLOR)); |
|
|
FUnFocusedBold := ini.ReadBool('Window','UnFocusedBold', False); |
|
|
|
|
|
FEditorFontName := ini.ReadString('Window', 'EditorFontName', DEFAULT_FONT_NAME); |
|
|
FEditorFontSize := ini.ReadInteger('Window', 'EditorFontSize', DEFAULT_FONT_SIZE); |
|
|
FEditorFontBold := ini.ReadBool('Window', 'EditorFontBold', False); |
|
|
FEditorFontItalic := ini.ReadBool('Window', 'EditorFontItalic', False); |
|
|
FEditorFontColor := StringToColor(ini.ReadString('Window', 'EditorFontColor', DEFAULT_FONT_COLOR)); |
|
|
FEditorBackColor := StringToColor(ini.ReadString('Window', 'EditorBackColor', DEFAULT_WINDOW_COLOR)); |
|
|
|
|
|
FBrowserTabFontName := ini.ReadString('Window', 'BrowserTabFontName', DEFAULT_TAB_FONT_NAME); |
|
|
FBrowserTabFontSize := ini.ReadInteger('Window', 'BrowserTabFontSize', DEFAULT_TAB_FONT_SIZE); |
|
|
FBrowserTabFontBold := ini.ReadBool('Window', 'BrowserTabFontBold', False); |
|
|
FBrowserTabFontItalic := ini.ReadBool('Window', 'BrowserTabFontItalic', False); |
|
|
|
|
|
FHintFontName := ini.ReadString('Window', 'HintFontName', Screen.HintFont.Name); |
|
|
FHintFontSize := ini.ReadInteger('Window', 'HintFontSize', Screen.HintFont.Size); |
|
|
//FHintFontBold := ini.ReadBool('Window', 'HintFontBold', False); |
|
|
//FHintFontItalic := ini.ReadBool('Window', 'HintFontItalic', False); |
|
|
FHintFontColor := StringToColor(ini.ReadString('Window', 'HintFontColor', DEFAULT_FONT_COLOR)); |
|
|
FHintBackColor := StringToColor(ini.ReadString('Window', 'HintBackColor', 'clInfoBk')); |
|
| 1068 |
|
|
| 1069 |
FWindowTop := ini.ReadInteger('WindowSize', 'Top', -1); |
FWindowTop := ini.ReadInteger('WindowSize', 'Top', -1); |
| 1070 |
FWindowLeft := ini.ReadInteger('WindowSize', 'Left', -1); |
FWindowLeft := ini.ReadInteger('WindowSize', 'Left', -1); |
| 1121 |
// FListHeightMax := ini.ReadBool('List', 'HeightMax', False); |
// FListHeightMax := ini.ReadBool('List', 'HeightMax', False); |
| 1122 |
// FListWidthMax := ini.ReadBool('List', 'WidthMax', False); |
// FListWidthMax := ini.ReadBool('List', 'WidthMax', False); |
| 1123 |
|
|
| 1124 |
wkList := TStringList.Create; |
// 入力項目の履歴を読み込む |
| 1125 |
try |
ReadInputHisotrys( ini ); |
|
ini.ReadSection('Name', wkList); |
|
|
for i := 0 to wkList.Count - 1 do begin |
|
|
wkStr := ini.ReadString('Name', wkList[i], ''); |
|
|
if (wkStr <> '') and (FNameList.IndexOf(wkStr) = -1) then |
|
|
FNameList.Add(wkStr); |
|
|
end; |
|
|
ini.ReadSection('Mail', wkList); |
|
|
for i := 0 to wkList.Count - 1 do begin |
|
|
wkStr := ini.ReadString('Mail', wkList[i], ''); |
|
|
if (wkStr <> '') and (FMailList.IndexOf(wkStr) = -1) then |
|
|
FMailList.Add(wkStr); |
|
|
end; |
|
|
ini.ReadSection('SelectText', wkList); |
|
|
for i := 0 to wkList.Count - 1 do begin |
|
|
wkStr := ini.ReadString('SelectText', wkList[i], ''); |
|
|
if (wkStr <> '') and (FSelectTextList.IndexOf(wkStr) = -1) then |
|
|
FSelectTextList.Add(wkStr); |
|
|
end; |
|
|
finally |
|
|
wkList.Free; |
|
|
end; |
|
| 1126 |
|
|
| 1127 |
// リストカラム幅 |
// リストカラム幅 |
| 1128 |
wkList := TStringList.Create; |
ReadListColumnWidth( ini ); |
|
try |
|
|
ini.ReadSection('BBSColumnWidth', wkList); |
|
|
if Length(FBBSColumnWidth) <> wkList.Count then begin |
|
|
ini.EraseSection('BBSColumnWidth'); |
|
|
end; |
|
|
for i := 0 to Length(FBBSColumnWidth) - 1 do begin |
|
|
BBSColumnWidth[i] := ini.ReadInteger('BBSColumnWidth', 'ID' + IntToStr(i), DEFAULT_BBS_WIDTH[i]); |
|
|
if BBSColumnWidth[i] > MAX_WIDTH then |
|
|
BBSColumnWidth[i] := DEFAULT_BBS_WIDTH[i]; |
|
|
end; |
|
|
ini.ReadSection('CategoryColumnWidth', wkList); |
|
|
if Length(FCategoryColumnWidth) <> wkList.Count then begin |
|
|
ini.EraseSection('CategoryColumnWidth'); |
|
|
end; |
|
|
for i := 0 to Length(FCategoryColumnWidth) - 1 do begin |
|
|
CategoryColumnWidth[i] := ini.ReadInteger('CategoryColumnWidth', 'ID' + IntToStr(i), DEFAULT_CATEGORY_WIDTH[i]); |
|
|
if CategoryColumnWidth[i] > MAX_WIDTH then |
|
|
CategoryColumnWidth[i] := DEFAULT_CATEGORY_WIDTH[i]; |
|
|
end; |
|
|
ini.ReadSection('BoardColumnWidth', wkList); |
|
|
if Length(FBoardColumnWidth) <> wkList.Count then begin |
|
|
ini.EraseSection('BoardColumnWidth'); |
|
|
end; |
|
|
for i := 0 to Length(FBoardColumnWidth) - 1 do begin |
|
|
BoardColumnWidth[i] := ini.ReadInteger('BoardColumnWidth', 'ID' + IntToStr(i), DEFAULT_BOARD_WIDTH[i]); |
|
|
if BoardColumnWidth[i] > MAX_WIDTH then |
|
|
BoardColumnWidth[i] := DEFAULT_BOARD_WIDTH[i]; |
|
|
end; |
|
|
finally |
|
|
wkList.Free; |
|
|
end; |
|
| 1129 |
|
|
| 1130 |
// カテゴリリストカラム順序 |
// カテゴリリストカラム順序 |
| 1131 |
wkList := TStringList.Create; |
ReadOrdColumn( ini ); |
|
try |
|
|
ini.ReadSection( 'BBSColumnOrder', wkList ); |
|
|
for i := 0 to wkList.Count - 1 do begin |
|
|
wkStr := ini.ReadString( 'BBSColumnOrder', 'ID' + IntToStr( i ), '' ); |
|
|
Val( wkStr, id, code ); |
|
|
if code = 0 then |
|
|
FBBSColumnOrder.Add( TGikoBBSColumnID( id ) ); |
|
|
end; |
|
|
if FBBSColumnOrder.Count = 0 then begin |
|
|
// 設定が無いので作成 |
|
|
for i := 0 to Integer( High( TGikoBBSColumnID ) ) do |
|
|
FBBSColumnOrder.Add( TGikoBBSColumnID( i ) ); |
|
|
end; |
|
|
|
|
|
ini.ReadSection( 'CategoryColumnOrder', wkList ); |
|
|
for i := 0 to wkList.Count - 1 do begin |
|
|
wkStr := ini.ReadString( 'CategoryColumnOrder', 'ID' + IntToStr( i ), '' ); |
|
|
Val( wkStr, id, code ); |
|
|
if code = 0 then |
|
|
FCategoryColumnOrder.Add( TGikoCategoryColumnID( id ) ); |
|
|
end; |
|
|
if FCategoryColumnOrder.Count = 0 then begin |
|
|
// 設定が無いので作成 |
|
|
for i := 0 to Integer( High( TGikoCategoryColumnID ) ) do |
|
|
FCategoryColumnOrder.Add( TGikoCategoryColumnID( i ) ); |
|
|
end; |
|
|
|
|
|
ini.ReadSection( 'BoardColumnOrder', wkList ); |
|
|
for i := 0 to wkList.Count - 1 do begin |
|
|
wkStr := ini.ReadString( 'BoardColumnOrder', 'ID' + IntToStr( i ), '' ); |
|
|
Val( wkStr, id, code ); |
|
|
if code = 0 then |
|
|
FBoardColumnOrder.Add( TGikoBoardColumnID( id ) ); |
|
|
end; |
|
|
if FBoardColumnOrder.Count = 0 then begin |
|
|
// 設定が無いので作成 |
|
|
for i := 0 to Integer( High( TGikoBoardColumnID ) ) do |
|
|
FBoardColumnOrder.Add( TGikoBoardColumnID( i ) ); |
|
|
end; |
|
|
finally |
|
|
wkList.Free; |
|
|
end; |
|
| 1132 |
|
|
| 1133 |
//リスト番号 |
//リスト番号 |
| 1134 |
FListViewNo := ini.ReadBool('Function', 'ListViewNo', True); |
FListViewNo := ini.ReadBool('Function', 'ListViewNo', True); |
| 1136 |
UseCSS := ini.ReadBool('CSS', 'UseCSS', True); |
UseCSS := ini.ReadBool('CSS', 'UseCSS', True); |
| 1137 |
//CSSファイル名 |
//CSSファイル名 |
| 1138 |
CSSFileName := ini.ReadString('CSS', 'FileName', 'default.css'); |
CSSFileName := ini.ReadString('CSS', 'FileName', 'default.css'); |
| 1139 |
|
//かしゅ〜しゃのスキンを使うか |
| 1140 |
|
FUseKatjushaType := ini.ReadBool('CSS', 'UseKatjushaType', false); |
| 1141 |
|
|
| 1142 |
//Mail欄表示 |
//Mail欄表示 |
| 1143 |
FShowMail := ini.ReadBool('Thread', 'ShowMail', True); |
FShowMail := ini.ReadBool('Thread', 'ShowMail', True); |
| 1147 |
else |
else |
| 1148 |
FResRange := ini.ReadInteger( 'Thread', 'ResRange', Ord( grrAll ) ); |
FResRange := ini.ReadInteger( 'Thread', 'ResRange', Ord( grrAll ) ); |
| 1149 |
FResRangeHold := ini.ReadBool( 'Thread', 'ResRangeHold', False ); |
FResRangeHold := ini.ReadBool( 'Thread', 'ResRangeHold', False ); |
| 1150 |
|
FHeadResCount := ini.ReadInteger('Thread', 'HeadResCount', 1); |
| 1151 |
|
FResRangeExCount:= ini.ReadInteger('Thread','ResRangeExCount', 100); |
| 1152 |
// スレッド一覧表示範囲 |
// スレッド一覧表示範囲 |
| 1153 |
FThreadRange := TGikoThreadRange( ini.ReadInteger('ThreadList', 'ThreadRange', Ord( gtrAll )) ); |
FThreadRange := TGikoThreadRange( ini.ReadInteger('ThreadList', 'ThreadRange', Ord( gtrAll )) ); |
| 1154 |
//非アクティブ時レスポップアップ表示 |
//非アクティブ時レスポップアップ表示 |
| 1166 |
//ResAnchorjamp |
//ResAnchorjamp |
| 1167 |
ResAnchorJamp := ini.ReadBool('Function', 'ResAnchoJamp', True); |
ResAnchorJamp := ini.ReadBool('Function', 'ResAnchoJamp', True); |
| 1168 |
//ログフォルダ |
//ログフォルダ |
| 1169 |
LogFolder := ini.ReadString('Folder', 'LogFolder', ExtractFilePath(Application.ExeName) + 'Log'); |
LogFolder := ini.ReadString('Folder', 'LogFolder', GetAppDir + 'Log'); |
| 1170 |
NewLogFolder := ''; |
NewLogFolder := ''; |
| 1171 |
|
|
| 1172 |
//板URL |
//板URL |
| 1188 |
FOpenMailer := ini.ReadBool('Mailto', 'Open', True); |
FOpenMailer := ini.ReadBool('Mailto', 'Open', True); |
| 1189 |
|
|
| 1190 |
//ポップアップ位置 |
//ポップアップ位置 |
| 1191 |
FPopupPosition := TGikoPopupPosition(ini.ReadInteger('Browser', 'PopupPosition', Ord(gppLeftBottom))); |
FPopupPosition := TGikoPopupPosition(ini.ReadInteger('Browser', 'PopupPosition', Ord(gppRightTop))); |
| 1192 |
|
// バタ56以前からのアップデート対策 |
| 1193 |
|
if (FPopupPosition = gppCenter) then begin |
| 1194 |
|
FPopupPosition := gppTop; |
| 1195 |
|
end; |
| 1196 |
|
FRespopupDeltaX := ini.ReadInteger('Browser', 'RespopupDelteX', 5); |
| 1197 |
|
FRespopupDeltaY := ini.ReadInteger('Browser', 'RespopupDelteY', 5); |
| 1198 |
|
FRespopupWait := ini.ReadInteger('Browser', 'RespopupWait', 1000); |
| 1199 |
|
FRespopupMailTo := ini.ReadBool('Browser', 'RespopupMailTo', true); |
| 1200 |
|
|
| 1201 |
//アドレスバー |
//アドレスバー |
| 1202 |
FURLDisplay := ini.ReadBool('AddressBar', 'URLDisplay', False); |
FURLDisplay := ini.ReadBool('AddressBar', 'URLDisplay', False); |
| 1225 |
FCategorySortOrder := ini.ReadBool('ThreadList', 'CategorySortOrder', True); |
FCategorySortOrder := ini.ReadBool('ThreadList', 'CategorySortOrder', True); |
| 1226 |
FBoardSortIndex := ini.ReadInteger('ThreadList', 'BoardSortIndex', 0); |
FBoardSortIndex := ini.ReadInteger('ThreadList', 'BoardSortIndex', 0); |
| 1227 |
FBoardSortOrder := ini.ReadBool('ThreadList', 'BoardSortOrder', True); |
FBoardSortOrder := ini.ReadBool('ThreadList', 'BoardSortOrder', True); |
| 1228 |
|
// DL後の自動ソート |
| 1229 |
|
FAutoSortThreadList := ini.ReadBool('ThreadList', 'AutoSort', False); |
| 1230 |
//Dat落ちスレソート順 |
//Dat落ちスレソート順 |
| 1231 |
FDatOchiSortIndex := ini.ReadInteger('ThreadList', 'DatOchiSortIndex', -1); |
FDatOchiSortIndex := ini.ReadInteger('ThreadList', 'DatOchiSortIndex', -1); |
| 1232 |
FDatOchiSortOrder := ini.ReadBool('ThreadList', 'DatOchiSortOrder', False); |
FDatOchiSortOrder := ini.ReadBool('ThreadList', 'DatOchiSortOrder', False); |
| 1238 |
|
|
| 1239 |
//サウンド |
//サウンド |
| 1240 |
if Exists then begin |
if Exists then begin |
| 1241 |
|
SetCurrentDir(ExtractFilePath(Application.ExeName)); |
| 1242 |
for i := 0 to GetSoundCount - 1 do begin |
for i := 0 to GetSoundCount - 1 do begin |
| 1243 |
SoundFileName[i] := ini.ReadString('Sound', SoundName[i], ''); |
SoundFileName[i] := ini.ReadString('Sound', SoundName[i], ''); |
| 1244 |
if not FileExists(SoundFileName[i]) then |
// 相対参照対策 |
| 1245 |
SoundFileName[i] := ''; |
// ファイルの存在チェック |
| 1246 |
|
if not FileExists(ExpandFileName(SoundFileName[i])) then begin |
| 1247 |
|
SoundFileName[i] := ''; |
| 1248 |
|
end; |
| 1249 |
end; |
end; |
| 1250 |
end else begin |
end else begin |
| 1251 |
s := ExtractFileDir(Application.ExeName) + '\sound\'; |
s := 'Sound\'; |
| 1252 |
SoundFileName[0] := s + '取得成功.wav'; |
SoundFileName[0] := s + '取得成功.wav'; |
| 1253 |
SoundFileName[1] := s + '取得成功(差分).wav'; |
SoundFileName[1] := s + '取得成功(差分).wav'; |
| 1254 |
SoundFileName[2] := s + '未更新.wav'; |
SoundFileName[2] := s + '未更新.wav'; |
| 1283 |
FPopUpAbon := ini.ReadBool('Abon','Popup',false); |
FPopUpAbon := ini.ReadBool('Abon','Popup',false); |
| 1284 |
FShowNGLinesNum := ini.ReadBool('Abon','ShowNGLines',false); |
FShowNGLinesNum := ini.ReadBool('Abon','ShowNGLines',false); |
| 1285 |
FAddResAnchor := ini.ReadBool('Abon','AddResAnchor',false); |
FAddResAnchor := ini.ReadBool('Abon','AddResAnchor',false); |
| 1286 |
FDeleteSyria := ini.ReadBool('Abon','DeleteSyria',false); |
FDeleteSyria := ini.ReadBool('Abon','DeleteSyria',false); |
| 1287 |
|
FIgnoreKana := ini.ReadBool('Abon','IgnoreKana',false); |
| 1288 |
|
|
| 1289 |
// エディタ |
// エディタ |
| 1290 |
FSpaceToNBSP := ini.ReadBool( 'Editor', 'SpaceToNBSP', False ); |
FSpaceToNBSP := ini.ReadBool( 'Editor', 'SpaceToNBSP', False ); |
| 1291 |
FAmpToCharRef := ini.ReadBool( 'Editor', 'AmpToCharRef', False ); |
FAmpToCharRef := ini.ReadBool( 'Editor', 'AmpToCharRef', False ); |
| 1292 |
|
FUseGobakuCheck := ini.ReadBool( 'Editor', 'UseGobakuCheck', True ); |
| 1293 |
|
|
| 1294 |
//Tab自動保存、読み込み |
//Tab自動保存、読み込み |
| 1295 |
FTabAutoLoadSave := ini.ReadBool('TabAuto', 'TabAutoLoadSave', False); |
FTabAutoLoadSave := ini.ReadBool('TabAuto', 'TabAutoLoadSave', False); |
| 1296 |
|
FLastCloseTabURL := ini.ReadString('Thread', 'LastCloseTabURL', ''); |
| 1297 |
FKuroutSettingTabIndex := ini.ReadInteger('OptionDialog', 'KuroutTabIndex' , 0); |
FKuroutSettingTabIndex := ini.ReadInteger('OptionDialog', 'KuroutTabIndex' , 0); |
| 1298 |
|
|
| 1299 |
// マウスジェスチャー |
// マウスジェスチャー |
| 1300 |
FGestureEnabled := ini.ReadBool( 'Guesture', 'Enabled', False ); |
FGestureEnabled := ini.ReadBool( 'Guesture', 'Enabled', False ); |
| 1301 |
|
FGestureIgnoreContext := ini.ReadBool( 'Guesture', 'IgnoreContext', False ); |
| 1302 |
//2ch言語サポ |
//2ch言語サポ |
| 1303 |
F2chSupport := ini.ReadBool('2chSupport', 'Support', False); |
F2chSupport := ini.ReadBool('2chSupport', 'Support', False); |
| 1304 |
|
|
| 1316 |
//Be2ch |
//Be2ch |
| 1317 |
//認証用ユーザID・認証コード |
//認証用ユーザID・認証コード |
| 1318 |
FBeUserID := ini.ReadString('Be', 'UserID', ''); |
FBeUserID := ini.ReadString('Be', 'UserID', ''); |
| 1319 |
FBeCode := Decrypt(ini.ReadString('Be', 'Code', '')); |
FBePassword := Decrypt(ini.ReadString('Be', 'Password', '')); |
| 1320 |
FBeAutoLogin := ini.ReadBool('Be', 'AutoLogin', False); |
FBeAutoLogin := ini.ReadBool('Be', 'AutoLogin', False); |
| 1321 |
//履歴の最大保存件数 |
//履歴の最大保存件数 |
| 1322 |
FMaxRecordCount := Max(ini.ReadInteger('Recode', 'Max', 100), 1); |
FMaxRecordCount := Max(ini.ReadInteger('Recode', 'Max', 100), 1); |
| 1323 |
|
|
| 1324 |
|
// 入力アシスト |
| 1325 |
|
FInputAssistFormTop := ini.ReadInteger('IAtWindowsSize', 'Top', 0); |
| 1326 |
|
FInputAssistFormLeft := ini.ReadInteger('IAtWindowsSize', 'Left', 0); |
| 1327 |
|
FInputAssistFormWidth := ini.ReadInteger('IAtWindowsSize', 'Width', 400); |
| 1328 |
|
FInputAssistFormHeight := ini.ReadInteger('IAtWindowsSize', 'Height', 460); |
| 1329 |
|
|
| 1330 |
|
// Cookieに付加する固定コード |
| 1331 |
|
FFixedCookie := ini.ReadString('Cookie', 'fixedString', FIXED_COOKIE); |
| 1332 |
|
|
| 1333 |
|
// リンク移動履歴の最大保持数 |
| 1334 |
|
FMoveHistorySize := ini.ReadInteger('MoveHisotry', 'Max', 20); |
| 1335 |
|
|
| 1336 |
|
FStoredTaskTray := ini.ReadBool('Function', 'StroedTaskTray', false); |
| 1337 |
|
FLoopBrowserTabs := ini.ReadBool('Function', 'LoopBrowserTabs', false); |
| 1338 |
|
FAddKeywordLink := ini.ReadBool('Thread', 'AddKeywordLink', false); |
| 1339 |
|
if not (ini.ValueExists('Thread', 'ReplaceDat')) then begin |
| 1340 |
|
msg := 'セキュリティソフトの誤反応対策をしますか?'+ #13#10 + |
| 1341 |
|
'(推奨:はい)'+ #13#10+'詳細設定から変更できます。'; |
| 1342 |
|
if MsgBox(Application.Handle, |
| 1343 |
|
msg, 'ギコナビ', MB_YESNO or MB_ICONQUESTION) = IDYES then begin |
| 1344 |
|
FReplaceDat := True; |
| 1345 |
|
end; |
| 1346 |
|
end else begin |
| 1347 |
|
FReplaceDat := ini.ReadBool('Thread', 'ReplaceDat', False); |
| 1348 |
|
end; |
| 1349 |
|
|
| 1350 |
|
FSentIniFileSize := ini.ReadInteger('Function', 'SentIniFileSize', 3); |
| 1351 |
|
FExtList := ini.ReadString('Function', 'ExtList', '*.gif;*.jpg;*.jpeg;*.png;*.zip;*.rar'); |
| 1352 |
|
|
| 1353 |
|
FCheckDatFile := ini.ReadBool('ThreadList', 'CheckDatFile', True); |
| 1354 |
|
FLimitResCountMessage := ini.ReadBool('Thread', 'LimitResCountMessage', True); |
| 1355 |
|
|
| 1356 |
|
// 冒険の書Cookie読み込み |
| 1357 |
|
hostList := TStringList.Create; |
| 1358 |
|
ini.ReadSection('Bouken', hostList); |
| 1359 |
|
for i := 0 to hostList.Count - 1 do begin |
| 1360 |
|
FBoukenCookieList.Add( hostList[i] + '=' + |
| 1361 |
|
ini.ReadString('Bouken', hostList[i], '') ); |
| 1362 |
|
end; |
| 1363 |
|
hostList.Free; |
| 1364 |
|
|
| 1365 |
|
// ギコナビ更新で利用したインストーラの削除 |
| 1366 |
|
s := ini.ReadString('Update', 'Remove0', ''); |
| 1367 |
|
if (FileExists(s)) then begin |
| 1368 |
|
SysUtils.DeleteFile(s); |
| 1369 |
|
// 削除に失敗しても無視する |
| 1370 |
|
ini.DeleteKey('Update', 'Remove0'); |
| 1371 |
|
end; |
| 1372 |
|
|
| 1373 |
ini.UpdateFile; |
ini.UpdateFile; |
| 1374 |
finally |
finally |
| 1375 |
ini.Free; |
ini.Free; |
| 1496 |
|
|
| 1497 |
ini.WriteInteger('OptionDialog', 'TabIndex', FOptionDialogTabIndex); |
ini.WriteInteger('OptionDialog', 'TabIndex', FOptionDialogTabIndex); |
| 1498 |
|
|
| 1499 |
|
// 入力アシスト |
| 1500 |
|
ini.WriteInteger('IAtWindowsSize', 'Top', FInputAssistFormTop); |
| 1501 |
|
ini.WriteInteger('IAtWindowsSize', 'Left', FInputAssistFormLeft); |
| 1502 |
|
ini.WriteInteger('IAtWindowsSize', 'Width', FInputAssistFormWidth); |
| 1503 |
|
ini.WriteInteger('IAtWindowsSize', 'Height', FInputAssistFormHeight); |
| 1504 |
|
|
| 1505 |
//ツールバー |
//ツールバー |
| 1506 |
ini.WriteBool('ToolBar', 'StdVisible', FStdToolBarVisible); |
ini.WriteBool('ToolBar', 'StdVisible', FStdToolBarVisible); |
| 1507 |
ini.WriteBool('ToolBar', 'AddressVisible', FAddressBarVisible); |
ini.WriteBool('ToolBar', 'AddressVisible', FAddressBarVisible); |
| 1548 |
ini.WriteBool('Function', 'ListViewNo', FListViewNo); |
ini.WriteBool('Function', 'ListViewNo', FListViewNo); |
| 1549 |
//CSS使用 |
//CSS使用 |
| 1550 |
ini.WriteBool('CSS', 'UseCSS', FUseCSS); |
ini.WriteBool('CSS', 'UseCSS', FUseCSS); |
| 1551 |
|
//かしゅ〜しゃのスキンを使うか |
| 1552 |
|
ini.WriteBool('CSS', 'UseKatjushaType', FUseKatjushaType); |
| 1553 |
//CSSファイル名 |
//CSSファイル名 |
| 1554 |
ini.WriteString('CSS', 'FileName', FCSSFileName); |
ini.WriteString('CSS', 'FileName', FSkinFiles.FileName); |
| 1555 |
//Mail欄表示 |
//Mail欄表示 |
| 1556 |
ini.WriteBool('Thread', 'ShowMail', FShowMail); |
ini.WriteBool('Thread', 'ShowMail', FShowMail); |
| 1557 |
// レス表示範囲 |
// レス表示範囲 |
| 1558 |
ini.DeleteKey( 'Thread', 'OnlyAHundredRes' ); // 古い設定の削除 |
ini.DeleteKey( 'Thread', 'OnlyAHundredRes' ); // 古い設定の削除 |
| 1559 |
ini.WriteInteger('Thread', 'ResRange', FResRange); |
ini.WriteInteger('Thread', 'ResRange', FResRange); |
| 1560 |
ini.WriteBool('Thread', 'ResRangeHold', FResRangeHold); |
ini.WriteBool('Thread', 'ResRangeHold', FResRangeHold); |
| 1561 |
|
ini.WriteInteger('Thread', 'HeadResCount', FHeadResCount); |
| 1562 |
|
ini.WriteInteger('Thread','ResRangeExCount', FResRangeExCount); |
| 1563 |
// スレッド一覧表示範囲 |
// スレッド一覧表示範囲 |
| 1564 |
ini.WriteInteger('ThreadList', 'ThreadRange', Ord( FThreadRange )); |
ini.WriteInteger('ThreadList', 'ThreadRange', Ord( FThreadRange )); |
| 1565 |
//ログ削除確認 |
//ログ削除確認 |
| 1595 |
|
|
| 1596 |
//ポップアップ位置 |
//ポップアップ位置 |
| 1597 |
ini.WriteInteger('Browser', 'PopupPosition', Ord(FPopupPosition)); |
ini.WriteInteger('Browser', 'PopupPosition', Ord(FPopupPosition)); |
| 1598 |
|
ini.WriteInteger('Browser', 'RespopupDelteX', FRespopupDeltaX); |
| 1599 |
|
ini.WriteInteger('Browser', 'RespopupDelteY', FRespopupDeltaY); |
| 1600 |
|
ini.WriteInteger('Browser', 'RespopupWait', FRespopupWait); |
| 1601 |
|
ini.WriteBool('Browser', 'RespopupMailTo', FRespopupMailTo); |
| 1602 |
|
|
| 1603 |
//アドレスバー |
//アドレスバー |
| 1604 |
ini.WriteBool('AddressBar', 'URLDisplay', FURLDisplay); |
ini.WriteBool('AddressBar', 'URLDisplay', FURLDisplay); |
| 1605 |
ini.WriteBool('AddressBar', 'TabStop', FAddressBarTabStop); |
ini.WriteBool('AddressBar', 'TabStop', FAddressBarTabStop); |
| 1627 |
ini.WriteBool('ThreadList', 'BoardSortOrder', FBoardSortOrder); |
ini.WriteBool('ThreadList', 'BoardSortOrder', FBoardSortOrder); |
| 1628 |
ini.WriteInteger('ThreadList', 'DatOchiSortIndex', FDatOchiSortIndex); |
ini.WriteInteger('ThreadList', 'DatOchiSortIndex', FDatOchiSortIndex); |
| 1629 |
ini.WriteBool('ThreadList', 'DatOchiSortOrder', FDatOchiSortOrder); |
ini.WriteBool('ThreadList', 'DatOchiSortOrder', FDatOchiSortOrder); |
| 1630 |
|
// DL後の自動ソート |
| 1631 |
|
ini.WriteBool('ThreadList', 'AutoSort', FAutoSortThreadList); |
| 1632 |
|
|
| 1633 |
//書き込み時マシン時刻使用設定 |
//書き込み時マシン時刻使用設定 |
| 1634 |
ini.WriteBool('PostTime', 'UseMachineTime', FUseMachineTime); |
ini.WriteBool('PostTime', 'UseMachineTime', FUseMachineTime); |
| 1706 |
//あぼ〜ん |
//あぼ〜ん |
| 1707 |
ini.WriteBool('Abon','Deleterlo',FAbonDeleterlo); |
ini.WriteBool('Abon','Deleterlo',FAbonDeleterlo); |
| 1708 |
ini.WriteBool('Abon','Replaceul',FAbonReplaceul); |
ini.WriteBool('Abon','Replaceul',FAbonReplaceul); |
| 1709 |
ini.WriteBool('Abon','Popup',FPopUpAbon); |
ini.WriteBool('Abon','Popup',FPopUpAbon); |
| 1710 |
ini.WriteBool('Abon','ShowNGLines',FShowNGLinesNum); |
ini.WriteBool('Abon','ShowNGLines',FShowNGLinesNum); |
| 1711 |
ini.WriteBool('Abon','AddResAnchor',FAddResAnchor); |
ini.WriteBool('Abon','AddResAnchor',FAddResAnchor); |
| 1712 |
ini.WriteBool('Abon','DeleteSyria',FDeleteSyria); |
ini.WriteBool('Abon','DeleteSyria',FDeleteSyria); |
| 1713 |
|
ini.WriteBool('Abon','IgnoreKana', FIgnoreKana); |
| 1714 |
|
|
| 1715 |
// エディタ |
// エディタ |
| 1716 |
ini.WriteBool( 'Editor', 'SpaceToNBSP', FSpaceToNBSP ); |
ini.WriteBool( 'Editor', 'SpaceToNBSP', FSpaceToNBSP ); |
| 1717 |
ini.WriteBool( 'Editor', 'AmpToCharRef', FAmpToCharRef ); |
ini.WriteBool( 'Editor', 'AmpToCharRef', FAmpToCharRef ); |
| 1718 |
|
ini.WriteBool( 'Editor', 'UseGobakuCheck', FUseGobakuCheck ); |
| 1719 |
|
|
| 1720 |
//タブ自動保存 |
//タブ自動保存 |
| 1721 |
ini.WriteBool('TabAuto', 'TabAutoLoadSave', FTabAutoLoadSave); |
ini.WriteBool('TabAuto', 'TabAutoLoadSave', FTabAutoLoadSave); |
| 1722 |
|
ini.WriteString('Thread', 'LastCloseTabURL', FLastCloseTabURL); |
| 1723 |
//詳細設定 |
//詳細設定 |
| 1724 |
ini.WriteInteger('OptionDialog', 'KuroutTabIndex', FKuroutSettingTabIndex); |
ini.WriteInteger('OptionDialog', 'KuroutTabIndex', FKuroutSettingTabIndex); |
| 1725 |
|
|
| 1728 |
|
|
| 1729 |
// マウスジェスチャーを使用するかどうか |
// マウスジェスチャーを使用するかどうか |
| 1730 |
ini.WriteBool( 'Guesture', 'Enabled', FGestureEnabled ); |
ini.WriteBool( 'Guesture', 'Enabled', FGestureEnabled ); |
| 1731 |
|
ini.WriteBool( 'Guesture', 'IgnoreContext', FGestureIgnoreContext ); |
| 1732 |
//FusianaTrap |
//FusianaTrap |
| 1733 |
ini.WriteBool('Trap', 'LocalTrap', FLocalTrapAtt); |
ini.WriteBool('Trap', 'LocalTrap', FLocalTrapAtt); |
| 1734 |
ini.WriteBool('Trap', 'RemoteTrap', FRemoteTrapAtt); |
ini.WriteBool('Trap', 'RemoteTrap', FRemoteTrapAtt); |
| 1741 |
|
|
| 1742 |
//認証用ユーザID・パスワード |
//認証用ユーザID・パスワード |
| 1743 |
ini.WriteString('Be', 'UserID', FBeUserID); |
ini.WriteString('Be', 'UserID', FBeUserID); |
| 1744 |
ini.WriteString('Be', 'Code', Encrypt(FBeCode)); |
ini.WriteString('Be', 'Password', Encrypt(FBePassword)); |
| 1745 |
ini.WriteBool('Be', 'AutoLogin', FBeAutoLogin); |
ini.WriteBool('Be', 'AutoLogin', FBeAutoLogin); |
| 1746 |
|
|
| 1747 |
//履歴の最大保存件数 |
//履歴の最大保存件数 |
| 1748 |
ini.WriteInteger('Recode', 'Max', FMaxRecordCount); |
ini.WriteInteger('Recode', 'Max', FMaxRecordCount); |
| 1749 |
|
// 固定のCookie文字列 |
| 1750 |
|
ini.WriteString('Cookie', 'fixedString', FFixedCookie); |
| 1751 |
|
|
| 1752 |
|
// リンク移動履歴の最大保持数 |
| 1753 |
|
ini.WriteInteger('MoveHisotry', 'Max', FMoveHistorySize); |
| 1754 |
|
|
| 1755 |
|
ini.WriteBool('Function', 'StroedTaskTray', FStoredTaskTray); |
| 1756 |
|
ini.WriteBool('Function', 'LoopBrowserTabs', FLoopBrowserTabs); |
| 1757 |
|
ini.WriteBool('Thread', 'AddKeywordLink', FAddKeywordLink); |
| 1758 |
|
ini.WriteBool('Thread', 'ReplaceDat', FReplaceDat); |
| 1759 |
|
ini.WriteInteger('Function', 'SentIniFileSize', FSentIniFileSize); |
| 1760 |
|
ini.WriteString('Function', 'ExtList', FExtList); |
| 1761 |
|
ini.WriteBool('ThreadList', 'CheckDatFile', FCheckDatFile); |
| 1762 |
|
ini.WriteBool('Thread', 'LimitResCountMessage', FLimitResCountMessage); |
| 1763 |
|
|
| 1764 |
|
|
| 1765 |
|
ini.UpdateFile; |
| 1766 |
|
finally |
| 1767 |
|
ini.Free; |
| 1768 |
|
end; |
| 1769 |
|
end; |
| 1770 |
|
//設定ファイル保存(冒険の書) |
| 1771 |
|
procedure TSetting.WriteBoukenSettingFile; |
| 1772 |
|
var |
| 1773 |
|
i: Integer; |
| 1774 |
|
ini: TMemIniFile; |
| 1775 |
|
begin |
| 1776 |
|
ini := TMemIniFile.Create(GetFileName()); |
| 1777 |
|
try |
| 1778 |
|
ini.EraseSection('Bouken'); |
| 1779 |
|
// 冒険の書Cookie書き込み |
| 1780 |
|
for i := 0 to FBoukenCookieList.Count - 1 do begin |
| 1781 |
|
ini.WriteString('Bouken', FBoukenCookieList.Names[i], FBoukenCookieList.Values[FBoukenCookieList.Names[i]]); |
| 1782 |
|
end; |
| 1783 |
ini.UpdateFile; |
ini.UpdateFile; |
| 1784 |
finally |
finally |
| 1785 |
ini.Free; |
ini.Free; |
| 1824 |
begin |
begin |
| 1825 |
ini := TMemIniFile.Create(GetFileName()); |
ini := TMemIniFile.Create(GetFileName()); |
| 1826 |
try |
try |
| 1827 |
if ExtractFilePath(Application.ExeName) + 'Log' = NewLogFolder then |
if GetAppDir + 'Log' = NewLogFolder then |
| 1828 |
ini.DeleteKey('Folder', 'LogFolder') |
ini.DeleteKey('Folder', 'LogFolder') |
| 1829 |
else |
else |
| 1830 |
ini.WriteString('Folder', 'LogFolder', NewLogFolder); |
ini.WriteString('Folder', 'LogFolder', NewLogFolder); |
| 1938 |
begin |
begin |
| 1939 |
for i := 0 to GetSoundCount - 1 do begin |
for i := 0 to GetSoundCount - 1 do begin |
| 1940 |
if SoundName[i] = Name then begin |
if SoundName[i] = Name then begin |
| 1941 |
Result := SoundFileName[i]; |
SysUtils.SetCurrentDir(GetAppDir); |
| 1942 |
|
Result := ExpandFileName(SoundFileName[i]); |
| 1943 |
Exit; |
Exit; |
| 1944 |
end; |
end; |
| 1945 |
end; |
end; |
| 2049 |
begin |
begin |
| 2050 |
ini := TMemIniFile.Create(GetBoardURLFileName()); |
ini := TMemIniFile.Create(GetBoardURLFileName()); |
| 2051 |
try |
try |
| 2052 |
|
//更新URLの数 |
| 2053 |
ini.WriteInteger('URL','count',1); |
ini.WriteInteger('URL','count',1); |
| 2054 |
|
//デフォルトで使用するURLのインデックス |
| 2055 |
ini.WriteInteger('URL','selected',1); |
ini.WriteInteger('URL','selected',1); |
| 2056 |
|
//以下必要な数だけ、更新URLを追加 |
| 2057 |
ini.WriteString('URL','1',DEFAULT_2CH_BOARD_URL1); |
ini.WriteString('URL','1',DEFAULT_2CH_BOARD_URL1); |
| 2058 |
//ini.WriteString('URL','2',DEFAULT_2CH_BOARD_URL2); |
//ini.WriteString('URL','2',DEFAULT_2CH_BOARD_URL2); |
| 2059 |
ini.UpdateFile; |
ini.UpdateFile; |
| 2067 |
*************************************************************************) |
*************************************************************************) |
| 2068 |
function TSetting.GetBoardFileName: string; |
function TSetting.GetBoardFileName: string; |
| 2069 |
begin |
begin |
| 2070 |
Result := GetAppDir + CONFIG_DIR_NAME + '\' + BOARD_FILE_NAME; |
Result := GetConfigDir + BOARD_FILE_NAME; |
| 2071 |
end; |
end; |
| 2072 |
|
|
| 2073 |
(************************************************************************* |
(************************************************************************* |
| 2075 |
*************************************************************************) |
*************************************************************************) |
| 2076 |
function TSetting.GetCustomBoardFileName: string; |
function TSetting.GetCustomBoardFileName: string; |
| 2077 |
begin |
begin |
| 2078 |
Result := GetAppDir + CONFIG_DIR_NAME + '\' + CUSTOMBOARD_FILE_NAME; |
Result := GetConfigDir + CUSTOMBOARD_FILE_NAME; |
| 2079 |
end; |
end; |
| 2080 |
|
|
| 2081 |
(************************************************************************* |
(************************************************************************* |
| 2082 |
*ボードディレクトリ取得 |
*ボードディレクトリ取得(\で終わる) |
| 2083 |
*************************************************************************) |
*************************************************************************) |
| 2084 |
function TSetting.GetBoardDir: string; |
function TSetting.GetBoardDir: string; |
| 2085 |
begin |
begin |
| 2086 |
Result := GetAppDir + CONFIG_DIR_NAME + '\' + BOARD_DIR_NAME + '\'; |
Result := IncludeTrailingPathDelimiter(GetConfigDir + BOARD_DIR_NAME); |
| 2087 |
end; |
end; |
| 2088 |
|
|
| 2089 |
(************************************************************************* |
(************************************************************************* |
| 2096 |
|
|
| 2097 |
|
|
| 2098 |
(************************************************************************* |
(************************************************************************* |
| 2099 |
*実行ファイルフォルダ取得 |
*実行ファイルフォルダ取得(最後に\がある) |
| 2100 |
*************************************************************************) |
*************************************************************************) |
| 2101 |
function TSetting.GetAppDir: string; |
function TSetting.GetAppDir: string; |
| 2102 |
begin |
begin |
| 2128 |
end; |
end; |
| 2129 |
|
|
| 2130 |
(************************************************************************* |
(************************************************************************* |
| 2131 |
*Configフォルダ取得 |
*Configフォルダ取得(\で終わる) |
| 2132 |
*************************************************************************) |
*************************************************************************) |
| 2133 |
function TSetting.GetConfigDir: string; |
function TSetting.GetConfigDir: string; |
| 2134 |
begin |
begin |
| 2135 |
Result := IncludeTrailingPathDelimiter(GetAppDir + CONFIG_DIR_NAME); |
Result := IncludeTrailingPathDelimiter(GetAppDir + CONFIG_DIR_NAME); |
| 2136 |
end; |
end; |
| 2137 |
|
(************************************************************************* |
| 2138 |
|
*CSSフォルダ取得(\で終わる) |
| 2139 |
|
*************************************************************************) |
| 2140 |
function TSetting.GetStyleSheetDir: string; |
function TSetting.GetStyleSheetDir: string; |
| 2141 |
begin |
begin |
| 2142 |
Result := IncludeTrailingPathDelimiter(GetConfigDir + CSS_DIR_NAME); |
Result := IncludeTrailingPathDelimiter(GetConfigDir + CSS_DIR_NAME); |
| 2143 |
end; |
end; |
| 2144 |
|
(************************************************************************* |
| 2145 |
|
*skinフォルダ取得(\で終わる) |
| 2146 |
|
*************************************************************************) |
| 2147 |
function TSetting.GetSkinDir: string; |
function TSetting.GetSkinDir: string; |
| 2148 |
begin |
begin |
| 2149 |
Result := IncludeTrailingPathDelimiter(GetConfigDir + SKIN_DIR_NAME); |
Result := IncludeTrailingPathDelimiter(GetConfigDir + SKIN_DIR_NAME); |
| 2150 |
end; |
end; |
| 2151 |
|
(************************************************************************* |
| 2152 |
function TSetting.GetSkinHeaderFileName: string; |
*NGワードディレクトリ取得(\で終わる) |
| 2153 |
begin |
*************************************************************************) |
|
Result := CSSFileName + SKIN_HEADER_FILE_NAME; |
|
|
end; |
|
|
|
|
|
function TSetting.GetSkinFooterFileName: string; |
|
|
begin |
|
|
Result := CSSFileName + SKIN_FOOTER_FILE_NAME; |
|
|
end; |
|
|
|
|
|
function TSetting.GetSkinNewResFileName: string; |
|
|
begin |
|
|
Result := CSSFileName + SKIN_NEWRES_FILE_NAME; |
|
|
end; |
|
|
|
|
|
function TSetting.GetSkinResFileName: string; |
|
|
begin |
|
|
Result := CSSFileName + SKIN_RES_FILE_NAME; |
|
|
end; |
|
|
|
|
|
function TSetting.GetSkinBookmarkFileName: string; |
|
|
begin |
|
|
Result := CSSFileName + SKIN_BOOKMARK_FILE_NAME; |
|
|
end; |
|
|
|
|
|
function TSetting.GetSkinNewmarkFileName: string; |
|
|
begin |
|
|
Result := CSSFileName + SKIN_NEWMARK_FILE_NAME; |
|
|
end; |
|
|
|
|
| 2154 |
function TSetting.GetNGWordsDir: string; |
function TSetting.GetNGWordsDir: string; |
| 2155 |
begin |
begin |
| 2156 |
Result := IncludeTrailingPathDelimiter(GetConfigDir + NGWORDs_DIR_NAME); |
Result := IncludeTrailingPathDelimiter(GetConfigDir + NGWORDs_DIR_NAME); |
| 2157 |
end; |
end; |
| 2158 |
|
(************************************************************************* |
| 2159 |
|
*Boardプラグインディレクトリ取得(\で終わる) |
| 2160 |
|
*************************************************************************) |
| 2161 |
function TSetting.GetBoardPlugInDir: string; |
function TSetting.GetBoardPlugInDir: string; |
| 2162 |
begin |
begin |
| 2163 |
Result := IncludeTrailingPathDelimiter(GetConfigDir + BOARD_PLUGIN_DIR_NAME); |
Result := IncludeTrailingPathDelimiter(GetConfigDir + BOARD_PLUGIN_DIR_NAME); |
| 2167 |
begin |
begin |
| 2168 |
|
|
| 2169 |
FUseCSS := value; |
FUseCSS := value; |
| 2170 |
|
// Windows的にファイルパスの大文字小文字の違いは無視されるので、 |
| 2171 |
|
// ココでの判定でも大文字小文字の違いは無視する。 |
| 2172 |
FUseSkin := |
FUseSkin := |
| 2173 |
UseCSS and |
UseCSS and |
| 2174 |
(Pos( GetSkinDir, CSSFileName ) > 0) and |
(Pos( AnsiLowerCase(GetSkinDir), AnsiLowerCase(FSkinFiles.FileName) ) > 0) and |
| 2175 |
FileExists( GetSkinHeaderFileName ); |
FileExists( FSkinFiles.GetSkinHeaderFileName ); |
| 2176 |
|
|
| 2177 |
end; |
end; |
| 2178 |
|
|
| 2179 |
procedure TSetting.SetCSSFileName( fileName: string ); |
procedure TSetting.SetCSSFileName( fileName: string ); |
| 2180 |
begin |
begin |
| 2181 |
|
FSkinFiles.FileName := fileName; |
| 2182 |
FCSSFileName := fileName; |
// Windows的にファイルパスの大文字小文字の違いは無視されるので、 |
| 2183 |
|
// ココでの判定でも大文字小文字の違いは無視する。 |
| 2184 |
FUseSkin := |
FUseSkin := |
| 2185 |
UseCSS and |
UseCSS and |
| 2186 |
(Pos( GetSkinDir, CSSFileName ) > 0) and |
(Pos( AnsiLowerCase(GetSkinDir), AnsiLowerCase(FSkinFiles.FileName) ) > 0) and |
| 2187 |
FileExists( GetSkinHeaderFileName ); |
FileExists( FSkinFiles.GetSkinHeaderFileName ); |
| 2188 |
|
|
| 2189 |
end; |
end; |
| 2190 |
|
(************************************************************************* |
| 2191 |
|
*samba設定ファイル名取得 |
| 2192 |
|
*************************************************************************) |
| 2193 |
function TSetting.GetSambaFileName: string; |
function TSetting.GetSambaFileName: string; |
| 2194 |
begin |
begin |
| 2195 |
Result := GetAppDir + SAMBATIME_FILE_NAME; |
Result := GetAppDir + SAMBATIME_FILE_NAME; |
| 2216 |
begin |
begin |
| 2217 |
Result := GetConfigDir + LANGUAGE_FILE_NAME; |
Result := GetConfigDir + LANGUAGE_FILE_NAME; |
| 2218 |
end; |
end; |
| 2219 |
//Messagelistに出力されるメッセージの設定 |
procedure TSetting.WriteLogFolder(AVal : String); |
| 2220 |
procedure TSetting.SetMessages; |
begin |
| 2221 |
var |
FLogFolder := AVal; |
| 2222 |
i :Integer; |
FLogFolderP := IncludeTrailingPathDelimiter(LogFolder); |
| 2223 |
ini : TMemIniFile; |
end; |
| 2224 |
|
function TSetting.GetMainKeyFileName: String; |
| 2225 |
|
begin |
| 2226 |
|
Result := GetConfigDir + KEY_SETTING_FILE_NAME; |
| 2227 |
|
end; |
| 2228 |
|
function TSetting.GetEditorKeyFileName: String; |
| 2229 |
|
begin |
| 2230 |
|
Result := GetConfigDir + EKEY_SETTING_FILE_NAME; |
| 2231 |
|
end; |
| 2232 |
|
function TSetting.GetInputAssistFileName : String; |
| 2233 |
|
begin |
| 2234 |
|
Result := GetConfigDir + INPUTASSIST_FILE_NAME; |
| 2235 |
|
end; |
| 2236 |
|
function TSetting.GetReplaceFileName: String; |
| 2237 |
|
begin |
| 2238 |
|
Result := GetConfigDir + REPLACE_FILE_NAME; |
| 2239 |
|
end; |
| 2240 |
|
function TSetting.GetExtprevieFileName: String; |
| 2241 |
|
begin |
| 2242 |
|
Result := GetConfigDir + EXT_PREVIEW_FILE_NAME; |
| 2243 |
|
end; |
| 2244 |
|
procedure TSetting.SetMoveHistorySize(AVal : Integer); |
| 2245 |
|
begin |
| 2246 |
|
if (AVal > 0) then begin |
| 2247 |
|
FMoveHistorySize := AVal; |
| 2248 |
|
end; |
| 2249 |
|
end; |
| 2250 |
|
{ |
| 2251 |
|
\brief プロキシ設定読み込み |
| 2252 |
|
\param memIni iniファイル |
| 2253 |
|
} |
| 2254 |
|
procedure TSetting.ReadProxySettings(memIni: TMemIniFile); |
| 2255 |
|
const |
| 2256 |
|
READ_SECTION = 'ReadProxy'; |
| 2257 |
|
WRITE_SECTION= 'WriteProxy'; |
| 2258 |
|
PROXY_KEY = 'Proxy'; |
| 2259 |
|
ADDRE_KEY = 'Address'; |
| 2260 |
|
PORT_KEY = 'Port'; |
| 2261 |
|
UID_KEY = 'UserID'; |
| 2262 |
|
PASS_KEY = 'Password'; |
| 2263 |
|
begin |
| 2264 |
|
if (memIni <> nil) then begin |
| 2265 |
|
FReadProxy := memIni.ReadBool(READ_SECTION, PROXY_KEY, false); |
| 2266 |
|
FReadProxyAddress := memIni.ReadString(READ_SECTION, ADDRE_KEY, ''); |
| 2267 |
|
FReadProxyPort := memIni.ReadInteger(READ_SECTION, PORT_KEY, 0); |
| 2268 |
|
FReadProxyUserID := memIni.ReadString(READ_SECTION, UID_KEY, ''); |
| 2269 |
|
FReadProxyPassword := memIni.ReadString(READ_SECTION, PASS_KEY, ''); |
| 2270 |
|
|
| 2271 |
|
FWriteProxy := memIni.ReadBool(WRITE_SECTION, PROXY_KEY, false); |
| 2272 |
|
FWriteProxyAddress := memIni.ReadString(WRITE_SECTION, ADDRE_KEY, ''); |
| 2273 |
|
FWriteProxyPort := memIni.ReadInteger(WRITE_SECTION, PORT_KEY, 0); |
| 2274 |
|
FWriteProxyUserID := memIni.ReadString(WRITE_SECTION, UID_KEY, ''); |
| 2275 |
|
FWriteProxyPassword := memIni.ReadString(WRITE_SECTION, PASS_KEY, ''); |
| 2276 |
|
end; |
| 2277 |
|
end; |
| 2278 |
|
{ |
| 2279 |
|
\brief 各種ウィンドウ設定読み込み |
| 2280 |
|
\param menIni iniファイル |
| 2281 |
|
} |
| 2282 |
|
procedure TSetting.ReadWindowSettings(memIni: TMemIniFile); |
| 2283 |
|
const |
| 2284 |
|
WINDOW_SECTION = 'Window'; |
| 2285 |
begin |
begin |
| 2286 |
//2ch言語読み出し |
if (memIni <> nil) then begin |
| 2287 |
if (GengoSupport) and (FileExists(GetLanguageFileName)) then begin |
FBrowserFontName := memIni.ReadString(WINDOW_SECTION, 'BrowserFontName', ''); |
| 2288 |
ini := TmemIniFile.Create(GetLanguageFileName); |
FBrowserFontSize := memIni.ReadInteger(WINDOW_SECTION, 'BrowserFontSize', 0); |
| 2289 |
|
FBrowserFontBold := memIni.ReadInteger(WINDOW_SECTION, 'BrowserFontBold', 0); |
| 2290 |
|
FBrowserFontItalic := memIni.ReadInteger(WINDOW_SECTION, 'BrowserFontItalic', 0); |
| 2291 |
|
FBrowserFontColor := memIni.ReadInteger(WINDOW_SECTION, 'BrowserFontColor', -1); |
| 2292 |
|
FBrowserBackColor := memIni.ReadInteger(WINDOW_SECTION, 'BrowserBackColor', -1); |
| 2293 |
|
|
| 2294 |
|
FCabinetFontName := memIni.ReadString(WINDOW_SECTION, 'CabinetFontName', DEFAULT_FONT_NAME); |
| 2295 |
|
FCabinetFontSize := memIni.ReadInteger(WINDOW_SECTION, 'CabinetFontSize', DEFAULT_FONT_SIZE); |
| 2296 |
|
FCabinetFontBold := memIni.ReadBool(WINDOW_SECTION, 'CabinetFontBold', False); |
| 2297 |
|
FCabinetFontItalic := memIni.ReadBool(WINDOW_SECTION, 'CabinetFontItalic', False); |
| 2298 |
|
FCabinetFontColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'CabinetFontColor', DEFAULT_FONT_COLOR)); |
| 2299 |
|
FCabinetBackColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'CabinetBackColor', DEFAULT_WINDOW_COLOR)); |
| 2300 |
|
|
| 2301 |
|
FListFontName := memIni.ReadString(WINDOW_SECTION, 'ListFontName', DEFAULT_FONT_NAME); |
| 2302 |
|
FListFontSize := memIni.ReadInteger(WINDOW_SECTION, 'ListFontSize', DEFAULT_FONT_SIZE); |
| 2303 |
|
FListFontBold := memIni.ReadBool(WINDOW_SECTION, 'ListFontBold', False); |
| 2304 |
|
FListFontItalic := memIni.ReadBool(WINDOW_SECTION, 'ListFontItalic', False); |
| 2305 |
|
FListFontColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'ListFontColor', DEFAULT_FONT_COLOR)); |
| 2306 |
|
FListBackColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'ListBackColor', DEFAULT_WINDOW_COLOR)); |
| 2307 |
|
FUseOddColorOddResNum := memIni.ReadBool(WINDOW_SECTION,'UseOddColor', False); |
| 2308 |
|
FOddColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'OddColor', DEFAULT_WINDOW_COLOR)); |
| 2309 |
|
FUnFocusedBold := memIni.ReadBool(WINDOW_SECTION,'UnFocusedBold', False); |
| 2310 |
|
|
| 2311 |
|
FEditorFontName := memIni.ReadString(WINDOW_SECTION, 'EditorFontName', DEFAULT_FONT_NAME); |
| 2312 |
|
FEditorFontSize := memIni.ReadInteger(WINDOW_SECTION, 'EditorFontSize', DEFAULT_FONT_SIZE); |
| 2313 |
|
FEditorFontBold := memIni.ReadBool(WINDOW_SECTION, 'EditorFontBold', False); |
| 2314 |
|
FEditorFontItalic := memIni.ReadBool(WINDOW_SECTION, 'EditorFontItalic', False); |
| 2315 |
|
FEditorFontColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'EditorFontColor', DEFAULT_FONT_COLOR)); |
| 2316 |
|
FEditorBackColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'EditorBackColor', DEFAULT_WINDOW_COLOR)); |
| 2317 |
|
|
| 2318 |
|
FBrowserTabFontName := memIni.ReadString(WINDOW_SECTION, 'BrowserTabFontName', DEFAULT_TAB_FONT_NAME); |
| 2319 |
|
FBrowserTabFontSize := memIni.ReadInteger(WINDOW_SECTION, 'BrowserTabFontSize', DEFAULT_TAB_FONT_SIZE); |
| 2320 |
|
FBrowserTabFontBold := memIni.ReadBool(WINDOW_SECTION, 'BrowserTabFontBold', False); |
| 2321 |
|
FBrowserTabFontItalic := memIni.ReadBool(WINDOW_SECTION, 'BrowserTabFontItalic', False); |
| 2322 |
|
|
| 2323 |
|
FHintFontName := memIni.ReadString(WINDOW_SECTION, 'HintFontName', Screen.HintFont.Name); |
| 2324 |
|
FHintFontSize := memIni.ReadInteger(WINDOW_SECTION, 'HintFontSize', Screen.HintFont.Size); |
| 2325 |
|
//FHintFontBold := memIni.ReadBool(WINDOW_SECTION, 'HintFontBold', False); |
| 2326 |
|
//FHintFontItalic := memIni.ReadBool(WINDOW_SECTION, 'HintFontItalic', False); |
| 2327 |
|
FHintFontColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'HintFontColor', DEFAULT_FONT_COLOR)); |
| 2328 |
|
FHintBackColor := StringToColor(memIni.ReadString(WINDOW_SECTION, 'HintBackColor', 'clInfoBk')); |
| 2329 |
|
end; |
| 2330 |
|
end; |
| 2331 |
|
{ |
| 2332 |
|
\brief 入力履歴読み込み(検索+メール欄+名前) |
| 2333 |
|
\param memIni iniファイル |
| 2334 |
|
} |
| 2335 |
|
procedure TSetting.ReadInputHisotrys(memIni: TMemIniFile); |
| 2336 |
|
const |
| 2337 |
|
SECTIONS : array[0..2] of string = ('Name', 'Mail', 'SelectText'); |
| 2338 |
|
var |
| 2339 |
|
wkList : TStringList; |
| 2340 |
|
wkStr : string; |
| 2341 |
|
i, j : Integer; |
| 2342 |
|
listArray : array[0..2] of TStringList; |
| 2343 |
|
begin |
| 2344 |
|
if (memIni <> nil) then begin |
| 2345 |
|
listArray[0] := FNameList; |
| 2346 |
|
listArray[1] := FMailList; |
| 2347 |
|
listArray[2] := FSelectTextList; |
| 2348 |
|
wkList := TStringList.Create; |
| 2349 |
try |
try |
| 2350 |
{ |
for i := 0 to High(listArray) do begin |
| 2351 |
'ログアウトしました', |
memIni.ReadSection(SECTIONS[i], wkList); |
| 2352 |
'ログインしました - ', |
for j := 0 to wkList.Count -1 do begin |
| 2353 |
'強制ログインしました - ', |
wkStr := memIni.ReadString(SECTIONS[i], wkList[j], ''); |
| 2354 |
'[スレ一覧取得完了]', |
if (wkStr <> '') and |
| 2355 |
'(名称不明)', |
(listArray[i].IndexOf(wkStr) = -1) then begin |
| 2356 |
'[スレ取得完了]', |
listArray[i].Add(wkStr); |
| 2357 |
'[スレ差分取得完了]', |
end; |
| 2358 |
'[未更新]', |
end; |
| 2359 |
'[中断]', |
end; |
|
'[エラー]', |
|
|
'[レス送信終了]', |
|
|
'[新スレ送信終了]', |
|
|
'[レス送信失敗]', |
|
|
'[新スレ送信失敗]'); } |
|
|
FMessageList[0] := ini.ReadString('Language', 'Logout', DEF_MESSAGES[0]); |
|
|
FMessageList[1] := ini.ReadString('Language', 'Login', DEF_MESSAGES[1]); |
|
|
FMessageList[2] := ini.ReadString('Language', 'ForceLogin', DEF_MESSAGES[2]); |
|
|
FMessageList[3] := ini.ReadString('Language', 'SureItiran', DEF_MESSAGES[3]); |
|
|
FMessageList[4] := ini.ReadString('Language', 'UnKnown', DEF_MESSAGES[4]); |
|
|
FMessageList[5] := ini.ReadString('Language', 'SureSyutoku', DEF_MESSAGES[5]); |
|
|
FMessageList[6] := ini.ReadString('Language', 'SureDiff', DEF_MESSAGES[6]); |
|
|
FMessageList[7] := ini.ReadString('Language', 'NotMod', DEF_MESSAGES[7]); |
|
|
FMessageList[8] := ini.ReadString('Language', 'Abort', DEF_MESSAGES[8]); |
|
|
FMessageList[9] := ini.ReadString('Language', 'Error', DEF_MESSAGES[9]); |
|
|
FMessageList[10] := ini.ReadString('Language', 'NewRes', DEF_MESSAGES[10]); |
|
|
FMessageList[11] := ini.ReadString('Language', 'NewSure', DEF_MESSAGES[11]); |
|
|
FMessageList[12] := ini.ReadString('Language', 'ResError', DEF_MESSAGES[12]); |
|
|
FMessageList[13] := ini.ReadString('Language', 'SureError', DEF_MESSAGES[13]); |
|
| 2360 |
finally |
finally |
| 2361 |
ini.Free; |
wkList.Free; |
| 2362 |
end; |
end; |
| 2363 |
|
end; |
| 2364 |
|
end; |
| 2365 |
|
{ |
| 2366 |
|
\breif リストカラム幅読み込み |
| 2367 |
|
\param memIni iniファイル |
| 2368 |
|
} |
| 2369 |
|
procedure TSetting.ReadListColumnWidth(memIni: TMemIniFile); |
| 2370 |
|
const |
| 2371 |
|
SECTIONS : array[0..2] of string = |
| 2372 |
|
('BBSColumnWidth', 'CategoryColumnWidth', 'BoardColumnWidth'); |
| 2373 |
|
DEFAULT_BBS_WIDTH: array[0..0] of Integer = (140); |
| 2374 |
|
DEFAULT_CATEGORY_WIDTH: array[0..2] of Integer = (150, 80, 130); |
| 2375 |
|
DEFAULT_BOARD_WIDTH: array[0..10] of Integer = (350, 60, 60, 60, 60, 60, 80, 130, 130, 130, 60); |
| 2376 |
|
MAX_WIDTH: Integer = 2000; |
| 2377 |
|
var |
| 2378 |
|
wkList : TStringList; |
| 2379 |
|
i : Integer; |
| 2380 |
|
begin |
| 2381 |
|
if (memIni <> nil) then begin |
| 2382 |
|
// リストカラム幅 |
| 2383 |
|
wkList := TStringList.Create; |
| 2384 |
|
try |
| 2385 |
|
memIni.ReadSection(SECTIONS[0], wkList); |
| 2386 |
|
if Length(FBBSColumnWidth) <> wkList.Count then begin |
| 2387 |
|
memIni.EraseSection(SECTIONS[0]); |
| 2388 |
|
end; |
| 2389 |
|
for i := 0 to High(FBBSColumnWidth) do begin |
| 2390 |
|
BBSColumnWidth[i] := memIni.ReadInteger(SECTIONS[0], |
| 2391 |
|
'ID' + IntToStr(i), DEFAULT_BBS_WIDTH[i]); |
| 2392 |
|
if BBSColumnWidth[i] > MAX_WIDTH then |
| 2393 |
|
BBSColumnWidth[i] := DEFAULT_BBS_WIDTH[i]; |
| 2394 |
|
end; |
| 2395 |
|
memIni.ReadSection(SECTIONS[1], wkList); |
| 2396 |
|
if Length(FCategoryColumnWidth) <> wkList.Count then begin |
| 2397 |
|
memIni.EraseSection(SECTIONS[1]); |
| 2398 |
|
end; |
| 2399 |
|
for i := 0 to High(FCategoryColumnWidth) do begin |
| 2400 |
|
CategoryColumnWidth[i] := memIni.ReadInteger(SECTIONS[1], |
| 2401 |
|
'ID' + IntToStr(i), DEFAULT_CATEGORY_WIDTH[i]); |
| 2402 |
|
if CategoryColumnWidth[i] > MAX_WIDTH then |
| 2403 |
|
CategoryColumnWidth[i] := DEFAULT_CATEGORY_WIDTH[i]; |
| 2404 |
|
end; |
| 2405 |
|
memIni.ReadSection(SECTIONS[2], wkList); |
| 2406 |
|
if Length(FBoardColumnWidth) <> wkList.Count then begin |
| 2407 |
|
memIni.EraseSection(SECTIONS[2]); |
| 2408 |
|
end; |
| 2409 |
|
for i := 0 to High(FBoardColumnWidth) do begin |
| 2410 |
|
BoardColumnWidth[i] := memIni.ReadInteger(SECTIONS[2], |
| 2411 |
|
'ID' + IntToStr(i), DEFAULT_BOARD_WIDTH[i]); |
| 2412 |
|
if BoardColumnWidth[i] > MAX_WIDTH then |
| 2413 |
|
BoardColumnWidth[i] := DEFAULT_BOARD_WIDTH[i]; |
| 2414 |
|
end; |
| 2415 |
|
finally |
| 2416 |
|
wkList.Free; |
| 2417 |
|
end; |
| 2418 |
|
end; |
| 2419 |
|
end; |
| 2420 |
|
//! カテゴリリストカラム順序読み込み |
| 2421 |
|
procedure TSetting.ReadOrdColumn(memIni: TMemIniFile); |
| 2422 |
|
var |
| 2423 |
|
wkList : TStringList; |
| 2424 |
|
wkStr : string; |
| 2425 |
|
i, id, code : Integer; |
| 2426 |
|
begin |
| 2427 |
|
if (memIni <> nil) then begin |
| 2428 |
|
wkList := TStringList.Create; |
| 2429 |
|
try |
| 2430 |
|
memIni.ReadSection( 'BBSColumnOrder', wkList ); |
| 2431 |
|
for i := 0 to wkList.Count - 1 do begin |
| 2432 |
|
wkStr := memIni.ReadString( 'BBSColumnOrder', 'ID' + IntToStr( i ), '' ); |
| 2433 |
|
Val( wkStr, id, code ); |
| 2434 |
|
if code = 0 then |
| 2435 |
|
FBBSColumnOrder.Add( TGikoBBSColumnID( id ) ); |
| 2436 |
|
end; |
| 2437 |
|
if FBBSColumnOrder.Count = 0 then begin |
| 2438 |
|
// 設定が無いので作成 |
| 2439 |
|
for i := 0 to Integer( High( TGikoBBSColumnID ) ) do |
| 2440 |
|
FBBSColumnOrder.Add( TGikoBBSColumnID( i ) ); |
| 2441 |
|
end; |
| 2442 |
|
|
| 2443 |
|
memIni.ReadSection( 'CategoryColumnOrder', wkList ); |
| 2444 |
|
for i := 0 to wkList.Count - 1 do begin |
| 2445 |
|
wkStr := memIni.ReadString( 'CategoryColumnOrder', 'ID' + IntToStr( i ), '' ); |
| 2446 |
|
Val( wkStr, id, code ); |
| 2447 |
|
if code = 0 then |
| 2448 |
|
FCategoryColumnOrder.Add( TGikoCategoryColumnID( id ) ); |
| 2449 |
|
end; |
| 2450 |
|
if FCategoryColumnOrder.Count = 0 then begin |
| 2451 |
|
// 設定が無いので作成 |
| 2452 |
|
for i := 0 to Integer( High( TGikoCategoryColumnID ) ) do |
| 2453 |
|
FCategoryColumnOrder.Add( TGikoCategoryColumnID( i ) ); |
| 2454 |
|
end; |
| 2455 |
|
|
| 2456 |
|
memIni.ReadSection( 'BoardColumnOrder', wkList ); |
| 2457 |
|
for i := 0 to wkList.Count - 1 do begin |
| 2458 |
|
wkStr := memIni.ReadString( 'BoardColumnOrder', 'ID' + IntToStr( i ), '' ); |
| 2459 |
|
Val( wkStr, id, code ); |
| 2460 |
|
if code = 0 then |
| 2461 |
|
FBoardColumnOrder.Add( TGikoBoardColumnID( id ) ); |
| 2462 |
|
end; |
| 2463 |
|
if FBoardColumnOrder.Count = 0 then begin |
| 2464 |
|
// 設定が無いので作成 |
| 2465 |
|
for i := 0 to Integer( High( TGikoBoardColumnID ) ) do begin |
| 2466 |
|
// 勢いのカラムはデフォルトで非表示にする |
| 2467 |
|
if ( i <> Ord(gbcVigor) ) then begin |
| 2468 |
|
FBoardColumnOrder.Add( TGikoBoardColumnID( i ) ); |
| 2469 |
|
end; |
| 2470 |
|
end; |
| 2471 |
|
end; |
| 2472 |
|
finally |
| 2473 |
|
wkList.Free; |
| 2474 |
|
end; |
| 2475 |
|
end; |
| 2476 |
|
end; |
| 2477 |
|
|
| 2478 |
end else begin |
function TSetting.GetCSSFileName: string; |
| 2479 |
for i := 0 to 13 do begin |
begin |
| 2480 |
FMessageList[i] := DEF_MESSAGES[i]; |
Result := FSkinFiles.FileName; |
| 2481 |
|
end; |
| 2482 |
|
function TSetting.GetBoukenCookie(AHostName: String): String; |
| 2483 |
|
var |
| 2484 |
|
i : Integer; |
| 2485 |
|
begin |
| 2486 |
|
for i := 0 to FBoukenCookieList.Count - 1 do begin |
| 2487 |
|
if ( AnsiPos(FBoukenCookieList.Names[i], AHostName) > 0 ) then begin |
| 2488 |
|
Result := FBoukenCookieList.Values[FBoukenCookieList.Names[i]]; |
| 2489 |
|
Break; |
| 2490 |
end; |
end; |
| 2491 |
end; |
end; |
| 2492 |
end; |
end; |
| 2493 |
function TSetting.GetMessage(AType :Integer): string; |
procedure TSetting.SetBoukenCookie(ACookieValue, AHostName: String); |
| 2494 |
|
var |
| 2495 |
|
i : Integer; |
| 2496 |
begin |
begin |
| 2497 |
if (AType >= 0) and (AType <= Length(FMessageList)) then |
for i := 0 to FBoukenCookieList.Count - 1 do begin |
| 2498 |
Result := FMessageList[AType] |
if ( FBoukenCookieList.Names[i] = AHostName ) then begin |
| 2499 |
else |
FBoukenCookieList[i] := AHostName + '=' + ACookieValue; |
| 2500 |
Result := ''; |
Break; |
| 2501 |
|
end; |
| 2502 |
|
end; |
| 2503 |
|
if ( i = FBoukenCookieList.Count ) then begin |
| 2504 |
|
FBoukenCookieList.Add(AHostName + '=' + ACookieValue); |
| 2505 |
|
end; |
| 2506 |
end; |
end; |
| 2507 |
procedure TSetting.WriteLogFolder(AVal : String); |
procedure TSetting.GetBouken(AHostName: String; var Domain:String; var Cookie:String); |
| 2508 |
|
var |
| 2509 |
|
i : Integer; |
| 2510 |
begin |
begin |
| 2511 |
FLogFolder := AVal; |
Cookie := ''; |
| 2512 |
FLogFolderP := IncludeTrailingPathDelimiter(LogFolder); |
for i := 0 to FBoukenCookieList.Count - 1 do begin |
| 2513 |
|
if ( AnsiPos(FBoukenCookieList.Names[i], AHostName) > 0 ) then begin |
| 2514 |
|
Domain := FBoukenCookieList.Names[i]; |
| 2515 |
|
Cookie := FBoukenCookieList.Values[FBoukenCookieList.Names[i]]; |
| 2516 |
|
Break; |
| 2517 |
|
end; |
| 2518 |
|
end; |
| 2519 |
end; |
end; |
|
end. |
|
| 2520 |
|
|
| 2521 |
|
end. |
| 2522 |
|
|