2
0

Program.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #region File Description
  2. //-----------------------------------------------------------------------------
  3. // Program.cs
  4. //
  5. // Microsoft XNA Community Game Platform
  6. // Copyright (C) Microsoft Corporation. All rights reserved.
  7. //-----------------------------------------------------------------------------
  8. #endregion
  9. #region Using Statements
  10. using System;
  11. #endregion
  12. namespace HoneycombRush
  13. {
  14. #if WINDOWSS || XBOX
  15. static class Program
  16. {
  17. /// <summary>
  18. /// The main entry point for the application.
  19. /// </summary>
  20. static void Main(string[] args)
  21. {
  22. using (HoneycombRush game = new HoneycombRush())
  23. {
  24. game.Run();
  25. }
  26. }
  27. }
  28. #elif MONOMAC
  29. static class Program
  30. {
  31. /// <summary>
  32. /// The main entry point for the application.
  33. /// </summary>
  34. static void Main (string[] args)
  35. {
  36. MonoMac.AppKit.NSApplication.Init ();
  37. using (var p = new MonoMac.Foundation.NSAutoreleasePool ()) {
  38. MonoMac.AppKit.NSApplication.SharedApplication.Delegate = new AppDelegate();
  39. MonoMac.AppKit.NSApplication.Main(args);
  40. }
  41. }
  42. }
  43. class AppDelegate : MonoMac.AppKit.NSApplicationDelegate
  44. {
  45. HoneycombRush game;
  46. public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
  47. {
  48. game = new HoneycombRush();
  49. game.Run();
  50. }
  51. public override bool ApplicationShouldTerminateAfterLastWindowClosed (MonoMac.AppKit.NSApplication sender)
  52. {
  53. return true;
  54. }
  55. }
  56. #endif
  57. }