public override void AwakeFromNib () { msgPort = CFMessagePort.CreateRemotePort (CFAllocator.Default, "com.example.app.port.server"); if (msgPort == null) { var alert = new NSAlert { MessageText = "Unable to connect to port? Did you launch server first?", }; alert.AddButton ("OK"); alert.RunSheetModal (Window); } TheButton.Activated += SendMessage; }
public override void AwakeFromNib() { msgPort = CFMessagePort.CreateRemotePort(CFAllocator.Default, "com.example.app.port.server"); if (msgPort == null) { var alert = new NSAlert { MessageText = "Unable to connect to port? Did you launch server first?", }; alert.AddButton("OK"); alert.RunSheetModal(Window); } TheButton.Activated += SendMessage; }