private void button1_Click(object sender, EventArgs e) { List<LifxPanController> panController = LifxCommunicator.Instance.Discover(); if (panController.Count == 0) { MessageBox.Show("Could not find any bulbs"); mPowerGB.Enabled = false; mLabelsGB.Enabled = false; mLightStatusGB.Enabled = false; return; } mBulb = panController[0].Bulbs[0]; mBulbIPTB.Text = mBulb.IpEndpoint.Address.ToString(); mTargetMACTB.Text = mBulb.MacAddress; mPANControllerTB.Text = mBulb.PanHandler; LifxPowerState powerState = mBulb.GetPowerState(); if (powerState == LifxPowerState.On) mPowerStateOnCB.Checked = true; else mPowerStateOnCB.Checked = false; mPowerGB.Enabled = true; mLabelsGB.Enabled = true; mLightStatusGB.Enabled = true; }
public LifxReceivedMessage SendCommand(LifxCommand command, LifxBulb bulb) { return SendCommand(command, bulb.MacAddress, bulb.PanHandler, bulb.IpEndpoint); }
public LifxReceivedMessage SendCommand(LifxCommand command, LifxBulb bulb) { return(SendCommand(command, bulb.MacAddress, bulb.PanHandler, bulb.IpEndpoint)); }