惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
SegmentFault 最新的问题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Attack and Defense Labs
Attack and Defense Labs
F
Full Disclosure
Vercel News
Vercel News
N
News | PayPal Newsroom
The GitHub Blog
The GitHub Blog
H
Hacker News: Front Page
H
Heimdal Security Blog
P
Privacy International News Feed
博客园 - 司徒正美
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cisco Blogs
L
Lohrmann on Cybersecurity
D
Docker
Recent Announcements
Recent Announcements
Security Archives - TechRepublic
Security Archives - TechRepublic
人人都是产品经理
人人都是产品经理
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Proofpoint News Feed
T
Tailwind CSS Blog
C
Check Point Blog
博客园 - 叶小钗
Google Online Security Blog
Google Online Security Blog
Martin Fowler
Martin Fowler
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
S
Secure Thoughts
博客园 - Franky
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
P
Palo Alto Networks Blog
Latest news
Latest news
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 三生石上(FineUI控件)
The Cloudflare Blog
Last Week in AI
Last Week in AI
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Cyberwarzone
Cyberwarzone
小众软件
小众软件
Cisco Talos Blog
Cisco Talos Blog
Hacker News: Ask HN
Hacker News: Ask HN
T
Threatpost
T
Tenable Blog
P
Privacy & Cybersecurity Law Blog
WordPress大学
WordPress大学

博客园 - 林骄

Android note 2010.08.02 v2 2010.08.03 Android note Android Note 2010.08.02 Android Note 2011.08.01 [Biztalk]问题集 - 林骄 - 博客园 Winform导出Excel Excel单元格颜色 判断系统版本 How to open a folder with explorer - 林骄 Print Can't open Infragistics help document How to get local machine date format.如何获取本机时间格式 cannot open user default database WebService Tips 中文全半角转换 Windows Service 装机备忘 Db2中的时间
ListView && XmlReader
林骄 · 2010-07-07 · via 博客园 - 林骄

ListView:

It's a very good control. The book just introduce it samply.

代码

   private void BindListView()
        {
            lv.GridLines 
= true;
            lv.LabelEdit 
= true;
            lv.AllowColumnReorder 
= true;
            
//lv.CheckBoxes = true;
            lv.FullRowSelect = true;
            lv.Sorting 
= SortOrder.Ascending;

            lv.Columns.Add(

"ProcessName");
            lv.Columns.Add(
"Id");
            lv.Columns.Add(
"MainWindowTitle");

            ListViewItem lvItem 

= null;
            
foreach (Process process in System.Diagnostics.Process.GetProcesses())
            {
                lvItem 
= new ListViewItem();
                lvItem.Text 
= process.ProcessName;
                lvItem.SubItems.Add(process.Id);
                lvItem.SubItems.Add(process.MainWindowTitle);

                lv.Items.Add(lvItem);
            }
        }

代码

 public class CountryItem : System.Windows.Forms.ListViewItem
    {
        
public string CountryName { getset; }
        
public string CountryAbbreviation { getset; }
        
public string LastModifyTime { getset; }public CountryItem(string countryName, string countryAbbreviation,
            
string currency, string lastModifyTime)
        {
            
this.CountryName = countryName;
            
this.CountryAbbreviation = countryAbbreviation;
            
this.LastModifyTime = lastModifyTime;
            
base.Text = countryName;
            
base.SubItems.Add(currency);
            
base.SubItems.Add(lastModifyTime);
        }
    }

XmlReader:

代码

 private void TestXml()
        {         
            XmlReader rdr 
= XmlReader.Create("Favorites.xml");
            
while (rdr.Read())
            {
                
if (rdr.NodeType == XmlNodeType.Element)
                {
                    
this.txtMsg.Text += rdr.Name + "\n\t" + " ( ";
                    
for (int i = 0; i < rdr.AttributeCount; i++)
                    {
                        rdr.MoveToAttribute(i);
                        
this.txtMsg.Text += rdr.Name + ":" + rdr.Value + ";";
                    }
                    
this.txtMsg.Text += " ) ";
                }
            }
        }