private void BindingProgressbar(ILegoUI ui, string id, IYuLegoUIRxModel uiRxModel, LegoRectTransformMeta rectMeta)
        {
            var binder = binderDict[typeof(YuLegoProgressbar)];

            var oldModel = ui.RxModel.GetControlRxModel <YuLegoProgressbarRxModel>(id);

            binder.UnBinding(oldModel);

            var progressbar = ui.GetControl <YuLegoProgressbar>(id);
            var model       = uiRxModel.GetControlRxModel <YuLegoProgressbarRxModel>(id);

            binder.Binding(progressbar, model, rectMeta);
        }
        private void BindingInputField(ILegoUI ui, string id, IYuLegoUIRxModel uiRxModel, LegoRectTransformMeta rectMeta)
        {
            var binder = binderDict[typeof(YuLegoInputField)];

            var oldModel = ui.RxModel.GetControlRxModel <YuLegoInputFieldRxModel>(id);

            binder.UnBinding(oldModel);

            var inputField = ui.GetControl <YuLegoInputField>(id);
            var model      = uiRxModel.GetControlRxModel <YuLegoInputFieldRxModel>(id);

            binder.Binding(inputField, model, rectMeta);
        }
        private void BindingPlaneToggle(ILegoUI ui, string id, IYuLegoUIRxModel uiRxModel, LegoRectTransformMeta rectMeta)
        {
            var binder = binderDict[typeof(YuLegoPlaneToggle)];

            var oldModel = ui.RxModel.GetControlRxModel <YuLegoPlaneToggleRxModel>(id);

            binder.UnBinding(oldModel);

            var planeToggle = ui.GetControl <YuLegoPlaneToggle>(id);
            var model       = uiRxModel.GetControlRxModel <YuLegoPlaneToggleRxModel>(id);

            binder.Binding(planeToggle, model, rectMeta);
        }
        private void BindingTButton(ILegoUI ui, string id, IYuLegoUIRxModel uiRxModel, LegoRectTransformMeta rectMeta)
        {
            var binder = binderDict[typeof(YuLegoTButton)];

            var oldModel = ui.RxModel.GetControlRxModel <YuLegoTButtonRxModel>(id);

            binder.UnBinding(oldModel);

            var button = ui.GetControl <YuLegoTButton>(id);
            var model  = uiRxModel.GetControlRxModel <YuLegoTButtonRxModel>(id);

            binder.Binding(button, model, rectMeta);
        }
        private void BindingRawImage(ILegoUI ui, string id, IYuLegoUIRxModel uiRxModel, LegoRectTransformMeta rectMeta)
        {
            var binder = binderDict[typeof(YuLegoRawImage)];

            var oldModel = ui.RxModel.GetControlRxModel <YuLegoRawImageRxModel>(id);

            binder.UnBinding(oldModel);

            var rawImage = ui.GetControl <YuLegoRawImage>(id);
            var model    = uiRxModel.GetControlRxModel <YuLegoRawImageRxModel>(id);

            binder.Binding(rawImage, model, rectMeta);
        }
        private void BindingText(ILegoUI ui, string id, IYuLegoUIRxModel uiRxModel, LegoRectTransformMeta rectMeta)
        {
            var binder = binderDict[typeof(YuLegoText)];

            var oldModel = ui.RxModel.GetControlRxModel <YuLegoTextRxModel>(id);

            binder.UnBinding(oldModel);

            var text  = ui.GetControl <YuLegoText>(id);
            var model = uiRxModel.GetControlRxModel <YuLegoTextRxModel>(id);

            binder.Binding(text, model, rectMeta);
        }
        private void BindingImage(ILegoUI ui, string id, IYuLegoUIRxModel uiRxModel, LegoRectTransformMeta rectMeta)
        {
            var binder = binderDict[typeof(YuLegoImage)];

            var oldModel = ui.RxModel.GetControlRxModel <YuLegoImageRxModel>(id);

            if (oldModel != null)
            {
                binder.UnBinding(oldModel);
            }
#if DEBUG
            else
            {
                string uiName = null;
                if (ui?.UIRect != null)
                {
                    uiName = ui.UIRect.name;
                }
                Debug.LogError("BindingImage错误,oldModel为null" + uiName + "  " + id);
            }
#endif

            var image = ui.GetControl <YuLegoImage>(id);
            var model = uiRxModel.GetControlRxModel <YuLegoImageRxModel>(id);
            if (model != null)
            {
                binder.Binding(image, model, rectMeta);
            }
#if DEBUG
            else
            {
                string uiName = null;
                if (ui?.UIRect != null)
                {
                    uiName = ui.UIRect.name;
                }
                Debug.LogError("BindingImage错误,Model为null" + uiName + "  " + id);
            }
#endif
        }