示例#1
0
 /// <summary>
 /// Returns the one DemoApplicationContext.
 /// </summary>
 public static SpaceWarsContext getAppContext()
 {
     if (appContext == null)
     {
         appContext = new SpaceWarsContext();
     }
     return(appContext);
 }
示例#2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // Start an application context and run one form inside it
            SpaceWarsContext appContext = SpaceWarsContext.getAppContext();

            appContext.RunForm(new SpaceWarsForm());

            Application.Run(appContext);
        }