//lbContent is a list box.
private void lbContent_DoubleClick(object sender, System.EventArgs e)
{
         //the book name that selected and has double clicked.
string bookName = lbContent.SelectedItem.ToString(); FileInfo file;
for (int i = 0; i < books.Length; i++)
{
file = books[i];
if (file.Name == bookName && file.Name.EndsWith(".chm"))
{

//Open this file with HTML help executable.

}
if (file.Name == bookName && file.Name.EndsWith(".pdf"))
{         //Open this file with Adobe Reader. }
}
}
就是在双击书名所在的项时,用指定程序打开EBOOK,HTML helper 或 Adobe Reader 。
两个if 内的代码不知道怎么写???