Esempio n. 1
0
 private void ConnectRegisterHue()
 {
     HueMusic.ConnectRegister(UIHueIp.Text);
     if (!AsyncHelper.RunSync(() => HueMusic.client.CheckConnection()))
     {
         UIHueConnectKey.Show();
         UIHueConnectRegister.Show();
     }
     else
     {
         EndConnectHue();
     }
 }
Esempio n. 2
0
 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();
         }
     }
 }