示例#1
0
 public void showAsSheetForWindow(NSWindow parentWindow)
 {
     this.updateData(true);
     NSApp.beginSheet(this.window)
     modalForWindow(parentWindow)
     modalDelegate(this)
     didEndSelector(__selector(didEndSheet: returnCode: contextInfo:))
     contextInfo(null);
 }
示例#2
0
        private void didEndSheet(NSWindow sheet) returnCode(int returnCode) contextInfo(id info)
        {
            if (returnCode == 1)
            {
                this.updateData(false);
                [email protected](this.TaskToEdit);
            }
            else
            {
                this.updateData(true);
                [email protected](this.TaskToEdit);
            }

            this.window.orderOut(this.window);
            NSApp.stopModal();
        }
示例#3
0
 public void cancelAction(id sender)
 {
     this.window.makeFirstResponder(this.window);
     NSApp.endSheet(this.window) returnCode(NSModalResponseCancel);
 }
示例#4
0
 public void applyAction(id sender)
 {
     this.window.makeFirstResponder(this.window);
     NSApp.endSheet(this.window) returnCode(NSModalResponseOK);
 }