2
0

Program.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #region Using Statements
  2. using System;
  3. #if IPHONE
  4. using MonoTouch.Foundation;
  5. using MonoTouch.UIKit;
  6. using Microsoft.Xna;
  7. using Microsoft.Xna.Framework.Media;
  8. #else
  9. #endif
  10. #endregion
  11. namespace Microsoft.Xna.Samples.GameStateManagement
  12. {
  13. #region Entry Point
  14. #if IPHONE
  15. [Register("AppDelegate")]
  16. class Program : UIApplicationDelegate
  17. {
  18. public override void FinishedLaunching(UIApplication app)
  19. {
  20. // Fun begins..
  21. using (GameStateManagementGame game = new GameStateManagementGame())
  22. {
  23. game.Run();
  24. }
  25. }
  26. /// <summary>
  27. /// The main entry point for the application.
  28. /// </summary>
  29. static void Main(string[] args)
  30. {
  31. UIApplication.Main(args, null, "AppDelegate");
  32. }
  33. }
  34. #else
  35. /// <summary>
  36. /// The main entry point for the application.
  37. /// </summary>
  38. static class Program
  39. {
  40. static void Main()
  41. {
  42. using (GameStateManagementGame game = new GameStateManagementGame())
  43. {
  44. game.Run();
  45. }
  46. }
  47. }
  48. #endif
  49. #endregion
  50. }