示例#1
0
        /// <summary>
        /// 创建,外部不要调用
        /// </summary>
        public void Create(ModuleBase module)
        {
            Module = module;

            _forms   = new JWArrayList <UIFormClass>(1);
            _inState = false;
            //注入到UI状态服务
            UIStateService.GetInstance().AddMediator(this, GetBelongsUIStateName());

            OnInitialize();
        }
示例#2
0
        /// <summary>
        /// 销毁对象,外部不要调用
        /// </summary>
        public void Destroy()
        {
            OnUninitialize();

            UIStateService.GetInstance().RemoveMediator(this);

            for (int i = 0; i < _forms.Count; i++)
            {
                if (_forms[i] != null)
                {
                    JW.Common.Log.LogE("UIMediator.Destroy : FormClass {0} of {1} is living", _forms[i].GetType().FullName, GetType().FullName);
                }
            }
            _inState = false;
            _forms.Clear();
            Module = null;
        }