Esempio n. 1
0
        /// <summary>
        /// 创建加载字典失败事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>创建的加载字典失败事件。</returns>
        public static LoadDictionaryFailureEventArgs Create(ReadDataFailureEventArgs e)
        {
            LoadDictionaryFailureEventArgs loadDictionaryFailureEventArgs = ReferencePool.Acquire <LoadDictionaryFailureEventArgs>();

            loadDictionaryFailureEventArgs.DictionaryAssetName = e.DataAssetName;
            loadDictionaryFailureEventArgs.ErrorMessage        = e.ErrorMessage;
            loadDictionaryFailureEventArgs.UserData            = e.UserData;
            return(loadDictionaryFailureEventArgs);
        }
        /// <summary>
        /// 创建加载字典失败事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>创建的加载字典失败事件。</returns>
        public static LoadDictionaryFailureEventArgs Create(GameFramework.Localization.LoadDictionaryFailureEventArgs e)
        {
            LoadDictionaryInfo             loadDictionaryInfo             = (LoadDictionaryInfo)e.UserData;
            LoadDictionaryFailureEventArgs loadDictionaryFailureEventArgs = ReferencePool.Acquire <LoadDictionaryFailureEventArgs>();

            loadDictionaryFailureEventArgs.DictionaryName      = loadDictionaryInfo.DictionaryName;
            loadDictionaryFailureEventArgs.DictionaryAssetName = e.DictionaryAssetName;
            loadDictionaryFailureEventArgs.ErrorMessage        = e.ErrorMessage;
            loadDictionaryFailureEventArgs.UserData            = loadDictionaryInfo.UserData;
            ReferencePool.Release(loadDictionaryInfo);
            return(loadDictionaryFailureEventArgs);
        }
 private void OnLoadDictionaryFailure(object sender, GameFramework.Localization.LoadDictionaryFailureEventArgs e)
 {
     Log.Warning("Load dictionary failure, asset name '{0}', error message '{1}'.", e.DictionaryAssetName, e.ErrorMessage);
     m_EventComponent.Fire(this, LoadDictionaryFailureEventArgs.Create(e));
 }
Esempio n. 4
0
 private void OnReadDataFailure(object sender, ReadDataFailureEventArgs e)
 {
     Log.Warning("Load dictionary failure, asset name '{0}', error message '{1}'.", e.DataAssetName, e.ErrorMessage);
     m_EventComponent.Fire(this, LoadDictionaryFailureEventArgs.Create(e));
 }