using System.Collections.Generic;
using UnityEngine;

namespace ScrewsMaster
{
    public partial class PreferencesMgr
    {
        private void OnInitPreferences()
        {
            currency102 = preferences.currency102;
            maxCurrency102 = preferences.maxCurrency102;
            nextNewDayTime = preferences.nextNewDayTime;
            playerName = preferences.playerName;
            playerAvatarId = preferences.playerAvatarId;
            isResetGuide = preferences.isResetGuide;
            gameOfCount = preferences.gameOfCount;
            winOfGame = preferences.winOfGame;
            watchVideoBeginSum = preferences.watchVideoBeginSum;
            isGod = preferences.isGod;
            facebookId = preferences.facebookId;
            facebookName = preferences.facebookName;
            facebookAvatarUrl = preferences.facebookAvatarUrl;
            isFaceBookLogin = preferences.isFaceBookLogin;
            isGuideFinish = preferences.isGuideFinish;
            currentQuestionIndex = preferences.currentQuestionIndex;
            _gameLevel = preferences.GameLevel;
            _battleExp = preferences.BattleExp;
            totalCoins = preferences.TotalCoins;
            adWatchCount = preferences.AdWatchCount;
            _prizeWheelCount = preferences.PrizeWheelCount;
            _prizeWheelTime = preferences.PrizeWheelTime;
            _payBox1 = preferences.PayBox1;
            _payBox2 = preferences.PayBox2;
            _items = preferences.Items;
            exchangeBindGuide = preferences.exchangeBindGuide;
            exchangeAccount = preferences.exchangeAccount;
            exchangeName = preferences.exchangeName;
            inUseSkin = preferences.inUseSkin;
            paypalAccount = preferences.paypalAccount;
            isSuccessRedeem = preferences.isSuccessRedeem;
            isEditInviteCode = preferences.isEditInviteCode;
            webViewMakeUpOnlineTime = preferences.webViewMakeUpOnlineTime;
            webViewADTaskOnlineTime = preferences.webViewADTaskOnlineTime;
            isShowRewardFly101 = preferences.isShowRewardFly101;
            isShowRewardFly102 = preferences.isShowRewardFly102;
            playReawrd111 = preferences.playReawrd111;
            isShowRewardFly111 = preferences.isShowRewardFly111;
            openRewardCount = preferences.openRewardCount;
            interRewardShowLevel = preferences.interRewardShowLevel;
            isShowOpenReward = preferences.isShowOpenReward;
            isRealProcessing = preferences.isRealProcessing;
            realWatchVideo = preferences.realWatchVideo;
            isClickH5Icon = preferences.isClickH5Icon;
            lastClickMainIconTime = preferences.lastClickMainIconTime;
            interH5Url1Count = preferences.interH5Url1Count;
            interH5Url2Count = preferences.interH5Url2Count;
            makeupRealReportGear = preferences.makeupRealReportGear;
            isLastH5Tab = preferences.isLastH5Tab;
            adCashFlyShowTime = preferences.adCashFlyShowTime;
            adTaskCount = preferences.adTaskCount;
            correctAnswerCount = preferences.correctAnswerCount;
            h5StayTime = preferences.h5StayTime;
            videoWatchCount = preferences.videoWatchCount;
            signInCount = preferences.signInCount;
            inviteCount = preferences.inviteCount;
            naiveStepFinish = preferences.naiveStepFinish;
            makeupTaskH5Time = preferences.makeupTaskH5Time;
            makeupConditionMark = preferences.makeupConditionMark;
            gameStartCount = preferences.gameStartCount;
            loginGameTodayTimes = preferences.loginGameTodayTimes;
            videoEffective_count = preferences.videoEffective_count;
            isLogEffective = preferences.isLogEffective;
            data_ver = preferences.data_ver;
            haveBeenGameStart = preferences.haveBeenGameStart;
            date = preferences.date;
            lastLoginDays = preferences.lastLoginDays;
            thisDayWatchSlyderVideoNum = preferences.thisDayWatchSlyderVideoNum;
            nextOpenWheelStampTime = preferences.nextOpenWheelStampTime;
        }

        #region ValueType

        private decimal currency102;


        public decimal Currency102
        {
            get { return (decimal)Mathf.Max((float)currency102, 0); }
            set
            {
                if (currency102 == value) return;
                
                value = (decimal)Mathf.Max((float)value, 0);
                
                ChangeValue<decimal> changeValue = PreferencesDispatcher<decimal>.Instance.changeValue;
                changeValue.oldValue = currency102;
                changeValue.newValue = value;

                currency102 = value;
                preferences.currency102 = currency102;
                AddToAutoDelaySaveList(PreferencesField.currency102, preferences.currency102);
                PreferencesDispatcher<decimal>.Instance.Dispatch(PreferencesMsg.currency102, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.currency102);
            }
        }

        private decimal maxCurrency102;


        public decimal MaxCurrency102
        {
            get { return maxCurrency102; }
            set
            {
                if (maxCurrency102 == value) return;
                ChangeValue<decimal> changeValue = PreferencesDispatcher<decimal>.Instance.changeValue;
                changeValue.oldValue = maxCurrency102;
                changeValue.newValue = value;

                maxCurrency102 = value;
                preferences.maxCurrency102 = maxCurrency102;
                AddToAutoDelaySaveList(PreferencesField.maxCurrency102, preferences.maxCurrency102);
                PreferencesDispatcher<decimal>.Instance.Dispatch(PreferencesMsg.maxCurrency102, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.maxCurrency102);
            }
        }

        private long nextNewDayTime;


        public long NextNewDayTime
        {
            get { return nextNewDayTime; }
            set
            {
                if (nextNewDayTime == value) return;
                ChangeValue<long> changeValue = PreferencesDispatcher<long>.Instance.changeValue;
                changeValue.oldValue = nextNewDayTime;
                changeValue.newValue = value;

                nextNewDayTime = value;
                preferences.nextNewDayTime = nextNewDayTime;
                AddToAutoDelaySaveList(PreferencesField.nextNewDayTime, preferences.nextNewDayTime);
                PreferencesDispatcher<long>.Instance.Dispatch(PreferencesMsg.nextNewDayTime, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.nextNewDayTime);
            }
        }

