-
Notifications
You must be signed in to change notification settings - Fork 0
/
HueDebug.xaml.cs
56 lines (48 loc) · 1.35 KB
/
HueDebug.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using System;
using System.Windows;
namespace Microsoft.Samples.Kinect.BodyBasics
{
/// <summary>
/// Logica di interazione per HueDebug.xaml
/// </summary>
public partial class HueDebug : Window
{
public static HueDebug HueReference;
private HueController hueControl;
public HueDebug()
{
InitializeComponent();
if (HueReference == null)
{
HueReference = this;
}
hueControl = null;
}
private void testButton(object sender, RoutedEventArgs e)
{
hueControl.SendDoubleColorCommand("FFFFFFF", "FF3333", "1");
}
private void connectButton(object sender, RoutedEventArgs e)
{
if (hueControl == null)
{
hueControl = new HueController("192.168.0.2");
}
try
{
hueControl.Connect();
} catch (Exception ex)
{
this.textBlock.Text += ex.Message + "\n";
}
}
private void button2_Click(object sender, RoutedEventArgs e)
{
hueControl.SendColor("12FF34", 4, "1");
}
private void button3_Click(object sender, RoutedEventArgs e)
{
hueControl.SendAlert("23FF43", "1");
}
}
}