void SaveOriData(CommonChatView view) { view.oriShow = _show; view.oriAlpha = _alpha; view.oriChatListBgShow = _chatListBgShow; view.oriSendMessageGroupShow = _sendMessageGroupShow; view.oriChannelTipText = _channelTipText; view.oriChannelTipColor = _channelTipColor; }
void DataInit(CommonChatView view) { _show = view.Show.activeSelf; _alpha = view.Alpha.alpha; _chatListBgShow = view.ChatListBgShow.enabled; _sendMessageGroupShow = view.SendMessageGroupShow.activeSelf; _channelTipText = view.ChannelTipText.text; _channelTipColor = view.ChannelTipColor.color; }
void SaveOriData(CommonChatView view) { view.oriShow = _show; view.oriAlpha = _alpha; view.oriSendMessageGroupShow = _sendMessageGroupShow; view.oriChannelTipText = _channelTipText; view.oriChannelTipColor = _channelTipColor; view.oriInputSize = _inputSize; view.oriPrivateNameText = _privateNameText; view.oriPrivateNameShow = _privateNameShow; }
void DataInit(CommonChatView view) { _show = view.Show.activeSelf; _alpha = view.Alpha.alpha; _sendMessageGroupShow = view.SendMessageGroupShow.activeSelf; _channelTipText = view.ChannelTipText.text; _channelTipColor = view.ChannelTipColor.color; _inputSize = view.InputSize.sizeDelta; _privateNameText = view.PrivateNameText.text; _privateNameShow = view.PrivateNameShow.activeSelf; }
void ViewBind(CommonChatView view) { BindingSet <CommonChatView, CommonChatViewModel> bindingSet = view.CreateBindingSet <CommonChatView, CommonChatViewModel>(); bindingSet.Bind(view.Show).For(v => v.activeSelf).To(vm => vm.Show).OneWay(); bindingSet.Bind(view.Alpha).For(v => v.alpha).To(vm => vm.Alpha).OneWay(); bindingSet.Bind(view.ChatListBgShow).For(v => v.enabled).To(vm => vm.ChatListBgShow).OneWay(); bindingSet.Bind(view.SendMessageGroupShow).For(v => v.activeSelf).To(vm => vm.SendMessageGroupShow).OneWay(); bindingSet.Bind(view.ChannelTipText).For(v => v.text).To(vm => vm.ChannelTipText).OneWay(); bindingSet.Bind(view.ChannelTipColor).For(v => v.color).To(vm => vm.ChannelTipColor).OneWay(); bindingSet.Bind(view.InputValueChanged).For(v => v.onValueChanged).To(vm => vm.InputValueChanged).OneWay(); bindingSet.Build(); }
public void CreateBinding(GameObject obj) { _viewGameObject = obj; _viewCanvas = _viewGameObject.GetComponent <Canvas>(); bool bFirst = false; var view = obj.GetComponent <CommonChatView>(); if (view == null) { bFirst = true; view = obj.AddComponent <CommonChatView>(); view.FillField(); } DataInit(view); SpriteReset(); view.BindingContext().DataContext = this; if (bFirst) { SaveOriData(view); ViewBind(view); } _view = view; }
private void EventTriggerBind(CommonChatView view) { }