static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var mainForm = new SketchUIForm(); mainForm.LoadSketchByType(typeof(LCDTest)); //this could do with being a little more generic Application.Run(mainForm); }
static void RunApp(Sketch sketch) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var mainForm = new SketchUIForm(); if (mainForm.LoadSketch(sketch)) //this could do with being a little more generic { Application.Run(mainForm); } else { MessageBox.Show("The specified sketch was unable to be loaded.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }