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);
     }
 }
示例#2
0
 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));
     }
 }
示例#3
0
 public void PanelDidEndReturnCodeContextInfo(NSSavePanel sheet, NSInteger returnCode, IntPtr contextInfo)
 {
     this.modalDelegate(sheet, returnCode, contextInfo);
     this.Autorelease();
 }
示例#4
0
 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;
 }