123456789101112131415161718192021222324252627282930313233343536373839 |
- using MonoMac.AppKit;
- using MonoMac.Foundation;
- namespace MonoGame.Samples.VideoPlayer
- {
- class Program
- {
- static void Main (string[] args)
- {
- NSApplication.Init ();
- using (var p = new NSAutoreleasePool ()) {
- NSApplication.SharedApplication.Delegate = new AppDelegate ();
- // Set our Application Icon
- NSImage appIcon = NSImage.ImageNamed ("monogameicon.png");
- NSApplication.SharedApplication.ApplicationIconImage = appIcon;
-
- NSApplication.Main (args);
- }
- }
- }
- class AppDelegate : NSApplicationDelegate
- {
- private Game1 game;
- public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
- {
- game = new Game1 ();
- game.Run ();
- }
- public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)
- {
- return true;
- }
- }
- }
|