zoukankan      html  css  js  c++  java
  • xml listview

                this.listView1.View = View.Details;
                this.listView1.Scrollable = true;
                this.listView1.MultiSelect = false;
                this.listView1.HeaderStyle = ColumnHeaderStyle.Nonclickable;
                this.listView1.Columns.Add("Changebefore", 60, HorizontalAlignment.Right);
                this.listView1.Columns.Add("Changeafter", 100, HorizontalAlignment.Left);
                this.listView1.Visible = true;

                //From here, we should read the information from changeinfodatase.xml"
                XmlDocument xmlDoc = new XmlDocument();
                xmlDoc.Load("changeinfodataset.xml");
                XmlNodeList nodeList = xmlDoc.SelectSingleNode("changeinfo").ChildNodes;//获取changeinfo节点的所有子节点
                foreach (XmlNode xn in nodeList)//遍历所有子节点   获取items节点
                {
                    XmlElement xe = (XmlElement)xn;//将子节点items类型转换为XmlElement类型  
                    XmlNodeList nls = xe.ChildNodes;//继续获取items  xe子节点的所有子节点  
                    ListViewItem lv = new ListViewItem();
                    foreach (XmlNode xn1 in nls)//遍历  
                    {                 
                        XmlElement xe2 = (XmlElement)xn1;//转换类型  
                        if (xe2.Name == "changebefore")//如果找到  
                        {
                            //From here, we get the information "changebefore"               
                            lv.SubItems[0].Text = xe2.InnerText;
                        }
                        if (xe2.Name == "changeafter")
                        {
                            //From here, we get the informatio "changeafter"
                            lv.SubItems.Add(xe2.InnerText);
                        }                  
                    }
                    this.listView1.Items.Add(lv);
                }

  • 相关阅读:
    www.a.shifen.com
    gstack pstack strace
    性能分析 函数粒度 函数里的一条语句 汇编 反编译 机器指令 %rbx,%rbp
    taocrypt
    sign
    Python 3.8.0 final¶ Release date: 2019-10-14
    超线程
    Python classes to extract information from the Linux kernel /proc files.
    借助中间件优化代码 将请求RequestId在服务端接收到请求在处理业务逻辑之前生成
    JVM CPU Profiler技术原理及源码深度解析
  • 原文地址:https://www.cnblogs.com/greencolor/p/1637776.html
Copyright © 2011-2022 走看看