        private string playerName;


        public string PlayerName
        {
            get { return playerName; }
            set
            {
                if (playerName == value) return;
                ChangeValue<string> changeValue = PreferencesDispatcher<string>.Instance.changeValue;
                changeValue.oldValue = playerName;
                changeValue.newValue = value;

                playerName = value;
                preferences.playerName = playerName;
                AddToAutoDelaySaveList(PreferencesField.playerName, preferences.playerName);
                PreferencesDispatcher<string>.Instance.Dispatch(PreferencesMsg.playerName, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.playerName);
            }
        }

        private int playerAvatarId;


        public int PlayerAvatarId
        {
            get { return playerAvatarId; }
            set
            {
                if (playerAvatarId == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = playerAvatarId;
                changeValue.newValue = value;

                playerAvatarId = value;
                preferences.playerAvatarId = playerAvatarId;
                AddToAutoDelaySaveList(PreferencesField.playerAvatarId, preferences.playerAvatarId);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.playerAvatarId, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.playerAvatarId);
            }
        }

        private bool isResetGuide;

        public bool IsResetGuide
        {
            get { return isResetGuide; }
            set
            {
                if (isResetGuide == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = isResetGuide;
                changeValue.newValue = value;

                isResetGuide = value;
                preferences.isResetGuide = isResetGuide;
                AddToAutoDelaySaveList(PreferencesField.isResetGuide, preferences.isResetGuide);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.isResetGuide, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.isResetGuide);
            }
        }

        private int gameOfCount;


        public int GameOfCount
        {
            get { return gameOfCount; }
            set
            {
                if (gameOfCount == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = gameOfCount;
                changeValue.newValue = value;

                gameOfCount = value;
                preferences.gameOfCount = gameOfCount;
                AddToAutoDelaySaveList(PreferencesField.gameOfCount, preferences.gameOfCount);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.gameOfCount, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.gameOfCount);
            }
        }

        private int winOfGame;


        public int WinOfGame
        {
            get { return winOfGame; }
            set
            {
                if (winOfGame == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = winOfGame;
                changeValue.newValue = value;

                winOfGame = value;
                preferences.winOfGame = winOfGame;
                AddToAutoDelaySaveList(PreferencesField.winOfGame, preferences.winOfGame);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.winOfGame, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.winOfGame);
            }
        }

        private int watchVideoBeginSum;


        public int WatchVideoBeginSum
        {
            get { return watchVideoBeginSum; }
            set
            {
                if (watchVideoBeginSum == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = watchVideoBeginSum;
                changeValue.newValue = value;

                watchVideoBeginSum = value;
                preferences.watchVideoBeginSum = watchVideoBeginSum;
                AddToAutoDelaySaveList(PreferencesField.watchVideoBeginSum, preferences.watchVideoBeginSum);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.watchVideoBeginSum, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.watchVideoBeginSum);
            }
        }

        private bool isGod;


        public bool IsGod
        {
            get { return isGod; }
            set
            {
                if (isGod == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = isGod;
                changeValue.newValue = value;

                isGod = value;
                preferences.isGod = isGod;
                AddToAutoDelaySaveList(PreferencesField.isGod, preferences.isGod);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.isGod, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.isGod);
            }
        }

        private string facebookId;


        public string FacebookId
        {
            get { return facebookId; }
            set
            {
                if (facebookId == value) return;
                ChangeValue<string> changeValue = PreferencesDispatcher<string>.Instance.changeValue;
                changeValue.oldValue = facebookId;
                changeValue.newValue = value;

                facebookId = value;
                preferences.facebookId = facebookId;
                AddToAutoDelaySaveList(PreferencesField.facebookId, preferences.facebookId);
                PreferencesDispatcher<string>.Instance.Dispatch(PreferencesMsg.facebookId, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.facebookId);
            }
        }

        private string facebookName;


        public string FacebookName
        {
            get { return facebookName; }
            set
            {
                if (facebookName == value) return;
                ChangeValue<string> changeValue = PreferencesDispatcher<string>.Instance.changeValue;
                changeValue.oldValue = facebookName;
                changeValue.newValue = value;

                facebookName = value;
                preferences.facebookName = facebookName;
                AddToAutoDelaySaveList(PreferencesField.facebookName, preferences.facebookName);
                PreferencesDispatcher<string>.Instance.Dispatch(PreferencesMsg.facebookName, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.facebookName);
            }
        }

        private string facebookAvatarUrl;


        public string FacebookAvatarUrl
        {
            get { return facebookAvatarUrl; }
            set
            {
                if (facebookAvatarUrl == value) return;
                ChangeValue<string> changeValue = PreferencesDispatcher<string>.Instance.changeValue;
                changeValue.oldValue = facebookAvatarUrl;
                changeValue.newValue = value;

                facebookAvatarUrl = value;
                preferences.facebookAvatarUrl = facebookAvatarUrl;
                AddToAutoDelaySaveList(PreferencesField.facebookAvatarUrl, preferences.facebookAvatarUrl);
                PreferencesDispatcher<string>.Instance.Dispatch(PreferencesMsg.facebookAvatarUrl, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.facebookAvatarUrl);
            }
        }

        private bool isFaceBookLogin;


        public bool IsFaceBookLogin
        {
            get { return isFaceBookLogin; }
            set
            {
                if (isFaceBookLogin == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = isFaceBookLogin;
                changeValue.newValue = value;

                isFaceBookLogin = value;
                preferences.isFaceBookLogin = isFaceBookLogin;
                AddToAutoDelaySaveList(PreferencesField.isFaceBookLogin, preferences.isFaceBookLogin);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.isFaceBookLogin, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.isFaceBookLogin);
            }
        }

        private bool isGuideFinish;


        public bool IsGuideFinish
        {
            get { return isGuideFinish; }
            set
            {
                if (isGuideFinish == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = isGuideFinish;
                changeValue.newValue = value;

                isGuideFinish = value;
                preferences.isGuideFinish = isGuideFinish;
                AddToAutoDelaySaveList(PreferencesField.isGuideFinish, preferences.isGuideFinish);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.isGuideFinish, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.isGuideFinish);
            }
        }

        private int currentQuestionIndex;


