예제 #1
0
        private void random()
        {
            XmlDocument xmlDoc = new XmlDocument();

            xmlDoc.Load("D:/danmaku.xml");
            XmlNode     root     = xmlDoc.GetElementsByTagName("DanmakuList")[0];
            XmlNodeList NodeList = root.ChildNodes;
            int         i        = -1;

            foreach (XmlNode node in NodeList)
            {
                i++;
            }
            Random ran = new Random();

            for (int a = 0; a < 10; a++)
            {
                int RandKey = ran.Next(0, i);
                TextBox_log.AppendText(NodeList[RandKey].InnerText.ToString() + "\n");
            }
        }
예제 #2
0
 // สร้าง Candidate จาก Link peerID ใน Event ของ Conference
 void Receiver_OnLinkCandidate(LinkCandidateArgs p)
 {
     TextBox_log.AppendText("\n\n*************** Candidate ***********\n");
     TextBox_log.AppendText(p.Candidate.ToJson());
 }