using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using NEROLib;
namespace NeroFiddlesCOM.NET
{
///
/// Summary description for ChooseBurnFlagsForm.
///
public class ChooseBurnFlagsForm : System.Windows.Forms.Form
{
private System.Windows.Forms.Button c_OK;
private System.Windows.Forms.Button c_Cancel;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.ListView c_BurnFlags;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public ChooseBurnFlagsForm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("Speed Test");
System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("Simulate");
System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem("Write");
System.Windows.Forms.ListViewItem listViewItem4 = new System.Windows.Forms.ListViewItem("DAO");
System.Windows.Forms.ListViewItem listViewItem5 = new System.Windows.Forms.ListViewItem("Close Session");
System.Windows.Forms.ListViewItem listViewItem6 = new System.Windows.Forms.ListViewItem("CD Text");
System.Windows.Forms.ListViewItem listViewItem7 = new System.Windows.Forms.ListViewItem("Buffer Underrun Protection");
System.Windows.Forms.ListViewItem listViewItem8 = new System.Windows.Forms.ListViewItem("Disable Abort");
System.Windows.Forms.ListViewItem listViewItem9 = new System.Windows.Forms.ListViewItem("Detect Non-Empty Rewritable");
System.Windows.Forms.ListViewItem listViewItem10 = new System.Windows.Forms.ListViewItem("Disable Eject");
System.Windows.Forms.ListViewItem listViewItem11 = new System.Windows.Forms.ListViewItem("Verify");
System.Windows.Forms.ListViewItem listViewItem12 = new System.Windows.Forms.ListViewItem("DVD+ Burn 30mm At Least");
System.Windows.Forms.ListViewItem listViewItem13 = new System.Windows.Forms.ListViewItem("CD Text is Japanese");
System.Windows.Forms.ListViewItem listViewItem14 = new System.Windows.Forms.ListViewItem("Booktype DVDROM");
System.Windows.Forms.ListViewItem listViewItem15 = new System.Windows.Forms.ListViewItem("No Booktype Change");
this.c_OK = new System.Windows.Forms.Button();
this.c_Cancel = new System.Windows.Forms.Button();
this.label9 = new System.Windows.Forms.Label();
this.c_BurnFlags = new System.Windows.Forms.ListView();
this.SuspendLayout();
//
// c_OK
//
this.c_OK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.c_OK.Location = new System.Drawing.Point(208, 8);
this.c_OK.Name = "c_OK";
this.c_OK.TabIndex = 2;
this.c_OK.Text = "OK";
//
// c_Cancel
//
this.c_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.c_Cancel.Location = new System.Drawing.Point(208, 40);
this.c_Cancel.Name = "c_Cancel";
this.c_Cancel.TabIndex = 3;
this.c_Cancel.Text = "Cancel";
//
// label9
//
this.label9.Location = new System.Drawing.Point(8, 8);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(100, 16);
this.label9.TabIndex = 0;
this.label9.Text = "Burn flags:";
//
// c_BurnFlags
//
this.c_BurnFlags.CheckBoxes = true;
this.c_BurnFlags.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.c_BurnFlags.HideSelection = false;
listViewItem1.StateImageIndex = 0;
listViewItem1.Tag = NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_SPEED_TEST;
listViewItem2.StateImageIndex = 0;
listViewItem2.Tag = NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_SIMULATE;
listViewItem3.Checked = true;
listViewItem3.StateImageIndex = 1;
listViewItem3.Tag = NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_WRITE;
listViewItem4.Checked = true;
listViewItem4.StateImageIndex = 1;
listViewItem4.Tag = NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_DAO;
listViewItem5.Checked = true;
listViewItem5.StateImageIndex = 1;
listViewItem5.Tag = NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_CLOSE_SESSION;
listViewItem6.Checked = true;
listViewItem6.StateImageIndex = 1;
listViewItem6.Tag = NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_CD_TEXT;
listViewItem7.Checked = true;
listViewItem7.StateImageIndex = 1;
listViewItem7.Tag = NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_BUF_UNDERRUN_PROT;
listViewItem8.Checked = true;
listViewItem8.StateImageIndex = 1;
listViewItem8.Tag = NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_DISABLE_ABORT;
listViewItem9.Checked = true;
listViewItem9.StateImageIndex = 1;
listViewItem9.Tag = NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_DETECT_NON_EMPTY_CDRW;
listViewItem10.StateImageIndex = 0;
listViewItem10.Tag = NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_DISABLE_EJECT;
listViewItem11.StateImageIndex = 0;
listViewItem11.Tag = NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_VERIFY;
listViewItem12.StateImageIndex = 0;
listViewItem12.Tag = NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_DVDP_BURN_30MM_AT_LEAST;
listViewItem13.StateImageIndex = 0;
listViewItem13.Tag = NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_CD_TEXT_IS_JAPANESE;
listViewItem14.StateImageIndex = 0;
listViewItem14.Tag = NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_BOOKTYPE_DVDROM;
listViewItem15.StateImageIndex = 0;
listViewItem15.Tag = NEROLib.NERO_BURN_FLAGS.NERO_BURN_FLAG_NO_BOOKTYPE_CHANGE;
this.c_BurnFlags.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
listViewItem1,
listViewItem2,
listViewItem3,
listViewItem4,
listViewItem5,
listViewItem6,
listViewItem7,
listViewItem8,
listViewItem9,
listViewItem10,
listViewItem11,
listViewItem12,
listViewItem13,
listViewItem14,
listViewItem15});
this.c_BurnFlags.Location = new System.Drawing.Point(8, 24);
this.c_BurnFlags.Name = "c_BurnFlags";
this.c_BurnFlags.Size = new System.Drawing.Size(192, 160);
this.c_BurnFlags.TabIndex = 1;
this.c_BurnFlags.View = System.Windows.Forms.View.SmallIcon;
//
// ChooseBurnFlagsForm
//
this.AcceptButton = this.c_OK;
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.CancelButton = this.c_Cancel;
this.ClientSize = new System.Drawing.Size(288, 190);
this.Controls.Add(this.label9);
this.Controls.Add(this.c_BurnFlags);
this.Controls.Add(this.c_OK);
this.Controls.Add(this.c_Cancel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ChooseBurnFlagsForm";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Choose Burn Flags";
this.ResumeLayout(false);
}
#endregion
// This is a public function that tells the caller
// state of the selected burn flags at any time.
//
public NERO_BURN_FLAGS GetBurnFlags ()
{
// Burn flags are just flags so use uint until
// we collect all flags. Then cast it back to
// NERO_BURN_FLAGS.
//
uint bf = 0;
foreach (ListViewItem lvi in c_BurnFlags.Items)
{
if (lvi.Checked)
{
bf |= (uint) (NERO_BURN_FLAGS) lvi.Tag;
}
}
return (NERO_BURN_FLAGS) bf;
}
// Return a textual representation of the set of
// burn flags.
//
public new string ToString ()
{
string s = "";
foreach (ListViewItem lvi in c_BurnFlags.Items)
{
if (lvi.Checked)
{
if (s != "")
{
s += " + ";
}
s += lvi.Text;
}
}
return s;
}
}
}