public HandHandler()
{
ClientType clientType = Properties.Settings.Default.ClientType;
ButtonCodes.SetType(clientType);
if (clientType == ClientType.Custom)
{
buttonSender = new ButtonSender(Properties.Settings.Default.ClientType);
}
else
{
if (clientType == ClientType.XBMC)
{
buttonSender = new ButtonSender(Properties.Settings.Default.ClientType, Properties.Settings.Default.IpAddress, 9777);
}
else if (clientType == ClientType.Boxee)
{
buttonSender = new ButtonSender(Properties.Settings.Default.ClientType, Properties.Settings.Default.IpAddress, 9770);
}
buttonSender.SendNotification("KinEmote v0.3", "Hand Detected, tracking started.");
}
lastDirection = Direction.Illegal;
handMode = HandMode.Normal;
lastPoint = new Point(1, 2);
intervalTimer = new Timer();
intervalTimer.Elapsed += new ElapsedEventHandler(intervalTimer_Elapsed);
}