        public int CurrentQuestionIndex
        {
            get { return currentQuestionIndex; }
            set
            {
                if (currentQuestionIndex == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = currentQuestionIndex;
                changeValue.newValue = value;

                currentQuestionIndex = value;
                preferences.currentQuestionIndex = currentQuestionIndex;
                AddToAutoDelaySaveList(PreferencesField.currentQuestionIndex, preferences.currentQuestionIndex);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.currentQuestionIndex, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.currentQuestionIndex);
            }
        }

        private int _gameLevel;

        public int GameLevel
        {
            get { return _gameLevel; }
            set
            {
                if (_gameLevel == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = _gameLevel;
                changeValue.newValue = value;

                _gameLevel = value;
                preferences.GameLevel = _gameLevel;
                AddToAutoDelaySaveList(PreferencesField.GameLevel, preferences.GameLevel);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.GameLevel, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.GameLevel);
            }
        }
        
        private int _battleExp;

        public int BattleExp
        {
            get { return _battleExp; }
            set
            {
                if (_battleExp == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = _battleExp;
                changeValue.newValue = value;

                _battleExp = value;
                preferences.BattleExp = _battleExp;
                AddToAutoDelaySaveList(PreferencesField.BattleExp, preferences.BattleExp);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.BattleExp, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.BattleExp);
            }
        }
        
        private int _prizeWheelCount;

        public int PrizeWheelCount
        {
            get { return _prizeWheelCount; }
            set
            {
                if (_prizeWheelCount == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = _prizeWheelCount;
                changeValue.newValue = value;

                _prizeWheelCount = value;
                preferences.PrizeWheelCount = _prizeWheelCount;
                AddToAutoDelaySaveList(PreferencesField.PrizeWheelCount, preferences.PrizeWheelCount);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.PrizeWheelCount, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.PrizeWheelCount);
            }
        }
        
        private long _prizeWheelTime;

        public long PrizeWheelTime
        {
            get { return _prizeWheelTime; }
            set
            {
                if (_prizeWheelTime == value) return;
                ChangeValue<long> changeValue = PreferencesDispatcher<long>.Instance.changeValue;
                changeValue.oldValue = _prizeWheelTime;
                changeValue.newValue = value;

                _prizeWheelTime = value;
                preferences.PrizeWheelTime = _prizeWheelTime;
                AddToAutoDelaySaveList(PreferencesField.PrizeWheelTime, preferences.PrizeWheelTime);
                PreferencesDispatcher<long>.Instance.Dispatch(PreferencesMsg.PrizeWheelTime, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.PrizeWheelTime);
            }
        }
        
        private bool _payBox1;

        public bool PayBox1
        {
            get { return _payBox1; }
            set
            {
                if (_payBox1 == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = _payBox1;
                changeValue.newValue = value;

                _payBox1 = value;
                preferences.PayBox1 = _payBox1;
                AddToAutoDelaySaveList(PreferencesField.PayBox1, preferences.PayBox1);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.PayBox1, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.PayBox1);
            }
        }
        private bool _payBox2;

        public bool PayBox2
        {
            get { return _payBox2; }
            set
            {
                if (_payBox2 == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = _payBox2;
                changeValue.newValue = value;

                _payBox2 = value;
                preferences.PayBox2 = _payBox2;
                AddToAutoDelaySaveList(PreferencesField.PayBox2, preferences.PayBox2);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.PayBox2, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.PayBox2);
            }
        }
        
        private int totalCoins;

        public int  TotalCoins
        {
            get { return totalCoins; }
            set
            {
                if (totalCoins == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = totalCoins;
                changeValue.newValue = value;

                totalCoins = value;
                preferences.TotalCoins = totalCoins;
                AddToAutoDelaySaveList(PreferencesField.TotalCoins, preferences.TotalCoins);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.TotalCoins, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.TotalCoins);
            }
        } 
        
        private int adWatchCount;
        public int  AdWatchCount
        {
            get { return adWatchCount; }
            set
            {
                if (adWatchCount == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = adWatchCount;
                changeValue.newValue = value;

                adWatchCount = value;
                preferences.AdWatchCount = adWatchCount;
                AddToAutoDelaySaveList(PreferencesField.AdWatchCount, preferences.AdWatchCount);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.AdWatchCount, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.AdWatchCount);
            }
        } 
        
        private Dictionary<int, int> _items;

        public Dictionary<int, int>  Items
        {
            get { return _items; }
            set
            {
                if (_items == value) return;
                ChangeValue<Dictionary<int, int>> changeValue = PreferencesDispatcher<Dictionary<int, int>>.Instance.changeValue;
                changeValue.oldValue = _items;
                changeValue.newValue = value;

                _items = value;
                preferences.Items = _items;
                AddToAutoDelaySaveList(PreferencesField.Items, preferences.Items);
                PreferencesDispatcher<Dictionary<int, int>>.Instance.Dispatch(PreferencesMsg.Items, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.Items);
            }
        }

        private bool exchangeBindGuide;


        public bool ExchangeBindGuide
        {
            get { return exchangeBindGuide; }
            set
            {
                if (exchangeBindGuide == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = exchangeBindGuide;
                changeValue.newValue = value;

                exchangeBindGuide = value;
                preferences.exchangeBindGuide = exchangeBindGuide;
                AddToAutoDelaySaveList(PreferencesField.exchangeBindGuide, preferences.exchangeBindGuide);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.exchangeBindGuide, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.exchangeBindGuide);
            }
        }

        private string exchangeAccount;


        public string ExchangeAccount
        {
            get { return exchangeAccount; }
            set
            {
                if (exchangeAccount == value) return;
                ChangeValue<string> changeValue = PreferencesDispatcher<string>.Instance.changeValue;
                changeValue.oldValue = exchangeAccount;
                changeValue.newValue = value;

                exchangeAccount = value;
                preferences.exchangeAccount = exchangeAccount;
                AddToAutoDelaySaveList(PreferencesField.exchangeAccount, preferences.exchangeAccount);
                PreferencesDispatcher<string>.Instance.Dispatch(PreferencesMsg.exchangeAccount, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.exchangeAccount);
            }
        }

        private string exchangeName;


