public List <SupportedClient> GetSupportedClientList() { List <SupportedClient> list = new List <SupportedClient>(); XmlNodeList nodes = this.xmlDocument.SelectNodes("/settings/clients/client"); if (nodes != null) { foreach (XmlNode node in nodes) { try { uint version = uint.Parse(node.Attributes["version"].Value); string description = node.Attributes["description"].Value; uint otbVersion = uint.Parse(node.Attributes["otbversion"].Value); uint datSignature = uint.Parse(node.Attributes["datsignature"].Value, System.Globalization.NumberStyles.HexNumber); uint sprSignature = uint.Parse(node.Attributes["sprsignature"].Value, System.Globalization.NumberStyles.HexNumber); SupportedClient client = new SupportedClient(version, description, otbVersion, datSignature, sprSignature); list.Add(client); } catch { MessageBox.Show(string.Format("Error loading file {0}", this.SettingsFilename)); } } } return(list); }
public List <SupportedClient> GetSupportedClientList() { List <SupportedClient> list = new List <SupportedClient>(); XmlNodeList nodes = xmlDocument.SelectNodes("/settings/clients/client"); if (nodes != null) { foreach (XmlNode node in nodes) { try { UInt32 version = UInt32.Parse(node.Attributes["version"].Value); string description = node.Attributes["description"].Value; UInt32 otbVersion = UInt32.Parse(node.Attributes["otbversion"].Value); UInt32 datSignature = (UInt32)System.Int32.Parse(node.Attributes["datsignature"].Value, System.Globalization.NumberStyles.HexNumber); UInt32 sprSignature = (UInt32)System.Int32.Parse(node.Attributes["sprsignature"].Value, System.Globalization.NumberStyles.HexNumber); SupportedClient client = new SupportedClient(version, description, otbVersion, datSignature, sprSignature); list.Add(client); } catch { System.Windows.Forms.MessageBox.Show("Error"); } } } return(list); }