static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // make sure all OpenCV errors are thrown as exceptions. CVUtils.ErrorsToExceptions(); ExampleSelection es = new ExampleSelection(); Assembly me = Assembly.GetExecutingAssembly(); foreach (Type t in me.GetTypes()) { if (t.IsSubclassOf(typeof(Form)) && t != typeof(ExampleSelection)) { Form f = (Form) me.CreateInstance(t.FullName); es.AddForm(f); } } es.ShowDialog(); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // make sure all OpenCV errors are thrown as exceptions. CVUtils.ErrorsToExceptions(); ExampleSelection es = new ExampleSelection(); Assembly me = Assembly.GetExecutingAssembly(); foreach (Type t in me.GetTypes()) { if (t.IsSubclassOf(typeof(Form)) && t != typeof(ExampleSelection)) { Form f = (Form)me.CreateInstance(t.FullName); es.AddForm(f); } } es.ShowDialog(); }