123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231 |
- using System;
- using System.Drawing;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- using NEROLib;
- namespace LYFZ.NeroDiscBurn.NET
- {
- /// <summary>
- /// Summary description for ChooseBurnFlagsForm.
- /// </summary>
- 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;
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.Container components = null;
- public ChooseBurnFlagsForm()
- {
- //
- // Required for Windows Form Designer support
- //
- InitializeComponent();
- }
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
- #region Windows Form Designer generated code
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("速度测试");
- System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("模拟");
- System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem("写");
- System.Windows.Forms.ListViewItem listViewItem4 = new System.Windows.Forms.ListViewItem("DAO");
- System.Windows.Forms.ListViewItem listViewItem5 = new System.Windows.Forms.ListViewItem("关闭会话");
- System.Windows.Forms.ListViewItem listViewItem6 = new System.Windows.Forms.ListViewItem("CD Text");
- System.Windows.Forms.ListViewItem listViewItem7 = new System.Windows.Forms.ListViewItem("缓冲区数据不足保护");
- System.Windows.Forms.ListViewItem listViewItem8 = new System.Windows.Forms.ListViewItem("禁用中止");
- System.Windows.Forms.ListViewItem listViewItem9 = new System.Windows.Forms.ListViewItem("检测非空的可擦写");
- System.Windows.Forms.ListViewItem listViewItem10 = new System.Windows.Forms.ListViewItem("禁止弹出");
- System.Windows.Forms.ListViewItem listViewItem11 = new System.Windows.Forms.ListViewItem("校验");
- System.Windows.Forms.ListViewItem listViewItem12 = new System.Windows.Forms.ListViewItem("DVD+刻录30毫米至少");
- System.Windows.Forms.ListViewItem listViewItem13 = new System.Windows.Forms.ListViewItem("CD 日文");
- 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(268, 139);
- this.c_OK.Name = "c_OK";
- this.c_OK.Size = new System.Drawing.Size(90, 24);
- this.c_OK.TabIndex = 2;
- this.c_OK.Text = "确定";
- //
- // c_Cancel
- //
- this.c_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.c_Cancel.Location = new System.Drawing.Point(387, 139);
- this.c_Cancel.Name = "c_Cancel";
- this.c_Cancel.Size = new System.Drawing.Size(90, 25);
- this.c_Cancel.TabIndex = 3;
- this.c_Cancel.Text = "取消";
- //
- // label9
- //
- this.label9.Location = new System.Drawing.Point(10, 9);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(120, 17);
- this.label9.TabIndex = 0;
- this.label9.Text = "刻录标志:";
- //
- // 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(10, 26);
- this.c_BurnFlags.Name = "c_BurnFlags";
- this.c_BurnFlags.Size = new System.Drawing.Size(475, 99);
- this.c_BurnFlags.TabIndex = 1;
- this.c_BurnFlags.UseCompatibleStateImageBehavior = false;
- this.c_BurnFlags.View = System.Windows.Forms.View.List;
- //
- // ChooseBurnFlagsForm
- //
- this.AcceptButton = this.c_OK;
- this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
- this.CancelButton = this.c_Cancel;
- this.ClientSize = new System.Drawing.Size(497, 179);
- 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 = "选择刻录标志";
- 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;
- }
- }
- }
|