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