static void Main() { // Startup process: Check DB, create trot_trax.trax if necessary. // Check for existence of initial tables. DBDriver database = new DBDriver(); if (database.Connected) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // Check for an existing club if (database.HasCurrent()) Application.Run(new ShowYearForm(1)); else Application.Run(new ShowYearForm()); return; } else { DialogResult confirm = MessageBox.Show("Fatal error: Unable to contact database.", "TrotTrax Alert", MessageBoxButtons.OK); return; } }