public bool CheckConnection()
{
WiimoteCollection wmc = new WiimoteCollection();
bool connected = false;
foreach(Wiimote wm in wmList)
{
wmc.Add(wm);
try
{
wmc.FindAllWiimotes();
wm.Connect();
connected = true;
}
catch (WiimoteNotFoundException e)
{
connected = false;
System.Windows.Forms.MessageBox.Show(e.Message);
}
}
return connected;
}