private void ConnectRegisterHue() { HueMusic.ConnectRegister(UIHueIp.Text); if (!AsyncHelper.RunSync(() => HueMusic.client.CheckConnection())) { UIHueConnectKey.Show(); UIHueConnectRegister.Show(); } else { EndConnectHue(); } }
private void UIHueConnectRegister_Click(object sender, EventArgs e) { if (UIHueIp.Text != null) { try { UIHueConnectKey.Hide(); UIHueConnectRegister.Hide(); ConnectHue(); ShowLights(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); UIHueConnectKey.Show(); UIHueConnectRegister.Show(); } } }