Exemplo n.º 1
0
        // 关闭最上层的UI
        public bool _internal_close_top_view(E_ViewId viewId)
        {
            PanelLog.Assert(_currView != null, "当前界面为空");
            if (_currView == null)
            {
                return(true);
            }

            // 正常通道的历史界面必定是Panel打开头
            PanelLog.Assert(_panelHistory.Count != 1, "已经回退到最后一个历史界面");
            if (_panelHistory.Count <= 1)
            {
                return(true);
            }

            if (viewId != _currView.ViewId)
            {
                return(true);
            }

            bool result = _currView.IsPanel();

            // 关闭当前界面
            _internal_real_close(_currView);
            if (result)
            {
                return(false);
            }
            return(true);
        }
Exemplo n.º 2
0
        public void OnClose(E_ViewId viewId)
        {
            bool result = _panelHistoryStack.AssetView(viewId);

            PanelLog.Assert(result, "回退的界面,和当前的界面历史不一致");
            if (!result)
            {
                return;
            }
            _panelHistoryStack.Back(viewId);
        }