Beispiel #1
0
        private void GetSource()
        {
            XmlDocument xmlDocument = new XmlDocument();

            if (File.Exists("XMLConfig.xml"))
            {
                xmlDocument.Load("XMLConfig.xml");
            }
            listGroup = new List <string>();
            dicGroup  = new Dictionary <string, string>();
            if (string.IsNullOrEmpty(cQQ))
            {
                return;
            }
            XmlNode xmlNode = xmlDocument.SelectSingleNode("Root");

            if (xmlNode == null)
            {
                return;
            }
            XmlNode xmlQQ = xmlNode.SelectSingleNode(cQQ);

            if (xmlQQ == null)
            {
                return;
            }
            var qqgroups = xmlQQ.SelectNodes("QQGroup");

            foreach (XmlNode node in qqgroups)
            {
                var    ats       = node.Attributes;
                string groupNum  = ats.GetNamedItem("GroupNum").Value.ToString();
                string groupName = ats.GetNamedItem("GroupName").Value.ToString();
                dicGroup.Add(groupName, groupNum);
                listGroup.Add(groupName);
            }
            dgvGroup.DataSource = HelperAction.getModelList(listGroup);
        }
Beispiel #2
0
 private void SetDate()
 {
     dgvQQ.DataSource    = HelperAction.getModelList(listQQ);
     dgvNewQQ.DataSource = HelperAction.getModelList(listNewQQ);
 }
Beispiel #3
0
 private void BtnGetGroup_Click(object sender, EventArgs e)
 {
     HelperAction.GetGroup(out listGroup, out dicGroup, webBrowser1);
     dgvGroup.DataSource = HelperAction.getModelList(listGroup);
 }