private void buttonRegister_Click(object sender, EventArgs e) { if (!_device.Register()) { SonyTVSetupPin pinDialog = new SonyTVSetupPin(); if (pinDialog.ShowDialog() == DialogResult.OK) { _device.SendPairingKey(pinDialog.GetPIN()); } } }