示例#1
0
        public void Push(int panelId)
        {
            IBaseView nextView = Core.UI.CreatePanel(panelId);

            if (_contextStack.Count != 0)
            {
                IBaseView curView = _contextStack.Peek();
                if (IsNew(nextView))
                {
                    curView.OnExit();
                }
                else
                {
                    curView.OnPause();
                }
            }

            _contextStack.Push(nextView);
            _UIDict.AddOrReplace(nextView.ViewType.panelId, nextView);
            nextView.OnEnter();
        }