listview执行不同程序

private void Form1_Load(object sender, EventArgs e)
{
listView1.LargeImageList = imageList1;
listView1.Items.Add("QQ");
listView1.Items[0].ImageIndex = 0;
listView1.Items.Add("千千静听");
listView1.Items[1].ImageIndex = 1;
}

private void listView1_DoubleClick(object sender, EventArgs e)
{
if (listView1.Items[0].Selected)
{
System.Diagnostics.Process.Start(@"C:\Program Files\Tencent\QQ\Bin\QQ.exe");
}
else
{
System.Diagnostics.Process.Start(@"E:\软件包\TTPLAYER\TTPlayer.exe");
}
}

你可能感兴趣的:(ListView,C#)