        public string ExchangeName
        {
            get { return exchangeName; }
            set
            {
                if (exchangeName == value) return;
                ChangeValue<string> changeValue = PreferencesDispatcher<string>.Instance.changeValue;
                changeValue.oldValue = exchangeName;
                changeValue.newValue = value;

                exchangeName = value;
                preferences.exchangeName = exchangeName;
                AddToAutoDelaySaveList(PreferencesField.exchangeName, preferences.exchangeName);
                PreferencesDispatcher<string>.Instance.Dispatch(PreferencesMsg.exchangeName, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.exchangeName);
            }
        }

        private int inUseSkin;


        public int InUseSkin
        {
            get { return inUseSkin; }
            set
            {
                if (inUseSkin == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = inUseSkin;
                changeValue.newValue = value;

                inUseSkin = value;
                preferences.inUseSkin = inUseSkin;
                AddToAutoDelaySaveList(PreferencesField.inUseSkin, preferences.inUseSkin);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.inUseSkin, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.inUseSkin);
            }
        }

        private string paypalAccount;


        public string PaypalAccount
        {
            get { return paypalAccount; }
            set
            {
                if (paypalAccount == value) return;
                ChangeValue<string> changeValue = PreferencesDispatcher<string>.Instance.changeValue;
                changeValue.oldValue = paypalAccount;
                changeValue.newValue = value;

                paypalAccount = value;
                preferences.paypalAccount = paypalAccount;
                AddToAutoDelaySaveList(PreferencesField.paypalAccount, preferences.paypalAccount);
                PreferencesDispatcher<string>.Instance.Dispatch(PreferencesMsg.paypalAccount, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.paypalAccount);
            }
        }

        private bool isSuccessRedeem;


        public bool IsSuccessRedeem
        {
            get { return isSuccessRedeem; }
            set
            {
                if (isSuccessRedeem == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = isSuccessRedeem;
                changeValue.newValue = value;

                isSuccessRedeem = value;
                preferences.isSuccessRedeem = isSuccessRedeem;
                AddToAutoDelaySaveList(PreferencesField.isSuccessRedeem, preferences.isSuccessRedeem);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.isSuccessRedeem, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.isSuccessRedeem);
            }
        }

        public string short_name;
        public string long_name;

        private bool isEditInviteCode;

        public bool IsEditInviteCode
        {
            get { return isEditInviteCode; }
            set
            {
                if (isEditInviteCode == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = isEditInviteCode;
                changeValue.newValue = value;

                isEditInviteCode = value;
                preferences.isEditInviteCode = isEditInviteCode;
                AddToAutoDelaySaveList(PreferencesField.isEditInviteCode, preferences.isEditInviteCode);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.isEditInviteCode, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.isEditInviteCode);
            }
        }

        private decimal webViewMakeUpOnlineTime;


        public decimal WebViewMakeUpOnlineTime
        {
            get { return webViewMakeUpOnlineTime; }
            set
            {
                if (webViewMakeUpOnlineTime == value) return;
                ChangeValue<decimal> changeValue = PreferencesDispatcher<decimal>.Instance.changeValue;
                changeValue.oldValue = webViewMakeUpOnlineTime;
                changeValue.newValue = value;

                webViewMakeUpOnlineTime = value;
                preferences.webViewMakeUpOnlineTime = webViewMakeUpOnlineTime;
                AddToAutoDelaySaveList(PreferencesField.webViewMakeUpOnlineTime, preferences.webViewMakeUpOnlineTime);
                PreferencesDispatcher<decimal>.Instance.Dispatch(PreferencesMsg.webViewMakeUpOnlineTime, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.webViewMakeUpOnlineTime);
            }
        }

        private decimal webViewADTaskOnlineTime;

        public decimal WebViewADTaskOnlineTime
        {
            get { return webViewADTaskOnlineTime; }
            set
            {
                if (webViewADTaskOnlineTime == value) return;
                ChangeValue<decimal> changeValue = PreferencesDispatcher<decimal>.Instance.changeValue;
                changeValue.oldValue = webViewADTaskOnlineTime;
                changeValue.newValue = value;

                webViewADTaskOnlineTime = value;
                preferences.webViewADTaskOnlineTime = webViewADTaskOnlineTime;
                AddToAutoDelaySaveList(PreferencesField.webViewADTaskOnlineTime, preferences.webViewADTaskOnlineTime);
                PreferencesDispatcher<decimal>.Instance.Dispatch(PreferencesMsg.webViewADTaskOnlineTime, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.webViewADTaskOnlineTime);
            }
        }

        private bool isShowRewardFly102;

        public bool IsShowRewardFly102
        {
            get { return isShowRewardFly102; }
            set
            {
                if (isShowRewardFly102 == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = isShowRewardFly102;
                changeValue.newValue = value;

                isShowRewardFly102 = value;
                preferences.isShowRewardFly102 = isShowRewardFly102;
                AddToAutoDelaySaveList(PreferencesField.isShowRewardFly102, preferences.isShowRewardFly102);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.isShowRewardFly102, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.isShowRewardFly102);
            }
        }

        private bool isShowRewardFly101;


        public bool IsShowRewardFly101
        {
            get { return isShowRewardFly101; }
            set
            {
                if (isShowRewardFly101 == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = isShowRewardFly101;
                changeValue.newValue = value;

                isShowRewardFly101 = value;
                preferences.isShowRewardFly101 = isShowRewardFly101;
                AddToAutoDelaySaveList(PreferencesField.isShowRewardFly101, preferences.isShowRewardFly101);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.isShowRewardFly101, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.isShowRewardFly101);
            }
        }

        private decimal playReawrd111;


        public decimal PlayReawrd111
        {
            get { return playReawrd111; }
            set
            {
                if (playReawrd111 == value) return;
                ChangeValue<decimal> changeValue = PreferencesDispatcher<decimal>.Instance.changeValue;
                changeValue.oldValue = playReawrd111;
                changeValue.newValue = value;

                playReawrd111 = value;
                preferences.playReawrd111 = playReawrd111;
                AddToAutoDelaySaveList(PreferencesField.playReawrd111, preferences.playReawrd111);
                PreferencesDispatcher<decimal>.Instance.Dispatch(PreferencesMsg.playReawrd111, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.playReawrd111);
            }
        }

        private bool isShowRewardFly111;


