예제 #1
0
        private void QQExpression_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            ListBox listBox1 = sender as ListBox;

            MyClass.GifModel model = listBox1.SelectedItem as MyClass.GifModel;
            Pop_up.IsOpen = false;
            client.Talk(tableIndex, UserName, "E" + model.gifImg);
        }
예제 #2
0
        // 发送表情需要调用的方法。
        private void AddQQExpression()
        {
            QQExpression.Items.Clear();
            List <MyClass.GifModel> list = new List <MyClass.GifModel>();

            string    xmlpath = "../../XmlDoc/QQExpression.xml";
            XDocument xdoc    = XDocument.Load(xmlpath);

            XElement element = xdoc.Root;

            IEnumerable <XElement> e = element.Elements("Emoticon");

            foreach (var item in e)
            {
                MyClass.GifModel gifmodel = new MyClass.GifModel();
                gifmodel.gifImg = "../../qqexpression/" + item.Value;
                list.Add(gifmodel);
            }

            QQExpression.ItemsSource = list;
        }