Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 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();
         }
     }
 }