コード例 #1
0
 /// <summary>
 /// Returns the one DemoApplicationContext.
 /// </summary>
 public static ChessApplicationContext GetContext()
 {
     if (context == null)
     {
         context = new ChessApplicationContext();
     }
     return(context);
 }
コード例 #2
0
 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);
 }