Example #1
0
        /// <summary>
        /// 激活界面
        /// </summary>
        /// <param name="uiFormBase">要激活的界面</param>
        /// <param name="userData">用户自定义数据</param>
        public void RefocusUIForm(UIFormBase uiFormBase, object userData)
        {
            UIFormInfo uiFormInfo = GetUIFormInfo(uiFormBase);

            if (uiFormInfo == null)
            {
                throw new Exception("Can not find UI form info.");
            }

            m_UIFormInfos.Remove(uiFormInfo);
            m_UIFormInfos.AddFirst(uiFormInfo);
        }
Example #2
0
        /// <summary>
        /// 从界面组移除界面
        /// </summary>
        /// <param name="uiFormBase">要移除的界面</param>
        public void RemoveUIForm(UIFormBase uiFormBase)
        {
            UIFormInfo uiFormInfo = GetUIFormInfo(uiFormBase);

            if (uiFormInfo == null)
            {
                throw new Exception(TextUtil.Format("Can not find UI form info for serial id '{0}', UI form asset name is '{1}'.", uiFormBase.SerialId.ToString(), uiFormBase.UIFormAssetName));
            }

            if (!uiFormInfo.Covered)
            {
                uiFormInfo.Covered = true;
                uiFormBase.OnCover();
            }

            if (!uiFormInfo.Paused)
            {
                uiFormInfo.Paused = true;
                uiFormBase.OnPause();
            }

            m_UIFormInfos.Remove(uiFormInfo);
        }
Example #3
0
        /// <summary>
        /// 往界面组增加界面
        /// </summary>
        /// <param name="uiFormBase">要增加的界面</param>
        public void AddUIForm(UIFormBase uiFormBase)
        {
            UIFormInfo uiFormInfo = new UIFormInfo(uiFormBase);

            m_UIFormInfos.AddFirst(uiFormInfo);
        }