Exemplo n.º 1
0
 protected override void OnClose()
 {
     mResLoader.Recycle2Cache();
     mResLoader = null;
     ImgCloud1.DOKill();
     ImgCloud2.DOKill();
     ImgCloud3.DOKill();
     ImgHyrogen.DOKill();
     BtnConfirm.DOKill();
 }
Exemplo n.º 2
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.º 3
0
        private void Init()
        {
            try
            {
                ListBoxRoles.ItemsSource = mListRoleItems;
                if (ListRoleInfos == null)
                {
                    return;
                }
                mListRoleItems.Clear();
                for (int i = 0; i < ListRoleInfos.Count; i++)
                {
                    RoleInfo info = ListRoleInfos[i];

                    RoleItem item = new RoleItem();
                    item.RoleID    = info.ID;
                    item.Name      = info.Name;
                    item.IsChecked = false;
                    item.Info      = info;
                    GetRoleName(item);
                    mListRoleItems.Add(item);
                }
                var current = mListRoleItems.FirstOrDefault(r => r.RoleID == CurrentApp.Session.RoleID);
                if (current == null)
                {
                    current = mListRoleItems.FirstOrDefault();
                    if (current == null)
                    {
                        ShowException(CurrentApp.GetLanguageInfo("S0000056", "RoleItem is null"));
                        return;
                    }
                }
                current.IsChecked = true;
                BtnConfirm.Focus();

                ChangeLanguage();
            }
            catch (Exception ex)
            {
                ShowException(ex.Message);
            }
        }
Exemplo n.º 4
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);
        }