Battle_Script_Pro.Form1.ParseHeaderFile C# (CSharp) Method

ParseHeaderFile() private method

private ParseHeaderFile ( string rbhFile ) : void
rbhFile string
return void
        private void ParseHeaderFile(string[] rbhFile)
        {
            foreach (string s in rbhFile)
            {
                if (s.StartsWith("#define"))
                {
                    int temp = 0;
                    string[] rbhLine = s.Split(' ');
                    bool success = Int32.TryParse(rbhLine[2], out temp);
                    if (success)
                    {
                        try
                        {
                            userDefinitions.Add(rbhLine[1].ToUpper(), UInt32.Parse(rbhLine[2]));
                        }
                        catch (FormatException)
                        {
                            MessageBox.Show("A number was expected for parameter 2 of the definition");
                        }
                        catch
                        {
                            MessageBox.Show("There was an unknown error with the custom definition");
                        }
                    }
                    else
                    {
                        try
                        {
                            userDefinitions.Add(rbhLine[1].ToUpper(), UInt32.Parse(ToDecimal(rbhLine[2])));
                        }
                        catch (FormatException)
                        {
                            MessageBox.Show("A number was expected for parameter 2 of the definition");
                        }
                        catch
                        {
                            MessageBox.Show("There was an unknown error with the custom definition");
                        }
                    }
                }
            }
        }
Form1