private void ConnectWiimote()
{
try
{
WMC.FindAllWiimotes();
int index = 2;
foreach (Wiimote wiimote in WMC)
{
wiimote.Connect();
wiimote.SetLEDs(index++);
wmList.Add(wiimote);
}
}
catch (WiimoteNotFoundException ex)
{
//System.Windows.Forms.MessageBox.Show("Wiimote not found ", ex.Message);
}
catch (WiimoteException ex)
{
System.Windows.Forms.MessageBox.Show("Wiimote error: ", ex.Message);
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show("Unknown error: ", ex.Message);
}
}