public Master(MainForm form) { if (instance != null) { throw new Exception("The Master, there can be only one."); } instance = this; this.form = form; }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); MainForm mainForm = new MainForm(); mainForm.Show(); while (mainForm.Created) { Application.DoEvents(); mainForm.Render(); } }