示例#1
0
        public static void LoadDataTable(this DataTableComponent dataTableComponent, string dataTableName, object userData = null)
        {
            if (string.IsNullOrEmpty(dataTableName))
            {
                Log.Warning("Data table name is invalid.");
                return;
            }

            string[] splitNames = dataTableName.Split('_');
            if (splitNames.Length > 2)
            {
                Log.Warning("Data table name is invalid.");
                return;
            }

            string dataRowClassName = DataRowClassPrefixName + splitNames[0];

            Type dataRowType = Type.GetType(dataRowClassName);
            if (dataRowType == null)
            {
                Log.Warning("Can not get data row type with class name '{0}'.", dataRowClassName);
                return;
            }

            string dataTableNameInType = splitNames.Length > 1 ? splitNames[1] : null;
            dataTableComponent.LoadDataTable(dataRowType, dataTableName, dataTableNameInType, AssetUtility.GetDataTableAsset(dataTableName), userData);
        }
示例#2
0
 public async Task <CurrencyIcon> GetUIItem()
 {
     return(await GetUIItem(Constant.UIItem.CurrencyIconTypeID, AssetUtility.GetAssetItemAsset <CurrencyIcon>()));
 }
示例#3
0
 public async Task <TItem> GetUIItem()
 {
     return(await GetUIItem((int)m_Style, AssetUtility.GetItemAsset <TItem>()));
 }