private static EquipmentShortInfo[] GetEquipment() { if (Settings.Settings.Instance.User.Username.Length == 0 || Settings.Settings.Instance.User.Password.Length == 0) { MessageBox.Show("Funbeat user name and password must be entered in the ST2funbeat settings", "Login failure", MessageBoxButtons.OK); return new EquipmentShortInfo[0]; } else if (Settings.Settings.Instance.User.LoginId.Length == 0 || Settings.Settings.Instance.User.LoginSecret.Length == 0) { MessageBox.Show("Funbeat user name and password could not be confirmed. Make sure they are correct and that you are connected to the internet", "Login failure", MessageBoxButtons.OK); return new EquipmentShortInfo[0]; } else { try { MobileService client = new MobileService(); EquipmentShortInfo[] equipment = client.GetMyEquipment(appID, Settings.Settings.Instance.User.LoginId, Settings.Settings.Instance.User.LoginSecret); return equipment; } catch (Exception ex) { MessageBox.Show(string.Concat("Problem communicating equipment information with funbeat\n", ex.Message), "Funbeat communication error"); return new EquipmentShortInfo[0]; } } }