        public bool IsShowRewardFly111
        {
            get { return isShowRewardFly111; }
            set
            {
                if (isShowRewardFly111 == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = isShowRewardFly111;
                changeValue.newValue = value;

                isShowRewardFly111 = value;
                preferences.isShowRewardFly111 = isShowRewardFly111;
                AddToAutoDelaySaveList(PreferencesField.isShowRewardFly111, preferences.isShowRewardFly111);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.isShowRewardFly111, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.isShowRewardFly111);
            }
        }

        private int openRewardCount;


        public int OpenRewardCount
        {
            get { return openRewardCount; }
            set
            {
                if (openRewardCount == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = openRewardCount;
                changeValue.newValue = value;

                openRewardCount = value;
                preferences.openRewardCount = openRewardCount;
                AddToAutoDelaySaveList(PreferencesField.openRewardCount, preferences.openRewardCount);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.openRewardCount, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.openRewardCount);
            }
        }

        private int interRewardShowLevel;


        public int InterRewardShowLevel
        {
            get { return interRewardShowLevel; }
            set
            {
                if (interRewardShowLevel == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = interRewardShowLevel;
                changeValue.newValue = value;

                interRewardShowLevel = value;
                preferences.interRewardShowLevel = interRewardShowLevel;
                AddToAutoDelaySaveList(PreferencesField.interRewardShowLevel, preferences.interRewardShowLevel);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.interRewardShowLevel, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.interRewardShowLevel);
            }
        }

        private bool isShowOpenReward;


        public bool IsShowOpenReward
        {
            get { return isShowOpenReward; }
            set
            {
                if (isShowOpenReward == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = isShowOpenReward;
                changeValue.newValue = value;

                isShowOpenReward = value;
                preferences.isShowOpenReward = isShowOpenReward;
                AddToAutoDelaySaveList(PreferencesField.isShowOpenReward, preferences.isShowOpenReward);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.isShowOpenReward, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.isShowOpenReward);
            }
        }

        private bool isRealProcessing;

        public bool IsRealProcessing
        {
            get { return isRealProcessing; }
            set
            {
                if (isRealProcessing == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = isRealProcessing;
                changeValue.newValue = value;

                isRealProcessing = value;
                preferences.isRealProcessing = isRealProcessing;
                AddToAutoDelaySaveList(PreferencesField.isRealProcessing, preferences.isRealProcessing);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.isRealProcessing, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.isRealProcessing);
            }
        }

        private int realWatchVideo;


        public int RealWatchVideo
        {
            get { return realWatchVideo; }
            set
            {
                if (realWatchVideo == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = realWatchVideo;
                changeValue.newValue = value;

                realWatchVideo = value;
                preferences.realWatchVideo = realWatchVideo;
                AddToAutoDelaySaveList(PreferencesField.realWatchVideo, preferences.realWatchVideo);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.realWatchVideo, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.realWatchVideo);
            }
        }

        private bool isClickH5Icon;


        public bool IsClickH5Icon
        {
            get { return isClickH5Icon; }
            set
            {
                if (isClickH5Icon == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = isClickH5Icon;
                changeValue.newValue = value;

                isClickH5Icon = value;
                preferences.isClickH5Icon = isClickH5Icon;
                AddToAutoDelaySaveList(PreferencesField.isClickH5Icon, preferences.isClickH5Icon);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.isClickH5Icon, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.isClickH5Icon);
            }
        }

        private long lastClickMainIconTime;


        public long LastClickMainIconTime
        {
            get { return lastClickMainIconTime; }
            set
            {
                if (lastClickMainIconTime == value) return;
                ChangeValue<long> changeValue = PreferencesDispatcher<long>.Instance.changeValue;
                changeValue.oldValue = lastClickMainIconTime;
                changeValue.newValue = value;

                lastClickMainIconTime = value;
                preferences.lastClickMainIconTime = lastClickMainIconTime;
                AddToAutoDelaySaveList(PreferencesField.lastClickMainIconTime, preferences.lastClickMainIconTime);
                PreferencesDispatcher<long>.Instance.Dispatch(PreferencesMsg.lastClickMainIconTime, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.lastClickMainIconTime);
            }
        }

        private int interH5Url1Count;

        public int InterH5Url1Count
        {
            get { return interH5Url1Count; }
            set
            {
                if (interH5Url1Count == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = interH5Url1Count;
                changeValue.newValue = value;

                interH5Url1Count = value;
                preferences.interH5Url1Count = interH5Url1Count;
                AddToAutoDelaySaveList(PreferencesField.interH5Url1Count, preferences.interH5Url1Count);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.interH5Url1Count, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.interH5Url1Count);
            }
        }

        private int interH5Url2Count;

        public int InterH5Url2Count
        {
            get { return interH5Url2Count; }
            set
            {
                if (interH5Url2Count == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = interH5Url2Count;
                changeValue.newValue = value;

                interH5Url2Count = value;
                preferences.interH5Url2Count = interH5Url2Count;
                AddToAutoDelaySaveList(PreferencesField.interH5Url2Count, preferences.interH5Url2Count);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.interH5Url2Count, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.interH5Url2Count);
            }
        }

        private int makeupRealReportGear;

        public int MakeupRealReportGear
        {
            get { return makeupRealReportGear; }
            set
            {
                if (makeupRealReportGear == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = makeupRealReportGear;
                changeValue.newValue = value;

                makeupRealReportGear = value;
                preferences.makeupRealReportGear = makeupRealReportGear;
                AddToAutoDelaySaveList(PreferencesField.makeupRealReportGear, preferences.makeupRealReportGear);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.makeupRealReportGear, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.makeupRealReportGear);
            }
        }

        private bool isLastH5Tab;


        public bool IsLastH5Tab
        {
            get { return isLastH5Tab; }
            set
            {
                if (isLastH5Tab == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = isLastH5Tab;
                changeValue.newValue = value;

                isLastH5Tab = value;
                preferences.isLastH5Tab = isLastH5Tab;
                AddToAutoDelaySaveList(PreferencesField.isLastH5Tab, preferences.isLastH5Tab);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.isLastH5Tab, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.isLastH5Tab);
            }
        }

        private long adCashFlyShowTime;


