public static string[] GetDataSource(JsonFormTag.DataSourceType source) { if (source < JsonFormTag.DataSourceType.PRESET_COUNT) { return(PresetDataSources[(int)source].ToArray()); } else { switch (source) { case JsonFormTag.DataSourceType.TECHNIQUES: return(GetTechniques()); case JsonFormTag.DataSourceType.MATERIALS: return(GetMaterialNames()); case JsonFormTag.DataSourceType.SKILLS: return(GetSkills()); case JsonFormTag.DataSourceType.GUN_SKILLS: return(GetGunSkills()); case JsonFormTag.DataSourceType.CRAFT_CATEGORIES: return(GetCraftCategories()); } } return(null); }
public static void UpdateDataSource(JsonFormTag.DataSourceType source, string newEntry) { if (source < JsonFormTag.DataSourceType.PRESET_MOD_COUNT) { if (!PresetDataSources[(int)source].Contains(newEntry)) { PresetDataSources[(int)source].Add(newEntry); WinformsUtil.RefreshDataSources(); } } }