public static void Load(XmlElement node) { ClearAll(); try { foreach (XmlElement el in node.GetElementsByTagName("overheadmessage")) { OverheadMessage overheadMessage = new OverheadMessage { MessageOverhead = el.GetAttribute("message"), SearchMessage = el.GetAttribute("searchtext"), Hue = string.IsNullOrEmpty(el.GetAttribute("hue")) ? 68 : Convert.ToInt32(el.GetAttribute("hue")) }; OverheadMessages.Add(overheadMessage); } } catch { // ignored } }
public static void Load(XmlElement node) { ClearAll(); try { foreach (XmlElement el in node.GetElementsByTagName("overheadmessage")) { OverheadMessage overheadMessage = new OverheadMessage { MessageOverhead = el.GetAttribute("message"), SearchMessage = el.GetAttribute("searchtext") }; OverheadMessageList.Add(overheadMessage); } } catch { } }