        public long AdCashFlyShowTime
        {
            get { return adCashFlyShowTime; }
            set
            {
                if (adCashFlyShowTime == value) return;
                ChangeValue<long> changeValue = PreferencesDispatcher<long>.Instance.changeValue;
                changeValue.oldValue = adCashFlyShowTime;
                changeValue.newValue = value;

                adCashFlyShowTime = value;
                preferences.adCashFlyShowTime = adCashFlyShowTime;
                AddToAutoDelaySaveList(PreferencesField.adCashFlyShowTime, preferences.adCashFlyShowTime);
                PreferencesDispatcher<long>.Instance.Dispatch(PreferencesMsg.adCashFlyShowTime, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.adCashFlyShowTime);
            }
        }

        private int adTaskCount;


        public int AdTaskCount
        {
            get { return adTaskCount; }
            set
            {
                if (adTaskCount == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = adTaskCount;
                changeValue.newValue = value;

                adTaskCount = value;
                preferences.adTaskCount = adTaskCount;
                AddToAutoDelaySaveList(PreferencesField.adTaskCount, preferences.adTaskCount);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.adTaskCount, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.adTaskCount);
            }
        }

        private int correctAnswerCount;


        public int CorrectAnswerCount
        {
            get { return correctAnswerCount; }
            set
            {
                if (correctAnswerCount == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = correctAnswerCount;
                changeValue.newValue = value;

                correctAnswerCount = value;
                preferences.correctAnswerCount = correctAnswerCount;
                AddToAutoDelaySaveList(PreferencesField.correctAnswerCount, preferences.correctAnswerCount);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.correctAnswerCount, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.correctAnswerCount);
            }
        }

        private int h5StayTime;


        public int H5StayTime
        {
            get { return h5StayTime; }
            set
            {
                if (h5StayTime == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = h5StayTime;
                changeValue.newValue = value;

                h5StayTime = value;
                preferences.h5StayTime = h5StayTime;
                AddToAutoDelaySaveList(PreferencesField.h5StayTime, preferences.h5StayTime);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.h5StayTime, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.h5StayTime);
            }
        }

        private int videoWatchCount;


        public int VideoWatchCount
        {
            get { return videoWatchCount; }
            set
            {
                if (videoWatchCount == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = videoWatchCount;
                changeValue.newValue = value;

                videoWatchCount = value;
                preferences.videoWatchCount = videoWatchCount;
                AddToAutoDelaySaveList(PreferencesField.videoWatchCount, preferences.videoWatchCount);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.videoWatchCount, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.videoWatchCount);
            }
        }

        private int signInCount;


        public int SignInCount
        {
            get { return signInCount; }
            set
            {
                if (signInCount == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = signInCount;
                changeValue.newValue = value;

                signInCount = value;
                preferences.signInCount = signInCount;
                AddToAutoDelaySaveList(PreferencesField.signInCount, preferences.signInCount);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.signInCount, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.signInCount);
            }
        }

        private int inviteCount;


        public int InviteCount
        {
            get { return inviteCount; }
            set
            {
                if (inviteCount == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = inviteCount;
                changeValue.newValue = value;

                inviteCount = value;
                preferences.inviteCount = inviteCount;
                AddToAutoDelaySaveList(PreferencesField.inviteCount, preferences.inviteCount);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.inviteCount, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.inviteCount);
            }
        }

        private bool naiveStepFinish;


        public bool NaiveStepFinish
        {
            get { return naiveStepFinish; }
            set
            {
                if (naiveStepFinish == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = naiveStepFinish;
                changeValue.newValue = value;

                naiveStepFinish = value;
                preferences.naiveStepFinish = naiveStepFinish;
                AddToAutoDelaySaveList(PreferencesField.naiveStepFinish, preferences.naiveStepFinish);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.naiveStepFinish, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.naiveStepFinish);
            }
        }

        private decimal makeupTaskH5Time;


        public decimal MakeupTaskH5Time
        {
            get { return makeupTaskH5Time; }
            set
            {
                if (makeupTaskH5Time == value) return;
                ChangeValue<decimal> changeValue = PreferencesDispatcher<decimal>.Instance.changeValue;
                changeValue.oldValue = makeupTaskH5Time;
                changeValue.newValue = value;

                makeupTaskH5Time = value;
                preferences.makeupTaskH5Time = makeupTaskH5Time;
                AddToAutoDelaySaveList(PreferencesField.makeupTaskH5Time, preferences.makeupTaskH5Time);
                PreferencesDispatcher<decimal>.Instance.Dispatch(PreferencesMsg.makeupTaskH5Time, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.makeupTaskH5Time);
            }
        }

        private bool makeupConditionMark;


        public bool MakeupConditionMark
        {
            get { return makeupConditionMark; }
            set
            {
                if (makeupConditionMark == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = makeupConditionMark;
                changeValue.newValue = value;

                makeupConditionMark = value;
                preferences.makeupConditionMark = makeupConditionMark;
                AddToAutoDelaySaveList(PreferencesField.makeupConditionMark, preferences.makeupConditionMark);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.makeupConditionMark, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.makeupConditionMark);
            }
        }

        private int gameStartCount;


        public int GameStartCount
        {
            get { return gameStartCount; }
            set
            {
                if (gameStartCount == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = gameStartCount;
                changeValue.newValue = value;

                gameStartCount = value;
                preferences.gameStartCount = gameStartCount;
                AddToAutoDelaySaveList(PreferencesField.gameStartCount, preferences.gameStartCount);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.gameStartCount, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.gameStartCount);
            }
        }

        private int loginGameTodayTimes;


        public int LoginGameTodayTimes
        {
            get { return loginGameTodayTimes; }
            set
            {
                if (loginGameTodayTimes == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = loginGameTodayTimes;
                changeValue.newValue = value;

                loginGameTodayTimes = value;
                preferences.loginGameTodayTimes = loginGameTodayTimes;
                AddToAutoDelaySaveList(PreferencesField.loginGameTodayTimes, preferences.loginGameTodayTimes);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.loginGameTodayTimes, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.loginGameTodayTimes);
            }
        }

        private int videoEffective_count;


