public override void InitializeApplication () { NSApplication.Init (); //Hijack (); if (pool != null) pool.Dispose (); pool = new NSAutoreleasePool (); appDelegate = new AppDelegate (IsGuest); NSApplication.SharedApplication.Delegate = appDelegate; // If NSPrincipalClass is not set, set it now. This allows running // the application without a bundle var info = NSBundle.MainBundle.InfoDictionary; if (info.ValueForKey ((NSString)"NSPrincipalClass") == null) info.SetValueForKey ((NSString)"NSApplication", (NSString)"NSPrincipalClass"); }
public override void InitializeApplication () { if(!IsGuest) { NSApplicationInitializer.Initialize(); } //Hijack (); if (pool != null) pool.Dispose (); pool = new NSAutoreleasePool (); appDelegate = new AppDelegate (IsGuest); NSApplication.SharedApplication.Delegate = appDelegate; // If NSPrincipalClass is not set, set it now. This allows running // the application without a bundle var info = NSBundle.MainBundle.InfoDictionary; if (info.ValueForKey ((NSString)"NSPrincipalClass") == null) info.SetValueForKey ((NSString)"NSApplication", (NSString)"NSPrincipalClass"); //Application listeners NSNotificationCenter.DefaultCenter.AddObserver(NSApplication.DidResignActiveNotification, OnDeactivated); NSNotificationCenter.DefaultCenter.AddObserver(NSApplication.DidBecomeActiveNotification, OnActivated); }
public override void InitializeApplication() { NSApplication.Init (); //Hijack (); if (pool != null) pool.Dispose (); pool = new NSAutoreleasePool (); appDelegate = new AppDelegate (IsGuest); NSApplication.SharedApplication.Delegate = appDelegate; }