private static void CheckResModified(string[] files) { foreach (string file in files) { if (file.ToLower().Equals(GetMatchString("TaskConfig", "NewbieGuideConfig.xml"))) { CommonDataReader.ConfigPostprocess <NewGuideConfigDataBase, NewGuideConfigData>("TaskConfig", "NewbieGuideConfig.xml", false); continue; } if (file.ToLower().Equals(GetMatchString("TaskConfig", "TaskConfig.xml"))) { CommonDataReader.ConfigPostprocess <TaskNewConfigDataBase, TaskNewConfigData>("TaskConfig", "TaskConfig.xml", false); continue; } if (file.ToLower().Equals(GetMatchString("TaskConfig", "MainButtonConfig.xml"))) { CommonDataReader.ConfigPostprocess <MainTownButtonConfigDataBase, MainTownButtonConfigData>("TaskConfig", "MainButtonConfig.xml", false); continue; } if (file.ToLower().Equals(GetMatchString("TaskConfig", "InitMainButton.xml"))) { CommonDataReader.ConfigPostprocess <InitMainTownButtonDataBase, InitMainTownButtonData>("TaskConfig", "InitMainButton.xml", false); continue; } if (file.ToLower().Equals(GetMatchString("TaskConfig", "TalkIDlist.xml"))) { CommonDataReader.ConfigPostprocess <TalkIdConfigDataBase, TalkIdConfigData>("TaskConfig", "TalkIDlist.xml", false); continue; } if (file.ToLower().Equals(GetMatchString("IllegalCharacterConfig", "IllegalCharacter.xml"))) { CommonDataReader.ConfigPostprocess <IllegalCharacterDataBase, IllegalCharacterData>("IllegalCharacterConfig", "IllegalCharacter.xml", false); continue; } if (file.ToLower().Equals(GetMatchString("TaskConfig", "GuideStepConfig.xml"))) { CommonDataReader.ConfigPostprocess <EctGuideStepConfigDataBase, EctGuideStepConfigData>("TaskConfig", "GuideStepConfig.xml", false); continue; } if (file.ToLower().Equals(GetMatchString("TaskConfig", "EctypeGuideTalkList.xml"))) { CommonDataReader.ConfigPostprocess <EctGuideTalkDataBase, StepDialogData>("TaskConfig", "EctypeGuideTalkList.xml", false); continue; } if (file.ToLower().Equals(GetMatchString("SceneConfig", "MapDynamicBlock.xml"))) { CommonDataReader.ConfigPostprocess <MapDynamicBlockDataBase, MapDynamicBlockData>("SceneConfig", "MapDynamicBlock.xml", false); continue; } if (file.ToLower().Equals(GetMatchString("CharacterNameConfig", "IllegalNameConfig.xml"))) { CommonDataReader.ConfigPostprocess <IllegalNameDataBase, IllegalNameData>("CharacterNameConfig", "IllegalNameConfig.xml", false); continue; } } }
/// <summary> /// 创建配置表对应的Asset文件 /// </summary> private void CreateConfigFile() { switch (m_currentType) { // AI数据配置表 case ConfigDataTypes.TaskConfig: CommonDataReader.ConfigPostprocess <TaskNewConfigDataBase, TaskNewConfigData>("TaskConfig", "TaskConfig.xml", false); break; case ConfigDataTypes.NewGuideConfig: CommonDataReader.ConfigPostprocess <NewGuideConfigDataBase, NewGuideConfigData>("TaskConfig", "NewbieGuideConfig.xml", false); break; case ConfigDataTypes.MainTownButtonConfig: CommonDataReader.ConfigPostprocess <MainTownButtonConfigDataBase, MainTownButtonConfigData>("TaskConfig", "MainButtonConfig.xml", false); break; case ConfigDataTypes.InitMainTownButtonConfig: CommonDataReader.ConfigPostprocess <InitMainTownButtonDataBase, InitMainTownButtonData>("TaskConfig", "InitMainButton.xml", false); break; case ConfigDataTypes.GuideTalkIdConfig: CommonDataReader.ConfigPostprocess <TalkIdConfigDataBase, TalkIdConfigData>("TaskConfig", "TalkIDlist.xml", false); break; default: break; } }
public CommonDataReader <TModel> ConvertToCommonDataReader <TModel>(SqliteDataReader dataReader) where TModel : class, new() { var commonDataReader = new CommonDataReader <TModel>(); if (dataReader.HasRows) { dataReader.Read(); var rawRow = new object[dataReader.FieldCount]; dataReader.GetValues(rawRow); commonDataReader = new CommonDataReader <TModel>(rawRow, GetColumnNames(dataReader)); while (dataReader.Read()) { dataReader.GetValues(rawRow); commonDataReader.Add(rawRow); } } return(commonDataReader); }