/// <summary> /// Returns the one DemoApplicationContext. /// </summary> public static ChessApplicationContext GetContext() { if (context == null) { context = new ChessApplicationContext(); } return(context); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // Get the application context and run one form inside it var context = ChessApplicationContext.GetContext(); ChessApplicationContext.GetContext().RunNew(); Application.Run(context); }