void Initialize()
{
Controller.HideWindowEvent += delegate
{
using (var a = new NSAutoreleasePool ())
{
InvokeOnMainThread (delegate {
Window.PerformClose (this);
});
}
};
Controller.ShowWindowEvent += delegate
{
using (var a = new NSAutoreleasePool ())
{
InvokeOnMainThread (delegate {
Window.OrderFrontRegardless ();
});
}
};
}