void SaveOriData(CommonTaskTipView view)
 {
     view.oriTitleText    = _titleText;
     view.oriScheduleText = _scheduleText;
     view.oriProgressVal  = _progressVal;
     view.oriAlpha        = _alpha;
 }
 void DataInit(CommonTaskTipView view)
 {
     _titleText    = view.TitleText.text;
     _scheduleText = view.ScheduleText.text;
     _progressVal  = view.ProgressVal.fillAmount;
     _alpha        = view.Alpha.alpha;
 }
        void ViewBind(CommonTaskTipView view)
        {
            BindingSet <CommonTaskTipView, CommonTaskTipViewModel> bindingSet =
                view.CreateBindingSet <CommonTaskTipView, CommonTaskTipViewModel>();

            bindingSet.Bind(view.TitleText).For(v => v.text).To(vm => vm.TitleText).OneWay();
            bindingSet.Bind(view.ScheduleText).For(v => v.text).To(vm => vm.ScheduleText).OneWay();
            bindingSet.Bind(view.ProgressVal).For(v => v.fillAmount).To(vm => vm.ProgressVal).OneWay();
            bindingSet.Bind(view.Alpha).For(v => v.alpha).To(vm => vm.Alpha).OneWay();

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

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

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