private void TryLoad(AppDelegate d, NSUrl url) { if (url == null) { Window.Close (); } else { FileToLoad (url.Path); LoadCurrentEntry (); Window.MakeKeyAndOrderFront (this); d.AddWindowController (this); } }
internal void OpenComic(AppDelegate d) { NSOpenPanel openPanel = new NSOpenPanel (); openPanel.AllowedFileTypes = new string[] { "cbr" }; openPanel.BeginSheet (Window, new NSSavePanelComplete (r => TryLoad (d, openPanel.Url))); }