コード例 #1
0
 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
ファイル: Controller.cs プロジェクト: Monobjc/monobjc-samples
 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
ファイル: Controller.cs プロジェクト: Monobjc/monobjc-samples
 public void OpenImageDidEndReturnCodeContextInfo(NSOpenPanel panel, NSInteger returnCode, IntPtr contextInfo)
 {
     if (returnCode == NSPanel.NSOKButton)
     {
         if (panel.Filenames.Count > 0)
         {
             ImageInfo image = ImageUtils.IICreateImage(NSURL.FileURLWithPath((panel.Filenames.ObjectAtIndex(0).CastTo<NSString>())));
             this.imageView.Image = image;
             this.Reset(null);
         }
     }
 }
コード例 #4
0
 public void PanelDidEndReturnCodeContextInfo(SFCertificateTrustPanel sheet, NSInteger returnCode, IntPtr contextInfo)
 {
     this.modalDelegate(sheet, returnCode, contextInfo);
     this.Release();
 }
コード例 #5
0
 public void SheetDidEndReturnCodeContextInfo(NSWindow sheet, NSInteger returnCode, IntPtr contextInfo)
 {
     this.modalDelegate(sheet, returnCode, contextInfo);
     this.Autorelease();
 }
コード例 #6
0
		public static NSDecimal FromInteger (NSInteger value)
		{
			return NSNumber.NumberWithInteger (value).DecimalValue;
		}
コード例 #7
0
 public void PanelDidEndReturnCodeContextInfo(NSSavePanel sheet, NSInteger returnCode, IntPtr contextInfo)
 {
     this.modalDelegate(sheet, returnCode, contextInfo);
     this.Autorelease();
 }
コード例 #8
0
 public Id TableViewObjectValueForTableColumnRow(NSTableView aTableView, NSTableColumn theColumn, NSInteger rowIndex)
 {
     String identifier = theColumn.Identifier.CastTo<NSString>();
     if (identifier.Equals("page"))
     {
         PDFSelection selection = this._searchResults.ObjectAtIndex((uint) rowIndex).CastTo<PDFSelection>();
         return selection.Pages.ObjectAtIndex(0).CastTo<PDFPage>().Label;
     }
     else if (identifier.Equals("section"))
     {
         PDFSelection selection = this._searchResults.ObjectAtIndex((uint) rowIndex).CastTo<PDFSelection>();
         PDFOutline outline = this._pdfView.Document.OutlineItemForSelection(selection);
         return (outline != null) ? outline.Label : null;
     }
     else
     {
         return null;
     }
 }
コード例 #9
0
 public Id OutlineViewChildOfItem(NSOutlineView outlineView, NSInteger index, Id item)
 {
     if (item == null)
     {
         if (this._outline != null)
         {
             return this._outline.ChildAtIndex(index).Retain();
         }
         else
         {
             return null;
         }
     }
     else
     {
         return item.CastTo<PDFOutline>().ChildAtIndex((uint) index).Retain();
     }
 }
コード例 #10
0
 public void PrintPanelDidEndReturnCodeContextInfo(NSPrintPanel printPanel, NSInteger returnCode, IntPtr contextInfo)
 {
     this.modalDelegate(printPanel, returnCode, contextInfo);
     this.Autorelease();
 }
コード例 #11
0
 public void SheetDidEndReturnCodeContextInfo(NSOpenPanel panel, NSInteger returnCode, IntPtr contextInfo)
 {
     this.modalDelegate(panel, returnCode, contextInfo);
     this.Autorelease();
 }
コード例 #12
0
 public void OpenPanelDidEndReturnCodeContextInfo(NSOpenPanel sheet, NSInteger returnCode, IntPtr contextInfo)
 {
     NSImage image = new NSImage(sheet.Filename).SafeAutorelease();
     this.imageView.Image = image;
     this.ImageChanged(null);
 }
コード例 #13
0
 public void PanelDidEndReturnCodeContextInfo(SFChooseIdentityPanel sheet, NSInteger returnCode, IntPtr contextInfo)
 {
     this.modalDelegate(sheet, returnCode, contextInfo);
     this.Release();
 }
コード例 #14
0
 public void SheetDidEndReturnCodeContextInfo(NSWindow sheet, NSInteger returnCode, IntPtr contextInfo)
 {
     sheet.OrderOut(this);
 }
コード例 #15
0
 public void PanelDidEndReturnCodeContextInfo(SFKeychainSettingsPanel sheet, NSInteger returnCode, IntPtr contextInfo)
 {
     this.modalDelegate(sheet, returnCode, contextInfo);
     this.Release();
 }