Ejemplo n.º 1
0
        /// <summary>
        /// 当关闭一个弹窗界面时候 检查并弹出优先级比要显示的弹窗优先级高的弹窗
        /// </summary>
        /// <param name="popupView">关闭一个弹窗后下面的一个弹窗 (可以是null)</param>
        /// <returns>标识</returns>
        private void AutoPupupView(UIBasePopupView popupView)
        {
            List <UIBasePopupView> willPopupView = null;

            if (popupView != null)
            {
                if (m_LowerPriorityPopupView.TryGetValue(popupView.BelongPageView, out willPopupView))
                {
                    if (willPopupView.Count == 0)
                    {
                        return;
                    }
                    if (willPopupView[willPopupView.Count - 1].Priority > popupView.Priority)
                    {
                        UIBasePopupView willShowPopupView = willPopupView[willPopupView.Count - 1]; //将要显示的弹窗
                        willShowPopupView.DelayPopupShowWindow();                                   //参数已经缓存
                        willPopupView.RemoveAt(willPopupView.Count - 1);                            //移除队列
                        m_AllRecordViewPopup.Add(willShowPopupView);                                //将要显示的弹窗
                    }
                }
            }
            else
            {
                if (m_LowerPriorityPopupView.TryGetValue(UIBasePageView.CurOpenPage, out willPopupView))
                {
                    if (willPopupView.Count == 0)
                    {
                        return;
                    }
                    UIBasePopupView willShowPopupView = willPopupView[willPopupView.Count - 1]; //将要显示的弹窗
                    willShowPopupView.DelayPopupShowWindow();                                   //参数已经缓存
                    willPopupView.RemoveAt(willPopupView.Count - 1);                            //移除队列
                    m_AllRecordViewPopup.Add(willShowPopupView);                                //将要显示的弹窗
                } //取当前打开页面的队列表
            }  //可能存在关闭一个顶层弹窗后 后下面没有要显示的弹窗的情况
        }