void SaveOriData(BlastRecordInfoView view)
 {
     view.oriImgGroupShow    = _imgGroupShow;
     view.oriTextGroupShow   = _textGroupShow;
     view.oriIconGroupShow   = _iconGroupShow;
     view.oriMySelfMaskShow  = _mySelfMaskShow;
     view.oriDeathMaskShow   = _deathMaskShow;
     view.oriDeadIconShow    = _deadIconShow;
     view.oriBombIconShow    = _bombIconShow;
     view.oriRankText        = _rankText;
     view.oriRankColor       = _rankColor;
     view.oriPlayerNameText  = _playerNameText;
     view.oriPlayerNameColor = _playerNameColor;
     view.oriCorpsText       = _corpsText;
     view.oriCorpsColor      = _corpsColor;
     view.oriKillText        = _killText;
     view.oriKillColor       = _killColor;
     view.oriDamageText      = _damageText;
     view.oriDamageColor     = _damageColor;
     view.oriDeadText        = _deadText;
     view.oriDeadColor       = _deadColor;
     view.oriAssistText      = _assistText;
     view.oriAssistColor     = _assistColor;
     view.oriPingText        = _pingText;
     view.oriPingColor       = _pingColor;
     view.oriBombText        = _bombText;
     view.oriBombColor       = _bombColor;
 }
 void SaveOriData(BlastRecordInfoView view)
 {
     view.oriImgGroupShow      = _imgGroupShow;
     view.oriTextGroupShow     = _textGroupShow;
     view.oriIconGroupShow     = _iconGroupShow;
     view.oriBadgeGroupShow    = _badgeGroupShow;
     view.oriMySelfMaskShow    = _mySelfMaskShow;
     view.oriDeadStateShow     = _deadStateShow;
     view.oriHurtStateShow     = _hurtStateShow;
     view.oriBombIconShow      = _bombIconShow;
     view.oriRankText          = _rankText;
     view.oriRankColor         = _rankColor;
     view.oriPlayerNameText    = _playerNameText;
     view.oriPlayerNameColor   = _playerNameColor;
     view.oriCorpsText         = _corpsText;
     view.oriCorpsColor        = _corpsColor;
     view.oriKillText          = _killText;
     view.oriKillColor         = _killColor;
     view.oriDamageText        = _damageText;
     view.oriDamageColor       = _damageColor;
     view.oriDeadText          = _deadText;
     view.oriDeadColor         = _deadColor;
     view.oriAssistText        = _assistText;
     view.oriAssistColor       = _assistColor;
     view.oriBombText          = _bombText;
     view.oriBombColor         = _bombColor;
     view.oriBadgeNormalBgShow = _badgeNormalBgShow;
     view.oriBadgeMySelfBgShow = _badgeMySelfBgShow;
     view.oriBadgeHurtBgShow   = _badgeHurtBgShow;
     view.oriBadgeDeadBgShow   = _badgeDeadBgShow;
     view.oriBadgeIconBundle   = _badgeIconBundle;
     view.oriBadgeIconAsset    = _badgeIconAsset;
 }
 void DataInit(BlastRecordInfoView view)
 {
     _imgGroupShow    = view.ImgGroupShow.activeSelf;
     _textGroupShow   = view.TextGroupShow.activeSelf;
     _iconGroupShow   = view.IconGroupShow.activeSelf;
     _mySelfMaskShow  = view.MySelfMaskShow.enabled;
     _deathMaskShow   = view.DeathMaskShow.enabled;
     _deadIconShow    = view.DeadIconShow.enabled;
     _bombIconShow    = view.BombIconShow.enabled;
     _rankText        = view.RankText.text;
     _rankColor       = view.RankColor.color;
     _playerNameText  = view.PlayerNameText.text;
     _playerNameColor = view.PlayerNameColor.color;
     _corpsText       = view.CorpsText.text;
     _corpsColor      = view.CorpsColor.color;
     _killText        = view.KillText.text;
     _killColor       = view.KillColor.color;
     _damageText      = view.DamageText.text;
     _damageColor     = view.DamageColor.color;
     _deadText        = view.DeadText.text;
     _deadColor       = view.DeadColor.color;
     _assistText      = view.AssistText.text;
     _assistColor     = view.AssistColor.color;
     _pingText        = view.PingText.text;
     _pingColor       = view.PingColor.color;
     _bombText        = view.BombText.text;
     _bombColor       = view.BombColor.color;
 }
 void DataInit(BlastRecordInfoView view)
 {
     _imgGroupShow      = view.ImgGroupShow.activeSelf;
     _textGroupShow     = view.TextGroupShow.activeSelf;
     _iconGroupShow     = view.IconGroupShow.activeSelf;
     _badgeGroupShow    = view.BadgeGroupShow.activeSelf;
     _mySelfMaskShow    = view.MySelfMaskShow.enabled;
     _deadStateShow     = view.DeadStateShow.enabled;
     _hurtStateShow     = view.HurtStateShow.enabled;
     _bombIconShow      = view.BombIconShow.enabled;
     _rankText          = view.RankText.text;
     _rankColor         = view.RankColor.color;
     _playerNameText    = view.PlayerNameText.text;
     _playerNameColor   = view.PlayerNameColor.color;
     _corpsText         = view.CorpsText.text;
     _corpsColor        = view.CorpsColor.color;
     _killText          = view.KillText.text;
     _killColor         = view.KillColor.color;
     _damageText        = view.DamageText.text;
     _damageColor       = view.DamageColor.color;
     _deadText          = view.DeadText.text;
     _deadColor         = view.DeadColor.color;
     _assistText        = view.AssistText.text;
     _assistColor       = view.AssistColor.color;
     _bombText          = view.BombText.text;
     _bombColor         = view.BombColor.color;
     _badgeNormalBgShow = view.BadgeNormalBgShow.enabled;
     _badgeMySelfBgShow = view.BadgeMySelfBgShow.enabled;
     _badgeHurtBgShow   = view.BadgeHurtBgShow.enabled;
     _badgeDeadBgShow   = view.BadgeDeadBgShow.enabled;
     _badgeIconBundle   = view.BadgeIconBundle.BundleName;
     _badgeIconAsset    = view.BadgeIconAsset.AssetName;
 }
        void ViewBind(BlastRecordInfoView view)
        {
            BindingSet <BlastRecordInfoView, BlastRecordInfoViewModel> bindingSet =
                view.CreateBindingSet <BlastRecordInfoView, BlastRecordInfoViewModel>();

            bindingSet.Bind(view.ImgGroupShow).For(v => v.activeSelf).To(vm => vm.ImgGroupShow).OneWay();
            bindingSet.Bind(view.TextGroupShow).For(v => v.activeSelf).To(vm => vm.TextGroupShow).OneWay();
            bindingSet.Bind(view.IconGroupShow).For(v => v.activeSelf).To(vm => vm.IconGroupShow).OneWay();
            bindingSet.Bind(view.BadgeGroupShow).For(v => v.activeSelf).To(vm => vm.BadgeGroupShow).OneWay();
            bindingSet.Bind(view.MySelfMaskShow).For(v => v.enabled).To(vm => vm.MySelfMaskShow).OneWay();
            bindingSet.Bind(view.DeadStateShow).For(v => v.enabled).To(vm => vm.DeadStateShow).OneWay();
            bindingSet.Bind(view.HurtStateShow).For(v => v.enabled).To(vm => vm.HurtStateShow).OneWay();
            bindingSet.Bind(view.BombIconShow).For(v => v.enabled).To(vm => vm.BombIconShow).OneWay();
            bindingSet.Bind(view.RankText).For(v => v.text).To(vm => vm.RankText).OneWay();
            bindingSet.Bind(view.RankColor).For(v => v.color).To(vm => vm.RankColor).OneWay();
            bindingSet.Bind(view.PlayerNameText).For(v => v.text).To(vm => vm.PlayerNameText).OneWay();
            bindingSet.Bind(view.PlayerNameColor).For(v => v.color).To(vm => vm.PlayerNameColor).OneWay();
            bindingSet.Bind(view.CorpsText).For(v => v.text).To(vm => vm.CorpsText).OneWay();
            bindingSet.Bind(view.CorpsColor).For(v => v.color).To(vm => vm.CorpsColor).OneWay();
            bindingSet.Bind(view.KillText).For(v => v.text).To(vm => vm.KillText).OneWay();
            bindingSet.Bind(view.KillColor).For(v => v.color).To(vm => vm.KillColor).OneWay();
            bindingSet.Bind(view.DamageText).For(v => v.text).To(vm => vm.DamageText).OneWay();
            bindingSet.Bind(view.DamageColor).For(v => v.color).To(vm => vm.DamageColor).OneWay();
            bindingSet.Bind(view.DeadText).For(v => v.text).To(vm => vm.DeadText).OneWay();
            bindingSet.Bind(view.DeadColor).For(v => v.color).To(vm => vm.DeadColor).OneWay();
            bindingSet.Bind(view.AssistText).For(v => v.text).To(vm => vm.AssistText).OneWay();
            bindingSet.Bind(view.AssistColor).For(v => v.color).To(vm => vm.AssistColor).OneWay();
            bindingSet.Bind(view.BombText).For(v => v.text).To(vm => vm.BombText).OneWay();
            bindingSet.Bind(view.BombColor).For(v => v.color).To(vm => vm.BombColor).OneWay();
            bindingSet.Bind(view.BadgeNormalBgShow).For(v => v.enabled).To(vm => vm.BadgeNormalBgShow).OneWay();
            bindingSet.Bind(view.BadgeMySelfBgShow).For(v => v.enabled).To(vm => vm.BadgeMySelfBgShow).OneWay();
            bindingSet.Bind(view.BadgeHurtBgShow).For(v => v.enabled).To(vm => vm.BadgeHurtBgShow).OneWay();
            bindingSet.Bind(view.BadgeDeadBgShow).For(v => v.enabled).To(vm => vm.BadgeDeadBgShow).OneWay();
            bindingSet.Bind(view.BadgeIconBundle).For(v => v.BundleName).To(vm => vm.BadgeIconBundle).OneWay();
            bindingSet.Bind(view.BadgeIconAsset).For(v => v.AssetName).To(vm => vm.BadgeIconAsset).OneWay();
            bindingSet.Bind(view.TitleIconShow1).For(v => v.activeSelf).To(vm => vm.TitleIconShow1).OneWay();
            bindingSet.Bind(view.TitleIconShow2).For(v => v.activeSelf).To(vm => vm.TitleIconShow2).OneWay();
            bindingSet.Bind(view.TitleIconShow3).For(v => v.activeSelf).To(vm => vm.TitleIconShow3).OneWay();
            bindingSet.Bind(view.TitleIconShow4).For(v => v.activeSelf).To(vm => vm.TitleIconShow4).OneWay();

            bindingSet.Build();
        }
        void ViewBind(BlastRecordInfoView view)
        {
            BindingSet <BlastRecordInfoView, BlastRecordInfoViewModel> bindingSet =
                view.CreateBindingSet <BlastRecordInfoView, BlastRecordInfoViewModel>();

            bindingSet.Bind(view.ImgGroupShow).For(v => v.activeSelf).To(vm => vm.ImgGroupShow).OneWay();
            bindingSet.Bind(view.TextGroupShow).For(v => v.activeSelf).To(vm => vm.TextGroupShow).OneWay();
            bindingSet.Bind(view.IconGroupShow).For(v => v.activeSelf).To(vm => vm.IconGroupShow).OneWay();
            bindingSet.Bind(view.MySelfMaskShow).For(v => v.enabled).To(vm => vm.MySelfMaskShow).OneWay();
            bindingSet.Bind(view.DeathMaskShow).For(v => v.enabled).To(vm => vm.DeathMaskShow).OneWay();
            bindingSet.Bind(view.DeadIconShow).For(v => v.enabled).To(vm => vm.DeadIconShow).OneWay();
            bindingSet.Bind(view.BombIconShow).For(v => v.enabled).To(vm => vm.BombIconShow).OneWay();
            bindingSet.Bind(view.RankText).For(v => v.text).To(vm => vm.RankText).OneWay();
            bindingSet.Bind(view.RankColor).For(v => v.color).To(vm => vm.RankColor).OneWay();
            bindingSet.Bind(view.PlayerNameText).For(v => v.text).To(vm => vm.PlayerNameText).OneWay();
            bindingSet.Bind(view.PlayerNameColor).For(v => v.color).To(vm => vm.PlayerNameColor).OneWay();
            bindingSet.Bind(view.CorpsText).For(v => v.text).To(vm => vm.CorpsText).OneWay();
            bindingSet.Bind(view.CorpsColor).For(v => v.color).To(vm => vm.CorpsColor).OneWay();
            bindingSet.Bind(view.KillText).For(v => v.text).To(vm => vm.KillText).OneWay();
            bindingSet.Bind(view.KillColor).For(v => v.color).To(vm => vm.KillColor).OneWay();
            bindingSet.Bind(view.DamageText).For(v => v.text).To(vm => vm.DamageText).OneWay();
            bindingSet.Bind(view.DamageColor).For(v => v.color).To(vm => vm.DamageColor).OneWay();
            bindingSet.Bind(view.DeadText).For(v => v.text).To(vm => vm.DeadText).OneWay();
            bindingSet.Bind(view.DeadColor).For(v => v.color).To(vm => vm.DeadColor).OneWay();
            bindingSet.Bind(view.AssistText).For(v => v.text).To(vm => vm.AssistText).OneWay();
            bindingSet.Bind(view.AssistColor).For(v => v.color).To(vm => vm.AssistColor).OneWay();
            bindingSet.Bind(view.PingText).For(v => v.text).To(vm => vm.PingText).OneWay();
            bindingSet.Bind(view.PingColor).For(v => v.color).To(vm => vm.PingColor).OneWay();
            bindingSet.Bind(view.BombText).For(v => v.text).To(vm => vm.BombText).OneWay();
            bindingSet.Bind(view.BombColor).For(v => v.color).To(vm => vm.BombColor).OneWay();
            bindingSet.Bind(view.TitleIconShow1).For(v => v.activeSelf).To(vm => vm.TitleIconShow1).OneWay();
            bindingSet.Bind(view.TitleIconShow2).For(v => v.activeSelf).To(vm => vm.TitleIconShow2).OneWay();
            bindingSet.Bind(view.TitleIconShow3).For(v => v.activeSelf).To(vm => vm.TitleIconShow3).OneWay();
            bindingSet.Bind(view.TitleIconShow4).For(v => v.activeSelf).To(vm => vm.TitleIconShow4).OneWay();

            bindingSet.Build();
        }
        public void CreateBinding(GameObject obj)
        {
            _viewGameObject = obj;
            _viewCanvas     = _viewGameObject.GetComponent <Canvas>();

            bool bFirst = false;
            var  view   = obj.GetComponent <BlastRecordInfoView>();

            if (view == null)
            {
                bFirst = true;
                view   = obj.AddComponent <BlastRecordInfoView>();
                view.FillField();
            }
            DataInit(view);
            SpriteReset();
            view.BindingContext().DataContext = this;
            if (bFirst)
            {
                SaveOriData(view);
                ViewBind(view);
            }
            _view = view;
        }
 private void EventTriggerBind(BlastRecordInfoView view)
 {
 }