BurnDiscCopy.cs 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555
  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. using NEROLib;
  7. namespace LYFZ.NeroDiscBurn.NET
  8. {
  9. /// <summary>
  10. /// Summary description for BurnDiscCopyForm.
  11. /// </summary>
  12. public class BurnDiscCopyForm : System.Windows.Forms.Form
  13. {
  14. private Nero m_nero;
  15. private NeroDrive m_sourceDrive;
  16. private NeroDrives m_recorders;
  17. private ChooseBurnFlagsForm m_frmChooseBurnFlags;
  18. private ChooseMediaForm m_frmChooseMedia;
  19. private ChooseSpeedForm m_frmChooseWriteSpeed;
  20. private ChooseSpeedForm m_frmChooseReadSpeed;
  21. // This is our custom class that represents a single
  22. // combobox item. We want to store a NeroDrive in it.
  23. //
  24. private class CBItem
  25. {
  26. public NeroDrive m_drive;
  27. public CBItem (NeroDrive drive)
  28. {
  29. m_drive = drive;
  30. }
  31. public override string ToString()
  32. {
  33. return ((m_drive.DriveLetter == "")? "?": m_drive.DriveLetter.ToUpper ()) + ": " + m_drive.DeviceName;
  34. }
  35. }
  36. private System.Windows.Forms.Button c_Copy;
  37. private System.Windows.Forms.Button c_Cancel;
  38. private System.Windows.Forms.Label label1;
  39. private System.Windows.Forms.ComboBox c_Recorders;
  40. private System.Windows.Forms.Label label2;
  41. private System.Windows.Forms.Button c_BrowseImage;
  42. private System.Windows.Forms.CheckBox c_IgnoreDataErrors;
  43. private System.Windows.Forms.CheckBox c_IgnoreAudioErrors;
  44. private System.Windows.Forms.CheckBox c_ReadISRC;
  45. private System.Windows.Forms.Button c_ReadSpeed;
  46. private System.Windows.Forms.Button c_WriteSpeed;
  47. private System.Windows.Forms.Button c_BurnFlags;
  48. private System.Windows.Forms.Button c_MediaType;
  49. private System.Windows.Forms.CheckBox c_OnTheFly;
  50. private System.Windows.Forms.CheckBox c_DeleteImage;
  51. private System.Windows.Forms.TextBox c_ImageFilepath;
  52. private System.Windows.Forms.Label label3;
  53. private System.Windows.Forms.TextBox c_Settings;
  54. private System.Windows.Forms.Label label4;
  55. private System.Windows.Forms.TextBox c_SourceDrive;
  56. private System.Windows.Forms.CheckBox c_RAWReadMode;
  57. private System.Windows.Forms.TextBox c_NumberOfRetries;
  58. private System.Windows.Forms.Label label5;
  59. /// <summary>
  60. /// Required designer variable.
  61. /// </summary>
  62. private System.ComponentModel.Container components = null;
  63. public BurnDiscCopyForm(Nero nero, NeroDrive drive)
  64. {
  65. //
  66. // Required for Windows Form Designer support
  67. //
  68. InitializeComponent();
  69. m_nero = nero;
  70. m_sourceDrive = drive;
  71. m_frmChooseBurnFlags = new ChooseBurnFlagsForm ();
  72. m_frmChooseMedia = new ChooseMediaForm (m_nero);
  73. m_frmChooseReadSpeed = new ChooseSpeedForm (m_sourceDrive, false);
  74. m_frmChooseWriteSpeed = new ChooseSpeedForm (null, true);
  75. }
  76. /// <summary>
  77. /// Clean up any resources being used.
  78. /// </summary>
  79. protected override void Dispose( bool disposing )
  80. {
  81. if( disposing )
  82. {
  83. if(components != null)
  84. {
  85. components.Dispose();
  86. }
  87. }
  88. base.Dispose( disposing );
  89. }
  90. #region Windows Form Designer generated code
  91. /// <summary>
  92. /// Required method for Designer support - do not modify
  93. /// the contents of this method with the code editor.
  94. /// </summary>
  95. private void InitializeComponent()
  96. {
  97. this.c_Copy = new System.Windows.Forms.Button();
  98. this.c_Cancel = new System.Windows.Forms.Button();
  99. this.label1 = new System.Windows.Forms.Label();
  100. this.c_Recorders = new System.Windows.Forms.ComboBox();
  101. this.c_OnTheFly = new System.Windows.Forms.CheckBox();
  102. this.c_DeleteImage = new System.Windows.Forms.CheckBox();
  103. this.label2 = new System.Windows.Forms.Label();
  104. this.c_ImageFilepath = new System.Windows.Forms.TextBox();
  105. this.c_BrowseImage = new System.Windows.Forms.Button();
  106. this.c_IgnoreDataErrors = new System.Windows.Forms.CheckBox();
  107. this.c_IgnoreAudioErrors = new System.Windows.Forms.CheckBox();
  108. this.c_ReadISRC = new System.Windows.Forms.CheckBox();
  109. this.c_RAWReadMode = new System.Windows.Forms.CheckBox();
  110. this.c_ReadSpeed = new System.Windows.Forms.Button();
  111. this.c_WriteSpeed = new System.Windows.Forms.Button();
  112. this.c_BurnFlags = new System.Windows.Forms.Button();
  113. this.c_MediaType = new System.Windows.Forms.Button();
  114. this.label3 = new System.Windows.Forms.Label();
  115. this.c_Settings = new System.Windows.Forms.TextBox();
  116. this.label4 = new System.Windows.Forms.Label();
  117. this.c_SourceDrive = new System.Windows.Forms.TextBox();
  118. this.c_NumberOfRetries = new System.Windows.Forms.TextBox();
  119. this.label5 = new System.Windows.Forms.Label();
  120. this.SuspendLayout();
  121. //
  122. // c_Copy
  123. //
  124. this.c_Copy.Location = new System.Drawing.Point(408, 16);
  125. this.c_Copy.Name = "c_Copy";
  126. this.c_Copy.TabIndex = 21;
  127. this.c_Copy.Text = "Copy";
  128. this.c_Copy.Click += new System.EventHandler(this.c_Copy_Click);
  129. //
  130. // c_Cancel
  131. //
  132. this.c_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  133. this.c_Cancel.Location = new System.Drawing.Point(408, 48);
  134. this.c_Cancel.Name = "c_Cancel";
  135. this.c_Cancel.TabIndex = 22;
  136. this.c_Cancel.Text = "Cancel";
  137. //
  138. // label1
  139. //
  140. this.label1.Location = new System.Drawing.Point(8, 56);
  141. this.label1.Name = "label1";
  142. this.label1.Size = new System.Drawing.Size(136, 16);
  143. this.label1.TabIndex = 4;
  144. this.label1.Text = "Choose destination drive:";
  145. //
  146. // c_Recorders
  147. //
  148. this.c_Recorders.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  149. this.c_Recorders.Location = new System.Drawing.Point(8, 72);
  150. this.c_Recorders.Name = "c_Recorders";
  151. this.c_Recorders.Size = new System.Drawing.Size(184, 21);
  152. this.c_Recorders.TabIndex = 5;
  153. this.c_Recorders.SelectedIndexChanged += new System.EventHandler(this.c_Recorders_SelectedIndexChanged);
  154. //
  155. // c_OnTheFly
  156. //
  157. this.c_OnTheFly.Checked = true;
  158. this.c_OnTheFly.CheckState = System.Windows.Forms.CheckState.Checked;
  159. this.c_OnTheFly.Location = new System.Drawing.Point(8, 104);
  160. this.c_OnTheFly.Name = "c_OnTheFly";
  161. this.c_OnTheFly.Size = new System.Drawing.Size(80, 16);
  162. this.c_OnTheFly.TabIndex = 10;
  163. this.c_OnTheFly.Text = "On the fly";
  164. this.c_OnTheFly.CheckedChanged += new System.EventHandler(this.c_OnTheFly_CheckedChanged);
  165. //
  166. // c_DeleteImage
  167. //
  168. this.c_DeleteImage.Checked = true;
  169. this.c_DeleteImage.CheckState = System.Windows.Forms.CheckState.Checked;
  170. this.c_DeleteImage.Location = new System.Drawing.Point(96, 104);
  171. this.c_DeleteImage.Name = "c_DeleteImage";
  172. this.c_DeleteImage.Size = new System.Drawing.Size(96, 16);
  173. this.c_DeleteImage.TabIndex = 11;
  174. this.c_DeleteImage.Text = "Delete image";
  175. //
  176. // label2
  177. //
  178. this.label2.Location = new System.Drawing.Point(8, 128);
  179. this.label2.Name = "label2";
  180. this.label2.Size = new System.Drawing.Size(100, 16);
  181. this.label2.TabIndex = 13;
  182. this.label2.Text = "Image file path:";
  183. //
  184. // c_ImageFilepath
  185. //
  186. this.c_ImageFilepath.Location = new System.Drawing.Point(8, 144);
  187. this.c_ImageFilepath.Name = "c_ImageFilepath";
  188. this.c_ImageFilepath.Size = new System.Drawing.Size(184, 20);
  189. this.c_ImageFilepath.TabIndex = 12;
  190. this.c_ImageFilepath.Text = "";
  191. //
  192. // c_BrowseImage
  193. //
  194. this.c_BrowseImage.Location = new System.Drawing.Point(200, 144);
  195. this.c_BrowseImage.Name = "c_BrowseImage";
  196. this.c_BrowseImage.TabIndex = 14;
  197. this.c_BrowseImage.Text = "Browse";
  198. this.c_BrowseImage.Click += new System.EventHandler(this.c_BrowseImage_Click);
  199. //
  200. // c_IgnoreDataErrors
  201. //
  202. this.c_IgnoreDataErrors.Location = new System.Drawing.Point(208, 48);
  203. this.c_IgnoreDataErrors.Name = "c_IgnoreDataErrors";
  204. this.c_IgnoreDataErrors.Size = new System.Drawing.Size(144, 16);
  205. this.c_IgnoreDataErrors.TabIndex = 6;
  206. this.c_IgnoreDataErrors.Text = "Ignore data read errors";
  207. //
  208. // c_IgnoreAudioErrors
  209. //
  210. this.c_IgnoreAudioErrors.Checked = true;
  211. this.c_IgnoreAudioErrors.CheckState = System.Windows.Forms.CheckState.Checked;
  212. this.c_IgnoreAudioErrors.Location = new System.Drawing.Point(208, 72);
  213. this.c_IgnoreAudioErrors.Name = "c_IgnoreAudioErrors";
  214. this.c_IgnoreAudioErrors.Size = new System.Drawing.Size(144, 16);
  215. this.c_IgnoreAudioErrors.TabIndex = 7;
  216. this.c_IgnoreAudioErrors.Text = "Ignore audio read errors";
  217. //
  218. // c_ReadISRC
  219. //
  220. this.c_ReadISRC.Location = new System.Drawing.Point(208, 96);
  221. this.c_ReadISRC.Name = "c_ReadISRC";
  222. this.c_ReadISRC.Size = new System.Drawing.Size(192, 16);
  223. this.c_ReadISRC.TabIndex = 8;
  224. this.c_ReadISRC.Text = "Read ISRC and media catalog #";
  225. //
  226. // c_RAWReadMode
  227. //
  228. this.c_RAWReadMode.Location = new System.Drawing.Point(208, 120);
  229. this.c_RAWReadMode.Name = "c_RAWReadMode";
  230. this.c_RAWReadMode.Size = new System.Drawing.Size(144, 16);
  231. this.c_RAWReadMode.TabIndex = 9;
  232. this.c_RAWReadMode.Text = "RAW read mode";
  233. //
  234. // c_ReadSpeed
  235. //
  236. this.c_ReadSpeed.Location = new System.Drawing.Point(408, 96);
  237. this.c_ReadSpeed.Name = "c_ReadSpeed";
  238. this.c_ReadSpeed.TabIndex = 17;
  239. this.c_ReadSpeed.Text = "Read speed";
  240. this.c_ReadSpeed.Click += new System.EventHandler(this.c_ReadSpeed_Click);
  241. //
  242. // c_WriteSpeed
  243. //
  244. this.c_WriteSpeed.Location = new System.Drawing.Point(408, 128);
  245. this.c_WriteSpeed.Name = "c_WriteSpeed";
  246. this.c_WriteSpeed.TabIndex = 18;
  247. this.c_WriteSpeed.Text = "Write speed";
  248. this.c_WriteSpeed.Click += new System.EventHandler(this.c_WriteSpeed_Click);
  249. //
  250. // c_BurnFlags
  251. //
  252. this.c_BurnFlags.Location = new System.Drawing.Point(408, 160);
  253. this.c_BurnFlags.Name = "c_BurnFlags";
  254. this.c_BurnFlags.TabIndex = 19;
  255. this.c_BurnFlags.Text = "Burn flags";
  256. this.c_BurnFlags.Click += new System.EventHandler(this.c_BurnFlags_Click);
  257. //
  258. // c_MediaType
  259. //
  260. this.c_MediaType.Location = new System.Drawing.Point(408, 192);
  261. this.c_MediaType.Name = "c_MediaType";
  262. this.c_MediaType.TabIndex = 20;
  263. this.c_MediaType.Text = "Media type";
  264. this.c_MediaType.Click += new System.EventHandler(this.c_MediaType_Click);
  265. //
  266. // label3
  267. //
  268. this.label3.Location = new System.Drawing.Point(8, 168);
  269. this.label3.Name = "label3";
  270. this.label3.Size = new System.Drawing.Size(100, 16);
  271. this.label3.TabIndex = 15;
  272. this.label3.Text = "Settings:";
  273. //
  274. // c_Settings
  275. //
  276. this.c_Settings.Location = new System.Drawing.Point(8, 184);
  277. this.c_Settings.Multiline = true;
  278. this.c_Settings.Name = "c_Settings";
  279. this.c_Settings.ReadOnly = true;
  280. this.c_Settings.ScrollBars = System.Windows.Forms.ScrollBars.Both;
  281. this.c_Settings.Size = new System.Drawing.Size(384, 112);
  282. this.c_Settings.TabIndex = 16;
  283. this.c_Settings.Text = "";
  284. //
  285. // label4
  286. //
  287. this.label4.Location = new System.Drawing.Point(8, 8);
  288. this.label4.Name = "label4";
  289. this.label4.Size = new System.Drawing.Size(136, 16);
  290. this.label4.TabIndex = 0;
  291. this.label4.Text = "Source drive:";
  292. //
  293. // c_SourceDrive
  294. //
  295. this.c_SourceDrive.Location = new System.Drawing.Point(8, 24);
  296. this.c_SourceDrive.Name = "c_SourceDrive";
  297. this.c_SourceDrive.ReadOnly = true;
  298. this.c_SourceDrive.Size = new System.Drawing.Size(184, 20);
  299. this.c_SourceDrive.TabIndex = 1;
  300. this.c_SourceDrive.Text = "";
  301. //
  302. // c_NumberOfRetries
  303. //
  304. this.c_NumberOfRetries.Location = new System.Drawing.Point(208, 24);
  305. this.c_NumberOfRetries.Name = "c_NumberOfRetries";
  306. this.c_NumberOfRetries.Size = new System.Drawing.Size(48, 20);
  307. this.c_NumberOfRetries.TabIndex = 3;
  308. this.c_NumberOfRetries.Text = "1";
  309. this.c_NumberOfRetries.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
  310. //
  311. // label5
  312. //
  313. this.label5.Location = new System.Drawing.Point(208, 8);
  314. this.label5.Name = "label5";
  315. this.label5.Size = new System.Drawing.Size(64, 16);
  316. this.label5.TabIndex = 2;
  317. this.label5.Text = "# of retries:";
  318. //
  319. // BurnDiscCopyForm
  320. //
  321. this.AcceptButton = this.c_Copy;
  322. this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  323. this.CancelButton = this.c_Cancel;
  324. this.ClientSize = new System.Drawing.Size(490, 304);
  325. this.Controls.Add(this.c_SourceDrive);
  326. this.Controls.Add(this.label3);
  327. this.Controls.Add(this.c_IgnoreDataErrors);
  328. this.Controls.Add(this.c_BrowseImage);
  329. this.Controls.Add(this.c_ImageFilepath);
  330. this.Controls.Add(this.label2);
  331. this.Controls.Add(this.c_OnTheFly);
  332. this.Controls.Add(this.c_Recorders);
  333. this.Controls.Add(this.label1);
  334. this.Controls.Add(this.c_Copy);
  335. this.Controls.Add(this.c_Cancel);
  336. this.Controls.Add(this.c_DeleteImage);
  337. this.Controls.Add(this.c_IgnoreAudioErrors);
  338. this.Controls.Add(this.c_ReadISRC);
  339. this.Controls.Add(this.c_RAWReadMode);
  340. this.Controls.Add(this.c_ReadSpeed);
  341. this.Controls.Add(this.c_WriteSpeed);
  342. this.Controls.Add(this.c_BurnFlags);
  343. this.Controls.Add(this.c_MediaType);
  344. this.Controls.Add(this.c_Settings);
  345. this.Controls.Add(this.label4);
  346. this.Controls.Add(this.c_NumberOfRetries);
  347. this.Controls.Add(this.label5);
  348. this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
  349. this.MaximizeBox = false;
  350. this.MinimizeBox = false;
  351. this.Name = "BurnDiscCopyForm";
  352. this.ShowInTaskbar = false;
  353. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
  354. this.Text = "BurnDiscCopy";
  355. this.ResumeLayout(false);
  356. }
  357. #endregion
  358. protected override void OnLoad(EventArgs e)
  359. {
  360. base.OnLoad (e);
  361. c_SourceDrive.Text = m_sourceDrive.DeviceName;
  362. // Get the available drives.
  363. //
  364. m_recorders = m_nero.GetDrives(NERO_MEDIA_TYPE.NERO_MEDIA_CD | NERO_MEDIA_TYPE.NERO_MEDIA_DVD_ANY);
  365. // Loop through all drives looking for devices that can write
  366. // and which are allowed to write to.
  367. //
  368. int iIndex = 0;
  369. foreach (NeroDrive drive in m_recorders)
  370. {
  371. if (0 != (drive.Capabilities & NERO_CAPABILITIES.NERO_CAP_ALLOWED) &&
  372. drive.DevType == NERO_SCSI_DEVTYPE.NERO_SCSI_DEVTYPE_WORM)
  373. {
  374. c_Recorders.Items.Add (new CBItem (drive));
  375. // If there is no prior selection, let the currently
  376. // iterated drive be the current combobox selection
  377. // if it is not the same drive as the source drive.
  378. //
  379. if (c_Recorders.SelectedIndex == -1)
  380. {
  381. if (drive.HostAdapterNo != m_sourceDrive.HostAdapterNo &&
  382. drive.DeviceID != m_sourceDrive.DeviceID)
  383. {
  384. c_Recorders.SelectedIndex = iIndex;
  385. }
  386. }
  387. iIndex ++;
  388. }
  389. }
  390. // If nothing was selected until now, try selecting whatever
  391. // is the first option.
  392. //
  393. if (c_Recorders.SelectedIndex == -1)
  394. {
  395. c_Recorders.SelectedIndex = 0;
  396. }
  397. // Update some GUI elements.
  398. //
  399. Update_OnTheFly ();
  400. UpdateSettings ();
  401. }
  402. // This is a helper function to get the currently selected
  403. // NeroDrive or null for none.
  404. //
  405. private NeroDrive GetCurrentlySelectedDrive ()
  406. {
  407. return c_Recorders.SelectedIndex != -1? ((CBItem) c_Recorders.SelectedItem).m_drive : null;
  408. }
  409. // Update image filepath selection according to the state
  410. // of the "on the fly" checkbox. If on the fly, no image
  411. // is either required or accepted. Otherwise, one must be
  412. // supplied.
  413. //
  414. private void Update_OnTheFly ()
  415. {
  416. bool bEnabled = !c_OnTheFly.Checked;
  417. c_DeleteImage.Enabled = bEnabled;
  418. c_ImageFilepath.Enabled = bEnabled;
  419. c_BrowseImage.Enabled = bEnabled;
  420. }
  421. // This function updates the textbox showing the current state
  422. // of various settings.
  423. //
  424. private void UpdateSettings ()
  425. {
  426. string str;
  427. str = "Burn flags: " + m_frmChooseBurnFlags.ToString () + "\r\n\r\n";
  428. str += "Media type: " + m_frmChooseMedia.ToString () + "\r\n\r\n";
  429. str += "Write speed: " + m_frmChooseWriteSpeed.ToString () + "\r\n\r\n";
  430. str += "Read speed: " + m_frmChooseReadSpeed.ToString ();
  431. c_Settings.Text = str;
  432. }
  433. private void c_OnTheFly_CheckedChanged(object sender, System.EventArgs e)
  434. {
  435. Update_OnTheFly ();
  436. }
  437. private void c_BurnFlags_Click(object sender, System.EventArgs e)
  438. {
  439. if (DialogResult.OK == m_frmChooseBurnFlags.ShowDialog ())
  440. {
  441. UpdateSettings ();
  442. }
  443. }
  444. private void c_MediaType_Click(object sender, System.EventArgs e)
  445. {
  446. if (DialogResult.OK == m_frmChooseMedia.ShowDialog ())
  447. {
  448. UpdateSettings ();
  449. }
  450. }
  451. private void c_BrowseImage_Click(object sender, System.EventArgs e)
  452. {
  453. SaveFileDialog dlg = new SaveFileDialog ();
  454. dlg.DefaultExt = ".nrg";
  455. dlg.Filter = "NRG files (*.nrg)|*.nrg|All files (*.*)|*.*";
  456. if (DialogResult.OK == dlg.ShowDialog (this))
  457. {
  458. c_ImageFilepath.Text = dlg.FileName;
  459. }
  460. }
  461. private void c_WriteSpeed_Click(object sender, System.EventArgs e)
  462. {
  463. if (DialogResult.OK == m_frmChooseWriteSpeed.ShowDialog (this))
  464. {
  465. UpdateSettings ();
  466. }
  467. }
  468. private void c_Recorders_SelectedIndexChanged(object sender, System.EventArgs e)
  469. {
  470. NeroDrive currDrive = GetCurrentlySelectedDrive ();
  471. // When the currently selected recorder is changed, we must
  472. // set the new drive to the choose speed form.
  473. //
  474. m_frmChooseWriteSpeed.m_drive = currDrive;
  475. UpdateSettings ();
  476. if (currDrive != null &&
  477. currDrive.HostAdapterNo == m_sourceDrive.HostAdapterNo &&
  478. currDrive.DeviceID == m_sourceDrive.DeviceID)
  479. {
  480. // We cannot allow on the fly copy when the source and destination
  481. // drives are the same.
  482. //
  483. c_OnTheFly.Checked = false;
  484. }
  485. }
  486. private void c_ReadSpeed_Click(object sender, System.EventArgs e)
  487. {
  488. if (DialogResult.OK == m_frmChooseReadSpeed.ShowDialog (this))
  489. {
  490. UpdateSettings ();
  491. }
  492. }
  493. private void c_Copy_Click(object sender, System.EventArgs e)
  494. {
  495. NeroDrive destDrive = GetCurrentlySelectedDrive ();
  496. if (destDrive != null)
  497. {
  498. BurnProgressForm frm = new BurnProgressForm (destDrive, m_nero);
  499. frm.BurnDiscCopy (m_sourceDrive,
  500. c_OnTheFly.Checked,
  501. c_ImageFilepath.Text,
  502. c_DeleteImage.Checked,
  503. m_frmChooseReadSpeed.GetSpeed (),
  504. Convert.ToInt32 (c_NumberOfRetries.Text),
  505. c_IgnoreDataErrors.Checked,
  506. c_IgnoreAudioErrors.Checked,
  507. c_ReadISRC.Checked,
  508. c_RAWReadMode.Checked,
  509. m_frmChooseBurnFlags.GetBurnFlags (),
  510. m_frmChooseWriteSpeed.GetSpeed (),
  511. m_frmChooseMedia.GetMediaType (),
  512. this);
  513. }
  514. }
  515. }
  516. }