Exemplo n.º 1
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as BindConfirmBootPanelData ?? new BindConfirmBootPanelData();
            // please add init code here
            BtnBack.OnClickAsObservable().Subscribe((unit =>
            {
                AudioManager.PlaySound("Button_Audio");
                BackClick();
            })).AddTo(this);

            BtnConfirm.OnClickAsObservable().Subscribe((unit =>
            {
                AudioManager.PlaySound("Button_Audio");
                UIMgr.OpenPanel <BindWIFIMessagePanel>(new BindWIFIMessagePanelData(), UITransitionType.CIRCLE, this);
            })).AddTo(this);
        }
Exemplo n.º 2
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as CreateOrderPanelData ?? new CreateOrderPanelData();
            ShowOrderORCreatOrder();
            BtnBack.onClick.AddListener(() => { Back(); });
            BtnPlusAddress.OnClickAsObservable().Subscribe(_ =>
            {
                UIMgr.OpenPanel <AddressEditPanel>(new AddressEditPanelData(), UITransitionType.CIRCLE);
            }).AddTo(this);
            BtnEditAddress.OnClickAsObservable().Subscribe(_ =>
            {
                UIMgr.OpenPanel <AddressListPanel>(new AddressListPanelData(), UITransitionType.CIRCLE);
            }).AddTo(this);

            BtnConfirm.OnClickAsObservable().Subscribe(_ =>
            {
                if (!IsCreatingOrder)
                {
                    RequestCreatOrder();
                }
            }).AddTo(this);

            SimpleEventSystem.GetEvent <ExchangeOrderAddress>().Subscribe(exchangeOrderAddress =>
            {
                AddressInfoData(exchangeOrderAddress.AddressInfo);
            }).AddTo(this);

            SimpleEventSystem.GetEvent <UpdateAddressDate>().Subscribe(result =>
            {
                RequestAddressList();
            }).AddTo(this);

            SimpleEventSystem.GetEvent <CollectGiftBoxPanelClosed>().Subscribe(res =>
            {
                if (res.CollectGiftBoxType == CollectGiftBoxType.Exchange)
                {
                    ShowOrderORCreatOrder();
                }
            }).AddTo(this);
        }