コード例 #1
0
        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
            }
        }
コード例 #2
0
ファイル: OverheadMessages.cs プロジェクト: DarkLotus/Klip
        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
            {
            }
        }