public void SavePanelDidEndReturnCodeContextInfo(NSSavePanel sheet, NSInteger returnCode, IntPtr contextInfo)
 {
     if (returnCode == NSPanel.NSOKButton)
     {
         NSString filename = sheet.Filename + ".tiff";
         this.imageView.CroppedImage().TIFFRepresentation.WriteToFileAtomically(filename, true);
     }
 }
 public void SaveImageDidEnd(NSSavePanel panel, NSInteger returnCode, IntPtr contextInfo)
 {
     if (returnCode == NSPanel.NSOKButton)
     {
         NSRect frame = this.imageView.Frame;
         ImageUtils.IISaveImage(this.imageView, panel.URL, (uint) Math.Ceiling(frame.size.width), (uint) Math.Ceiling(frame.size.height));
     }
 }
 public void PanelDidEndReturnCodeContextInfo(NSSavePanel sheet, NSInteger returnCode, IntPtr contextInfo)
 {
     this.modalDelegate(sheet, returnCode, contextInfo);
     this.Autorelease();
 }
 public override bool PrepareSavePanel(NSSavePanel inSavePanel)
 {
     inSavePanel.Directory = FoundationFramework.NSHomeDirectory();
     inSavePanel.Delegate = this;
     inSavePanel.Message = "This is a customized save dialog for saving text files:";
     inSavePanel.AccessoryView = this.saveDialogCustomView;
     inSavePanel.RequiredFileType = "txt";
     inSavePanel.NameFieldLabel = "FILE NAME:";
     this.savePanel = inSavePanel;
     return true;
 }