Monobjc.AppKit.NSAlert.BeginSheetModalForWindowModalDelegateDidEndSelectorContextInfo C# (CSharp) Method

BeginSheetModalForWindowModalDelegateDidEndSelectorContextInfo() public method

Runs the receiver modally as an alert sheet attached to a specified window.

Original signature is '- (void)beginSheetModalForWindow:(NSWindow *)window modalDelegate:(id)modalDelegate didEndSelector:(SEL)alertDidEndSelector contextInfo:(void *)contextInfo'

Available in Mac OS X v10.3 and later.

public BeginSheetModalForWindowModalDelegateDidEndSelectorContextInfo ( NSWindow window, SheetDidEndReturnCodeContextInfoEventHandler modalDelegate, IntPtr contextInfo ) : void
window NSWindow The parent window for the sheet.
modalDelegate SheetDidEndReturnCodeContextInfoEventHandler The delegate for the modal-dialog session.
contextInfo System.IntPtr Contextual data passed to modalDelegate in didEndSelector message.
return void
        public void BeginSheetModalForWindowModalDelegateDidEndSelectorContextInfo(NSWindow window, SheetDidEndReturnCodeContextInfoEventHandler<NSAlert> modalDelegate, IntPtr contextInfo)
        {
            NSAlertSheetDispatcher sheetDispatcher = new NSAlertSheetDispatcher(modalDelegate);
            ObjectiveCRuntime.SendMessage(this, "beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:", window, sheetDispatcher, ObjectiveCRuntime.Selector("alertDidEnd:returnCode:contextInfo:"), contextInfo);
        }