        public int VideoEffective_count
        {
            get { return videoEffective_count; }
            set
            {
                if (videoEffective_count == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = videoEffective_count;
                changeValue.newValue = value;

                videoEffective_count = value;
                preferences.videoEffective_count = videoEffective_count;
                AddToAutoDelaySaveList(PreferencesField.videoEffective_count, preferences.videoEffective_count);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.videoEffective_count, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.videoEffective_count);
            }
        }

        private bool isLogEffective;


        public bool IsLogEffective
        {
            get { return isLogEffective; }
            set
            {
                if (isLogEffective == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = isLogEffective;
                changeValue.newValue = value;

                isLogEffective = value;
                preferences.isLogEffective = isLogEffective;
                AddToAutoDelaySaveList(PreferencesField.isLogEffective, preferences.isLogEffective);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.isLogEffective, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.isLogEffective);
            }
        }

        private long data_ver;


        public long Data_ver
        {
            get { return data_ver; }
            set
            {
                if (data_ver == value) return;
                ChangeValue<long> changeValue = PreferencesDispatcher<long>.Instance.changeValue;
                changeValue.oldValue = data_ver;
                changeValue.newValue = value;

                data_ver = value;
                preferences.data_ver = data_ver;
                Save(PreferencesField.data_ver, preferences.data_ver);
                PreferencesDispatcher<long>.Instance.Dispatch(PreferencesMsg.data_ver, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.data_ver);
            }
        }

        private bool haveBeenGameStart;


        public bool HaveBeenGameStart
        {
            get { return haveBeenGameStart; }
            set
            {
                if (haveBeenGameStart == value) return;
                ChangeValue<bool> changeValue = PreferencesDispatcher<bool>.Instance.changeValue;
                changeValue.oldValue = haveBeenGameStart;
                changeValue.newValue = value;

                haveBeenGameStart = value;
                preferences.haveBeenGameStart = haveBeenGameStart;
                AddToAutoDelaySaveList(PreferencesField.haveBeenGameStart, preferences.haveBeenGameStart);
                PreferencesDispatcher<bool>.Instance.Dispatch(PreferencesMsg.haveBeenGameStart, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.haveBeenGameStart);
            }
        }

        private string date;


        public string Date
        {
            get { return date; }
            set
            {
                if (date == value) return;
                ChangeValue<string> changeValue = PreferencesDispatcher<string>.Instance.changeValue;
                changeValue.oldValue = date;
                changeValue.newValue = value;

                date = value;
                preferences.date = date;
                AddToAutoDelaySaveList(PreferencesField.date, preferences.date);
                PreferencesDispatcher<string>.Instance.Dispatch(PreferencesMsg.date, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.date);
            }
        }

        private int lastLoginDays;


        public int LastLoginDays
        {
            get { return lastLoginDays; }
            set
            {
                if (lastLoginDays == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = lastLoginDays;
                changeValue.newValue = value;

                lastLoginDays = value;
                preferences.lastLoginDays = lastLoginDays;
                AddToAutoDelaySaveList(PreferencesField.lastLoginDays, preferences.lastLoginDays);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.lastLoginDays, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.lastLoginDays);
            }
        }

        #endregion

        #region RefType

        public List<long> SignState
        {
            get
            {
                if (preferences.signState == null) preferences.signState = new List<long>();
                return preferences.signState;
            }
        }

        public void SaveSignState()
        {
            AddToAutoDelaySaveList(PreferencesField.signState, SignState);
            PreferencesDispatcher<object>.Instance.Dispatch(PreferencesMsg.signState);
            dataDispatcher.Dispatch(PreferencesMsg.signState);
        }


        public List<int> CompleteGuideList
        {
            get
            {
                if (preferences.completeGuideList == null) preferences.completeGuideList = new List<int>();
                return preferences.completeGuideList;
            }
        }

        public void SaveCompleteGuideList()
        {
            AddToAutoDelaySaveList(PreferencesField.completeGuideList, CompleteGuideList);
            PreferencesDispatcher<object>.Instance.Dispatch(PreferencesMsg.completeGuideList);
            dataDispatcher.Dispatch(PreferencesMsg.completeGuideList);
        }


        public List<string> OnceStatistcList
        {
            get
            {
                if (preferences.onceStatistcList == null) preferences.onceStatistcList = new List<string>();
                return preferences.onceStatistcList;
            }
        }

        public void SaveOnceStatistcList()
        {
            AddToAutoDelaySaveList(PreferencesField.onceStatistcList, OnceStatistcList);
            PreferencesDispatcher<object>.Instance.Dispatch(PreferencesMsg.onceStatistcList);
            dataDispatcher.Dispatch(PreferencesMsg.onceStatistcList);
        }


        public List<int> HaveRedeemedSkin
        {
            get
            {
                if (preferences.haveRedeemedSkin == null) preferences.haveRedeemedSkin = new List<int>();
                return preferences.haveRedeemedSkin;
            }
        }

        public void SaveHaveRedeemedSkin()
        {
            AddToAutoDelaySaveList(PreferencesField.haveRedeemedSkin, HaveRedeemedSkin);
            PreferencesDispatcher<object>.Instance.Dispatch(PreferencesMsg.haveRedeemedSkin);
            dataDispatcher.Dispatch(PreferencesMsg.haveRedeemedSkin);
        }

        public List<InviteData> InviteDataList
        {
            get
            {
                if (preferences.inviteDataList == null) preferences.inviteDataList = new List<InviteData>();
                return preferences.inviteDataList;
            }
        }

        public void SaveInviteDataList()
        {
            AddToAutoDelaySaveList(PreferencesField.inviteDataList, InviteDataList);
            PreferencesDispatcher<object>.Instance.Dispatch(PreferencesMsg.inviteDataList);
            dataDispatcher.Dispatch(PreferencesMsg.inviteDataList);
        }


        public List<InviteRecord> InviteRecordList
        {
            get
            {
                if (preferences.inviteRecordList == null) preferences.inviteRecordList = new List<InviteRecord>();
                return preferences.inviteRecordList;
            }
        }

        public void SaveInviteRecordList()
        {
            AddToAutoDelaySaveList(PreferencesField.inviteRecordList, InviteRecordList);
            PreferencesDispatcher<object>.Instance.Dispatch(PreferencesMsg.inviteRecordList);
            dataDispatcher.Dispatch(PreferencesMsg.inviteRecordList);
        }


