Exemplo n.º 1
0
        private void CloseUIFormsByNormalType(string UIFormsName)
        {
            if (string.IsNullOrEmpty(UIFormsName))
            {
                return;
            }

            BaseUIForms _baseUIFormsAtDic = null;

            if (!_DicCurShowUIForms.TryGetValue(UIFormsName, out _baseUIFormsAtDic))
            {
                Debug.LogError("要关闭的窗体不存在!!!UIFormsName: " + UIFormsName);
                return;
            }

            _baseUIFormsAtDic.Hiding();
            _DicCurShowUIForms.Remove(UIFormsName);
            _baseUIFormsAtDic = null;
        }
Exemplo n.º 2
0
 /// <summary>
 /// UI窗体出栈逻辑
 /// </summary>
 private void PopUIForms()
 {
     if (_StaCurrentUIForms.Count >= 2)
     {
         /* 出栈逻辑 */
         BaseUIForms topUIForms = _StaCurrentUIForms.Pop();
         //出栈的窗体,进行隐藏处理
         topUIForms.Hiding();
         //出栈窗体的下一个窗体逻辑
         BaseUIForms nextUIForms = _StaCurrentUIForms.Peek();
         //下一个窗体"重新显示"处理
         nextUIForms.Redisplay();
     }
     else if (_StaCurrentUIForms.Count == 1)
     {
         /* 出栈逻辑 */
         BaseUIForms topUIForms = _StaCurrentUIForms.Pop();
         //出栈的窗体,进行"隐藏"处理
         topUIForms.Hiding();
     }
 }
Exemplo n.º 3
0
        private void AddUIFormsToShowUIFormsSta(BaseUIForms _baseUIForms)
        {
            if (null == _baseUIForms)
            {
                return;
            }

            if (_StaCacheUIForms.Contains(_baseUIForms))
            {
                return;
            }

            if (_baseUIForms.CurrentUIType.isClearStack)
            {
                ClearStack();
            }

            if (_StaCacheUIForms.Count > 0)
            {
                _StaCacheUIForms.Peek().Freeze();
            }
            _StaCacheUIForms.Push(_baseUIForms);
            _baseUIForms.Display();
        }
Exemplo n.º 4
0
        public void CloseUIForms(string UIFormsName)
        {
            if (string.IsNullOrEmpty(UIFormsName))
            {
                Debug.LogError("参数不合法!!!");
                return;
            }

            BaseUIForms _baseUIForms = null;

            //缓存字典里没有
            if (!_DicUIFormsCache.TryGetValue(UIFormsName, out _baseUIForms))
            {
                Debug.LogError("要关闭的窗体不存在!!!UIFormsName: " + UIFormsName);
                return;
            }


            switch (_baseUIForms.CurrentUIType._UIFormsShowType)
            {
            case UIFormsShowType.Normal:
                CloseUIFormsByNormalType(UIFormsName);
                break;

            case UIFormsShowType.ReverseChange:
                CloseUIFormsByReverseChangeType();
                break;

            case UIFormsShowType.HidingOther:
                CloseUIFormsByHidingOtherType(UIFormsName);
                break;

            default:
                break;
            }
        }