Ejemplo n.º 1
0
    public override void SetData(params object[] paramsObjects)
    {
//		if (paramsObjects==null)
//		{
//			return;
//
//		}



        if (paramsObjects.Length > 0)
        {
            string targetTap = "";
            if (paramsObjects[0] is string)
            {
                targetTap = (string)paramsObjects[0];
            }

            if (paramsObjects[0].GetType() == typeof(UserCardVo))
            {
                _userCardVo = (UserCardVo)paramsObjects[0];
            }
            else if (targetTap == "CardResolve")
            {
                //临时作为跳转到星缘回溯模块
                if (_cardCollectionPanel == null)
                {
                    this.OnShow(0);
                    _cardDetailPanel?.Hide();
                    _cardCollectionPanel = new CardCollectionPanel();
                    _cardCollectionPanel.Init(this);
                    ModuleManager.Instance.Remove(ModuleConfig.MODULE_LOVEAPPOINTMENT);
                    _cardCollectionPanel.Show(0);
                    RegisterModel <DrawData>();
                    _cardCollectionPanel.ChangeView(CardViewState.Resolve);
                    _cardCollectionPanel.SetResolveState();
                    return;
                }

                if (_cardDetailPanel != null)
                {
                    _cardDetailPanel.OnBackClick();
                    ModuleManager.Instance.Remove(ModuleConfig.MODULE_LOVEAPPOINTMENT);
                    _cardDetailPanel.EnterFromOther = true;
                    _cardCollectionPanel.ChangeView(CardViewState.Resolve);
                    _cardCollectionPanel.SetResolveState();
                }
                else
                {
                    //todo 之后要做到切换任意一个界面!
                    state = 3;
                }
            }
        }
    }
Ejemplo n.º 2
0
    public override void Init()
    {
        GuideManager.RegisterModule(this);

        if (_userCardVo != null)
        {
            if (_cardDetailPanel == null)
            {
                _cardDetailPanel = new CardDetailPanel();
                _cardDetailPanel.Init(this);
            }
            _cardDetailPanel.Show(0);
            _cardDetailPanel.EnterFromOther = true;
            _cardDetailPanel.SetData(_userCardVo);
            _userCardVo = null;
        }
        else
        {
            //跳转回来的时候,有可能是在星缘回忆界面!
            if (_cardDetailPanel != null)
            {
                return;
            }


            if (_cardCollectionPanel == null)
            {
                _cardCollectionPanel = new CardCollectionPanel();
                _cardCollectionPanel.Init(this);
                RegisterModel <DrawData>();
                _cardCollectionPanel.Show(0);
            }

            if (state != 0)
            {
                _cardCollectionPanel.ChangeView(CardViewState.Resolve);
                _cardCollectionPanel.SetResolveState();
            }
        }
    }