Battle_Script_Pro.Program.Main C# (CSharp) Method

Main() private method

private Main ( string args ) : void
args string
return void
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            switch (args.Length)
            {
                case 2:
                    try
                    {
                        Application.Run(new Form1(Int32.Parse(args[0]), args[1]));
                    }
                    catch (FormatException)
                    {
                        Application.Run(new Form1(Int32.Parse(Convert.ToInt32(args[0].Substring(2), 16).ToString()), args[1]));
                    }
                    catch
                    {
                        MessageBox.Show("Unable to parse the passed location. Starting up without decompiling...");
                        Application.Run(new Form1());
                    }
                    break;
                case 1:
                    Application.Run(new Form1(args[0]));
                    break;
                default:
                    Application.Run(new Form1());
                    break;
            }
        }
Program