Skip to content

Instantly share code, notes, and snippets.

@Microncode
Last active February 1, 2020 13:43
Show Gist options
  • Save Microncode/39f4637b813d86df84895f104d62f4c6 to your computer and use it in GitHub Desktop.
Save Microncode/39f4637b813d86df84895f104d62f4c6 to your computer and use it in GitHub Desktop.
Here is a snap example of using the CSDVDCDBurner in order to burn a file and a directory to DVD media using C#
//Init the component
dvdcdBurner1.UserName = "Your email";
dvdcdBurner1.UserKey = "Your registration key";
//Add a file to the burnning list
dvdcdBurner1.AddFile(OpenFileDialog1.FileName);
//Add a directory to the burnning list
//This will add all the files and sub directories
dvdcdBurner1.AddDir(sDirName);
//Events:
//On completed event
dvdcdBurner1.BurnCompleted += () =>
{
Console.WriteLine("\nCompleted.");
};
//On progress event
dvdcdBurner1.BurnProgress += (e) =>
{
Console.WriteLine("\nBurn progress " + (int)e;);
};
//Burn
dvdcdBurner1.Burn( comboDrives.SelectedIndex,
txtMediaLable.Text,
chkCloseMedia.Checked,
chkEject.Checked);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment