12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #if WINDOWS
- using System;
- namespace SoundTest
- {
- static class Program
- {
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- static void Main(string[] args)
- {
- using (Game1 game = new Game1())
- {
- game.Run();
- }
- }
- }
- }
- #elif MACOS
- using MonoMac.AppKit;
- using MonoMac.Foundation;
- using MonoMac.CoreGraphics;
- using System.Runtime.InteropServices;
-
- namespace SoundTest
- {
- class Program
- {
- static void Main (string [] args)
- {
- NSApplication.Init ();
-
- using (var p = new NSAutoreleasePool ()) {
- NSApplication.SharedApplication.Delegate = new AppDelegate();
- NSApplication.Main(args);
- }
- }
- }
-
- class AppDelegate : NSApplicationDelegate
- {
- Game1 game;
-
- public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
- {
- game = new Game1();
- game.Run();
- }
-
- public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)
- {
- return true;
- }
- }
- }
- #endif
|