        public List<InviteMakeUpHistory> InviteMakeUpHistoryList
        {
            get
            {
                if (preferences.inviteMakeUpHistoryList == null)
                    preferences.inviteMakeUpHistoryList = new List<InviteMakeUpHistory>();
                return preferences.inviteMakeUpHistoryList;
            }
        }

        public void SaveInviteMakeUpHistoryList()
        {
            AddToAutoDelaySaveList(PreferencesField.inviteMakeUpHistoryList, InviteMakeUpHistoryList);
            PreferencesDispatcher<object>.Instance.Dispatch(PreferencesMsg.inviteMakeUpHistoryList);
            dataDispatcher.Dispatch(PreferencesMsg.inviteMakeUpHistoryList);
        }

        public List<int> MakeupSatisfyGears
        {
            get
            {
                if (preferences.makeupSatisfyGears == null) preferences.makeupSatisfyGears = new List<int>();
                return preferences.makeupSatisfyGears;
            }
        }

        public void SaveMakeupSatisfyGears()
        {
            AddToAutoDelaySaveList(PreferencesField.makeupSatisfyGears, MakeupSatisfyGears);
            PreferencesDispatcher<object>.Instance.Dispatch(PreferencesMsg.makeupSatisfyGears);
            dataDispatcher.Dispatch(PreferencesMsg.makeupSatisfyGears);
        }


        public List<AdTaskData> AdTaskDataList
        {
            get
            {
                if (preferences.adTaskDataList == null) preferences.adTaskDataList = new List<AdTaskData>();
                return preferences.adTaskDataList;
            }
        }

        public void SaveAdTaskDataList()
        {
            AddToAutoDelaySaveList(PreferencesField.adTaskDataList, AdTaskDataList);
            PreferencesDispatcher<object>.Instance.Dispatch(PreferencesMsg.adTaskDataList);
            dataDispatcher.Dispatch(PreferencesMsg.adTaskDataList);
        }


        public List<bool> AchievementAnswerList
        {
            get
            {
                if (preferences.achievementAnswerList == null) preferences.achievementAnswerList = new List<bool>();
                return preferences.achievementAnswerList;
            }
        }

        public void SaveAchievementAnswerList()
        {
            AddToAutoDelaySaveList(PreferencesField.achievementAnswerList, AchievementAnswerList);
            PreferencesDispatcher<object>.Instance.Dispatch(PreferencesMsg.achievementAnswerList);
            dataDispatcher.Dispatch(PreferencesMsg.achievementAnswerList);
        }


        public List<bool> AchievementSignInList
        {
            get
            {
                if (preferences.achievementSignInList == null) preferences.achievementSignInList = new List<bool>();
                return preferences.achievementSignInList;
            }
        }

        public void SaveAchievementSignInList()
        {
            AddToAutoDelaySaveList(PreferencesField.achievementSignInList, AchievementSignInList);
            PreferencesDispatcher<object>.Instance.Dispatch(PreferencesMsg.achievementSignInList);
            dataDispatcher.Dispatch(PreferencesMsg.achievementSignInList);
        }


        public List<MakeupTaskData> MakeupTaskHistory
        {
            get
            {
                if (preferences.makeupTaskHistory == null) preferences.makeupTaskHistory = new List<MakeupTaskData>();
                return preferences.makeupTaskHistory;
            }
        }

        public void SaveMakeupTaskHistory()
        {
            AddToAutoDelaySaveList(PreferencesField.makeupTaskHistory, MakeupTaskHistory);
            PreferencesDispatcher<object>.Instance.Dispatch(PreferencesMsg.makeupTaskHistory);
            dataDispatcher.Dispatch(PreferencesMsg.makeupTaskHistory);
        }

        public Dictionary<string, bool> StatisticDictionary
        {
            get
            {
                if (preferences.statisticDictionary == null)
                    preferences.statisticDictionary = new Dictionary<string, bool>();
                return preferences.statisticDictionary;
            }
        }

        public void SaveStatisticDictionary()
        {
            AddToAutoDelaySaveList(PreferencesField.statisticDictionary, StatisticDictionary);
            PreferencesDispatcher<object>.Instance.Dispatch(PreferencesMsg.statisticDictionary);
            dataDispatcher.Dispatch(PreferencesMsg.statisticDictionary);
        }

        #endregion

        private long nextOpenWheelStampTime;


        public long NextOpenWheelStampTime
        {
            get { return nextOpenWheelStampTime; }
            set
            {
                if (nextOpenWheelStampTime == value) return;
                ChangeValue<long> changeValue = PreferencesDispatcher<long>.Instance.changeValue;
                changeValue.oldValue = nextOpenWheelStampTime;
                changeValue.newValue = value;

                nextOpenWheelStampTime = value;
                preferences.nextOpenWheelStampTime = nextOpenWheelStampTime;
                AddToAutoDelaySaveList(PreferencesField.nextOpenWheelStampTime, preferences.nextOpenWheelStampTime);
                PreferencesDispatcher<long>.Instance.Dispatch(PreferencesMsg.nextOpenWheelStampTime, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.nextOpenWheelStampTime);
            }
        }

        private int thisDayWatchSlyderVideoNum;


        public int ThisDayWatchSlyderVideoNum
        {
            get { return thisDayWatchSlyderVideoNum; }
            set
            {
                if (thisDayWatchSlyderVideoNum == value) return;
                ChangeValue<int> changeValue = PreferencesDispatcher<int>.Instance.changeValue;
                changeValue.oldValue = thisDayWatchSlyderVideoNum;
                changeValue.newValue = value;

                thisDayWatchSlyderVideoNum = value;
                preferences.thisDayWatchSlyderVideoNum = thisDayWatchSlyderVideoNum;
                AddToAutoDelaySaveList(PreferencesField.thisDayWatchSlyderVideoNum,
                    preferences.thisDayWatchSlyderVideoNum);
                PreferencesDispatcher<int>.Instance.Dispatch(PreferencesMsg.thisDayWatchSlyderVideoNum, changeValue);
                dataDispatcher.Dispatch(PreferencesMsg.thisDayWatchSlyderVideoNum);
            }
        }
    }
}