Exemple #1
0
        public async void SetLightValues(Bulb l)
        {
            if (l.on)
            {
                //Debug.WriteLine(l.hue);
                var json = await network.SetLightInfo(l.id, $"{{\"bri\": {l.bri},\"hue\": {(l.hue)},\"sat\": {l.sat}}}");

                //Debug.WriteLine(json);
            }
        }
Exemple #2
0
 private async void listBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     currentBulb = totalBulbs.ElementAt(listBox.SelectedIndex);
     Frame.Navigate(typeof(BulbPage), currentBulb);
 }
Exemple #3
0
        public async void SetLightState(Bulb l)
        {
            var json = await network.SetLightInfo(l.id, $"{{\"on\": {((l.on) ? "true" : "false")}}}");

            //Debug.WriteLine(json);
        }