【发布时间】:2010-02-26 10:31:19
【问题描述】:
任何专家都可以帮我解决使用 c#.net 作为前端刻录 dvd 的问题吗? 我需要从 winform 的列表视图中选择文件,然后单击按钮,我需要 刻录 dvd 中的那些 多个 文件。 这个概念是从列表视图中选择多个文件,然后单击按钮,它应该在某个所需的驱动器中创建一个文件夹。然后它应该在 dvd 中刻录完整的文件夹。整个过程应该在单击一个按钮期间执行。 ... 有什么办法吗?? 代码应该兼容在 .net2008 和 windowsXP 中使用给定的代码兼容吗??
我使用组件来获取 dll/类库。来自 (msdn.microsoft.com/en-au/vcsharp/aa336741.aspx) 但它给了我错误消息“d:\filepath\burncomponent.dll 中没有要放置在工具箱中的组件
private void button1_Click(object sender, EventArgs e)
{
XPBurnCD cd = new XPBurnCD();
cd.BurnComplete += new NotifyCompletionStatus(BurnComplete);
MessageBox.Show(cd.BurnerDrive);
DirectoryInfo dir = new DirectoryInfo(_burnFolder);
foreach (FileInfo file in dir.GetFiles())
{
cd.AddFile(file.FullName, file.Name);
}
cd.RecordDisc(false, false);
}
private void BurnComplete(uint status)
{
MessageBox.Show("Finished writing files to disc");
}
private void button2_Click_1(object sender, EventArgs e)
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
fbd.ShowNewFolderButton = false;
fbd.Description = "Please select a folder";
fbd.RootFolder = System.Environment.SpecialFolder.DesktopDirectory;
if (fbd.ShowDialog() == DialogResult.OK)
{
_burnFolder = fbd.SelectedPath;
}
else
{
_burnFolder = string.Empty;
}
}
【问题讨论】:
标签: c# .net winforms dvd-burning