Battle_Script_Pro.Form1.GetStringFromType C# (CSharp) Method

GetStringFromType() private method

private GetStringFromType ( string s, uint value ) : string
s string
value uint
return string
        private string GetStringFromType(string s, uint value)
        {
            if (headersNeeded.Keys.Contains(s))
            {
                headersNeeded[s] = true;
            }
            switch (s)
            {
                case "pokemon":
                    if (pokemonExport.ContainsKey(value))
                    {
                        pokemonExport.TryGetValue(value, out s);
                    }
                    else
                    {
                        s = "0x" + value.ToString("X");
                    }
                    break;
                case "moves":
                    if (movesExport.ContainsKey(value))
                    {
                        movesExport.TryGetValue(value, out s);
                    }
                    else
                    {
                        s = "0x" + value.ToString("X");
                    }
                    break;
                case "abilities":
                    if (abilitiesExport.ContainsKey(value))
                    {
                        abilitiesExport.TryGetValue(value, out s);
                    }
                    else
                    {
                        s = "0x" + value.ToString("X");
                    }
                    break;
                case "item":
                    if (itemsExport.ContainsKey(value))
                    {
                        itemsExport.TryGetValue(value, out s);
                    }
                    else
                    {
                        s = "0x" + value.ToString("X");
                    }
                    break;
                case "type":
                    if (typeExport.ContainsKey(value))
                    {
                        typeExport.TryGetValue(value, out s);
                    }
                    else
                    {
                        s = "0x" + value.ToString("X");
                    }
                    break;
                case "bank":
                    if (bankExport.ContainsKey(value))
                    {
                        bankExport.TryGetValue(value, out s);
                    }
                    else
                    {
                        s = "0x" + value.ToString("X");
                    }
                    break;
                case "std":
                    if (stdExport.ContainsKey(value))
                    {
                        stdExport.TryGetValue(value, out s);
                    }
                    else
                    {
                        s = "0x" + value.ToString("X");
                    }
                    break;
                case "special1":
                    specialOneTriggered = true;
                    s = "0x" + value.ToString("X");
                    ParseINI(File.ReadAllLines(System.Windows.Forms.Application.StartupPath + @"\Data\BattleScriptPro.ini"), GetROMCode());
                    if (value == keywords["MOVE"])
                    {
                        specialOneType = "moves";
                    }
                    keywords.Clear();
                    break;
                case "special2":
                    if (specialOneTriggered)
                    {
                        specialOneTriggered = false;
                        if (headersNeeded.Keys.Contains(specialOneType))
                        {
                            headersNeeded[specialOneType] = true;
                        }
                        switch (specialOneType)
                        {
                            case "pokemon":
                                if (pokemonExport.ContainsKey(value))
                                {
                                    pokemonExport.TryGetValue(value, out s);
                                }
                                else
                                {
                                    s = "0x" + value.ToString("X");
                                }
                                break;
                            case "moves":
                                if (movesExport.ContainsKey(value))
                                {
                                    movesExport.TryGetValue(value, out s);
                                }
                                else
                                {
                                    s = "0x" + value.ToString("X");
                                }
                                break;
                            case "abilities":
                                if (abilitiesExport.ContainsKey(value))
                                {
                                    abilitiesExport.TryGetValue(value, out s);
                                }
                                else
                                {
                                    s = "0x" + value.ToString("X");
                                }
                                break;
                            case "item":
                                if (itemsExport.ContainsKey(value))
                                {
                                    itemsExport.TryGetValue(value, out s);
                                }
                                else
                                {
                                    s = "0x" + value.ToString("X");
                                }
                                break;
                            case "type":
                                if (typeExport.ContainsKey(value))
                                {
                                    typeExport.TryGetValue(value, out s);
                                }
                                else
                                {
                                    s = "0x" + value.ToString("X");
                                }
                                break;
                            case "bank":
                                if (bankExport.ContainsKey(value))
                                {
                                    bankExport.TryGetValue(value, out s);
                                }
                                else
                                {
                                    s = "0x" + value.ToString("X");
                                }
                                break;
                            case "std":
                                if (stdExport.ContainsKey(value))
                                {
                                    stdExport.TryGetValue(value, out s);
                                }
                                else
                                {
                                    s = "0x" + value.ToString("X");
                                }
                                break;
                            default:
                                s = "0x" + value.ToString("X");
                                break;
                        }
                        specialOneType = "";
                    }
                    else
                    {
                        s = "0x" + value.ToString("X");
                    }
                    break;
                default:
                    s = "0x" + value.ToString("X");
                    break;
            }
            return s;
        }
Form1