using System;
using System.ComponentModel;
using System.Drawing;
using System.Globalization;
using System.Windows.Forms;

namespace QCRPG.TSL.BT;

public class ChooseUserDataOption : Form
{
	private int l2CAPMaxLength = 65535;

	private int channelID = 64;

	private int maxACLLength = 1028;

	private bool cycleL2CAPSizeEnable;

	private bool l2CAPSequenceNumberingEnable = true;

	private int dataPattern = 85;

	private bool sequentialDataPatternEnable = true;

	private bool checkReceiveDataIntegrityEnable = true;

	private bool continuousDataEnable = true;

	private int numberofL2CAPPackets;

	private int packetDelay;

	private int startDelay;

	private int transmitDelay = 30;

	private int receiveDelay = 15;

	private bool debugWriteEnable;

	private uint address = 2952789772u;

	private uint data = 3735935706u;

	private bool debugToggleEnable;

	private bool highEnable = true;

	private bool lowEnable;

	private bool flushEnable = true;

	private bool nonFlushEnable;

	private bool bothEnable;

	private IContainer components;

	private GroupBox groupBox1;

	private TextBox maxACLLengthTextBox;

	private TextBox channelIDTextBox;

	private TextBox l2CAPMaxLengthTextBox;

	private CheckBox l2CAPSequenceNumberingCheckBox;

	private Label label3;

	private CheckBox cycleL2CAPSizeCheckBox;

	private Label label2;

	private Label label1;

	private GroupBox groupBox2;

	private CheckBox checkReceiveDataIntegrityCheckBox;

	private CheckBox sequentialDataPatternCheckBox;

	private TextBox dataPatternTextBox;

	private Label label4;

	private GroupBox groupBox3;

	private TextBox startDelayTextBox;

	private Label label7;

	private TextBox packetDelayTextBox;

	private Label label6;

	private TextBox numberofL2CAPPacketsTextBox;

	private Label label5;

	private CheckBox continuousDataCheckBox;

	private GroupBox groupBox4;

	private TextBox receiveDelayTextBox;

	private Label label9;

	private TextBox transmitDelayTextBox;

	private Label label8;

	private GroupBox groupBox5;

	private TextBox dataTextBox;

	private Label label11;

	private TextBox addressTextBox;

	private Label label10;

	private CheckBox debugWriteCheckBox;

	private GroupBox groupBox6;

	private GroupBox groupBox7;

	private RadioButton lowRadioButton;

	private RadioButton highRadioButton;

	private CheckBox debugToggleCheckBox;

	private GroupBox groupBox8;

	private RadioButton bothRadioButton;

	private RadioButton nonFlushRadioButton;

	private RadioButton flushRadioButton;

	private Button okButton;

	private Button cancelButton;

	public int L2CAPMaxLength
	{
		get
		{
			return l2CAPMaxLength;
		}
		set
		{
			l2CAPMaxLength = value;
		}
	}

	public int ChannelID
	{
		get
		{
			return channelID;
		}
		set
		{
			channelID = value;
		}
	}

	public int MaxACLLength
	{
		get
		{
			return maxACLLength;
		}
		set
		{
			maxACLLength = value;
		}
	}

	public bool CycleL2CAPSizeEnable
	{
		get
		{
			return cycleL2CAPSizeEnable;
		}
		set
		{
			cycleL2CAPSizeEnable = value;
		}
	}

	public bool L2CAPSequenceNumberingEnable
	{
		get
		{
			return l2CAPSequenceNumberingEnable;
		}
		set
		{
			l2CAPSequenceNumberingEnable = value;
		}
	}

	public int DataPattern
	{
		get
		{
			return dataPattern;
		}
		set
		{
			dataPattern = value;
		}
	}

	public bool SequentialDataPatternEnable
	{
		get
		{
			return sequentialDataPatternEnable;
		}
		set
		{
			sequentialDataPatternEnable = value;
		}
	}

	public bool CheckReceiveDataIntegrityEnable
	{
		get
		{
			return checkReceiveDataIntegrityEnable;
		}
		set
		{
			checkReceiveDataIntegrityEnable = value;
		}
	}

	public bool ContinuousDataEnable
	{
		get
		{
			return continuousDataEnable;
		}
		set
		{
			continuousDataEnable = value;
		}
	}

	public int NumberofL2CAPPackets
	{
		get
		{
			return numberofL2CAPPackets;
		}
		set
		{
			numberofL2CAPPackets = value;
		}
	}

	public int PacketDelay
	{
		get
		{
			return packetDelay;
		}
		set
		{
			packetDelay = value;
		}
	}

	public int StartDelay
	{
		get
		{
			return startDelay;
		}
		set
		{
			startDelay = value;
		}
	}

	public int TransmitDelay
	{
		get
		{
			return transmitDelay;
		}
		set
		{
			transmitDelay = value;
		}
	}

	public int ReceiveDelay
	{
		get
		{
			return receiveDelay;
		}
		set
		{
			receiveDelay = value;
		}
	}

	public bool DebugWriteEnable
	{
		get
		{
			return debugWriteEnable;
		}
		set
		{
			debugWriteEnable = value;
		}
	}

	public uint Address
	{
		get
		{
			return address;
		}
		set
		{
			address = value;
		}
	}

	public uint Data
	{
		get
		{
			return data;
		}
		set
		{
			data = value;
		}
	}

	public bool DebugToggleEnable
	{
		get
		{
			return debugToggleEnable;
		}
		set
		{
			debugToggleEnable = value;
		}
	}

	public bool HighEnable
	{
		get
		{
			return highEnable;
		}
		set
		{
			highEnable = value;
		}
	}

	public bool LowEnable
	{
		get
		{
			return lowEnable;
		}
		set
		{
			lowEnable = value;
		}
	}

	public bool FlushEnable
	{
		get
		{
			return flushEnable;
		}
		set
		{
			flushEnable = value;
		}
	}

	public bool NonFlushEnable
	{
		get
		{
			return nonFlushEnable;
		}
		set
		{
			nonFlushEnable = value;
		}
	}

	public bool BothEnable
	{
		get
		{
			return bothEnable;
		}
		set
		{
			bothEnable = value;
		}
	}

	public ChooseUserDataOption()
	{
		InitializeComponent();
	}

	private void sequentialDataPatternCheckBox_CheckedChanged(object sender, EventArgs e)
	{
		if (sequentialDataPatternCheckBox.Checked)
		{
			dataPatternTextBox.ReadOnly = true;
		}
		else
		{
			dataPatternTextBox.ReadOnly = false;
		}
	}

	private void continuousDataCheckBox_CheckedChanged(object sender, EventArgs e)
	{
		if (continuousDataCheckBox.Checked)
		{
			numberofL2CAPPacketsTextBox.Enabled = false;
			return;
		}
		numberofL2CAPPacketsTextBox.Enabled = true;
		int result = -1;
		int.TryParse(numberofL2CAPPacketsTextBox.Text, NumberStyles.HexNumber, null, out result);
		if (result == 0)
		{
			numberofL2CAPPacketsTextBox.Text = "1";
		}
	}

	private void okButton_Click(object sender, EventArgs e)
	{
		int.TryParse(l2CAPMaxLengthTextBox.Text, NumberStyles.HexNumber, null, out l2CAPMaxLength);
		int.TryParse(channelIDTextBox.Text, NumberStyles.HexNumber, null, out channelID);
		int.TryParse(maxACLLengthTextBox.Text, NumberStyles.HexNumber, null, out maxACLLength);
		cycleL2CAPSizeEnable = cycleL2CAPSizeCheckBox.Checked;
		l2CAPSequenceNumberingEnable = l2CAPSequenceNumberingCheckBox.Checked;
		int.TryParse(dataPatternTextBox.Text, NumberStyles.HexNumber, null, out dataPattern);
		sequentialDataPatternEnable = sequentialDataPatternCheckBox.Checked;
		checkReceiveDataIntegrityEnable = checkReceiveDataIntegrityCheckBox.Checked;
		continuousDataEnable = continuousDataCheckBox.Checked;
		int.TryParse(numberofL2CAPPacketsTextBox.Text, NumberStyles.HexNumber, null, out numberofL2CAPPackets);
		int.TryParse(packetDelayTextBox.Text, out packetDelay);
		int.TryParse(startDelayTextBox.Text, out startDelay);
		int.TryParse(transmitDelayTextBox.Text, out transmitDelay);
		int.TryParse(receiveDelayTextBox.Text, out receiveDelay);
		debugWriteEnable = debugWriteCheckBox.Checked;
		uint.TryParse(addressTextBox.Text, NumberStyles.HexNumber, null, out address);
		uint.TryParse(dataTextBox.Text, NumberStyles.HexNumber, null, out data);
		debugToggleEnable = debugToggleCheckBox.Checked;
		highEnable = highRadioButton.Checked;
		lowEnable = lowRadioButton.Checked;
		flushEnable = flushRadioButton.Checked;
		nonFlushEnable = nonFlushRadioButton.Checked;
		bothEnable = bothRadioButton.Checked;
	}

	private void ChooseUserDataOption_Load(object sender, EventArgs e)
	{
		l2CAPMaxLengthTextBox.Text = l2CAPMaxLength.ToString("X4");
		channelIDTextBox.Text = channelID.ToString("X2");
		maxACLLengthTextBox.Text = maxACLLength.ToString("X4");
		cycleL2CAPSizeCheckBox.Checked = cycleL2CAPSizeEnable;
		l2CAPSequenceNumberingCheckBox.Checked = l2CAPSequenceNumberingEnable;
		dataPatternTextBox.Text = dataPattern.ToString("X2");
		sequentialDataPatternCheckBox.Checked = sequentialDataPatternEnable;
		checkReceiveDataIntegrityCheckBox.Checked = checkReceiveDataIntegrityEnable;
		continuousDataCheckBox.Checked = continuousDataEnable;
		numberofL2CAPPacketsTextBox.Text = numberofL2CAPPackets.ToString("X");
		packetDelayTextBox.Text = packetDelay.ToString();
		startDelayTextBox.Text = startDelay.ToString();
		transmitDelayTextBox.Text = transmitDelay.ToString();
		receiveDelayTextBox.Text = receiveDelay.ToString();
		debugWriteCheckBox.Checked = debugWriteEnable;
		addressTextBox.Text = address.ToString("X");
		dataTextBox.Text = data.ToString("X");
		debugToggleCheckBox.Checked = debugToggleEnable;
		highRadioButton.Checked = highEnable;
		lowRadioButton.Checked = lowEnable;
		flushRadioButton.Checked = flushEnable;
		nonFlushRadioButton.Checked = nonFlushEnable;
		bothRadioButton.Checked = bothEnable;
	}

	private void ChooseUserDataOption_FormClosing(object sender, FormClosingEventArgs e)
	{
		if (dataPattern == 204 || dataPattern == 218)
		{
			MessageBox.Show("Cannot use 0xCC or 0xDA as a data pattern. Please pick a different byte as data pattern.");
			e.Cancel = true;
		}
		if (channelID == 52428 || channelID == 56026)
		{
			MessageBox.Show("Cannot use 0xCCCC or 0xDADA as channelID. Please pick a different channelID.");
			e.Cancel = true;
		}
	}

	protected override void Dispose(bool disposing)
	{
		if (disposing && components != null)
		{
			components.Dispose();
		}
		base.Dispose(disposing);
	}

	private void InitializeComponent()
	{
		this.groupBox1 = new System.Windows.Forms.GroupBox();
		this.maxACLLengthTextBox = new System.Windows.Forms.TextBox();
		this.channelIDTextBox = new System.Windows.Forms.TextBox();
		this.l2CAPMaxLengthTextBox = new System.Windows.Forms.TextBox();
		this.l2CAPSequenceNumberingCheckBox = new System.Windows.Forms.CheckBox();
		this.label3 = new System.Windows.Forms.Label();
		this.cycleL2CAPSizeCheckBox = new System.Windows.Forms.CheckBox();
		this.label2 = new System.Windows.Forms.Label();
		this.label1 = new System.Windows.Forms.Label();
		this.groupBox2 = new System.Windows.Forms.GroupBox();
		this.checkReceiveDataIntegrityCheckBox = new System.Windows.Forms.CheckBox();
		this.sequentialDataPatternCheckBox = new System.Windows.Forms.CheckBox();
		this.dataPatternTextBox = new System.Windows.Forms.TextBox();
		this.label4 = new System.Windows.Forms.Label();
		this.groupBox3 = new System.Windows.Forms.GroupBox();
		this.startDelayTextBox = new System.Windows.Forms.TextBox();
		this.label7 = new System.Windows.Forms.Label();
		this.packetDelayTextBox = new System.Windows.Forms.TextBox();
		this.label6 = new System.Windows.Forms.Label();
		this.numberofL2CAPPacketsTextBox = new System.Windows.Forms.TextBox();
		this.label5 = new System.Windows.Forms.Label();
		this.continuousDataCheckBox = new System.Windows.Forms.CheckBox();
		this.groupBox4 = new System.Windows.Forms.GroupBox();
		this.receiveDelayTextBox = new System.Windows.Forms.TextBox();
		this.label9 = new System.Windows.Forms.Label();
		this.transmitDelayTextBox = new System.Windows.Forms.TextBox();
		this.label8 = new System.Windows.Forms.Label();
		this.groupBox5 = new System.Windows.Forms.GroupBox();
		this.dataTextBox = new System.Windows.Forms.TextBox();
		this.label11 = new System.Windows.Forms.Label();
		this.addressTextBox = new System.Windows.Forms.TextBox();
		this.label10 = new System.Windows.Forms.Label();
		this.debugWriteCheckBox = new System.Windows.Forms.CheckBox();
		this.groupBox6 = new System.Windows.Forms.GroupBox();
		this.groupBox7 = new System.Windows.Forms.GroupBox();
		this.lowRadioButton = new System.Windows.Forms.RadioButton();
		this.highRadioButton = new System.Windows.Forms.RadioButton();
		this.debugToggleCheckBox = new System.Windows.Forms.CheckBox();
		this.groupBox8 = new System.Windows.Forms.GroupBox();
		this.bothRadioButton = new System.Windows.Forms.RadioButton();
		this.nonFlushRadioButton = new System.Windows.Forms.RadioButton();
		this.flushRadioButton = new System.Windows.Forms.RadioButton();
		this.okButton = new System.Windows.Forms.Button();
		this.cancelButton = new System.Windows.Forms.Button();
		this.groupBox1.SuspendLayout();
		this.groupBox2.SuspendLayout();
		this.groupBox3.SuspendLayout();
		this.groupBox4.SuspendLayout();
		this.groupBox5.SuspendLayout();
		this.groupBox6.SuspendLayout();
		this.groupBox7.SuspendLayout();
		this.groupBox8.SuspendLayout();
		base.SuspendLayout();
		this.groupBox1.Controls.Add(this.maxACLLengthTextBox);
		this.groupBox1.Controls.Add(this.channelIDTextBox);
		this.groupBox1.Controls.Add(this.l2CAPMaxLengthTextBox);
		this.groupBox1.Controls.Add(this.l2CAPSequenceNumberingCheckBox);
		this.groupBox1.Controls.Add(this.label3);
		this.groupBox1.Controls.Add(this.cycleL2CAPSizeCheckBox);
		this.groupBox1.Controls.Add(this.label2);
		this.groupBox1.Controls.Add(this.label1);
		this.groupBox1.Location = new System.Drawing.Point(13, 13);
		this.groupBox1.Name = "groupBox1";
		this.groupBox1.Size = new System.Drawing.Size(425, 88);
		this.groupBox1.TabIndex = 0;
		this.groupBox1.TabStop = false;
		this.groupBox1.Text = "Data Options";
		this.maxACLLengthTextBox.Location = new System.Drawing.Point(140, 46);
		this.maxACLLengthTextBox.MaxLength = 4;
		this.maxACLLengthTextBox.Name = "maxACLLengthTextBox";
		this.maxACLLengthTextBox.Size = new System.Drawing.Size(82, 20);
		this.maxACLLengthTextBox.TabIndex = 7;
		this.maxACLLengthTextBox.Text = "0404";
		this.channelIDTextBox.Location = new System.Drawing.Point(322, 17);
		this.channelIDTextBox.MaxLength = 4;
		this.channelIDTextBox.Name = "channelIDTextBox";
		this.channelIDTextBox.Size = new System.Drawing.Size(82, 20);
		this.channelIDTextBox.TabIndex = 6;
		this.channelIDTextBox.Text = "0040";
		this.l2CAPMaxLengthTextBox.Location = new System.Drawing.Point(140, 17);
		this.l2CAPMaxLengthTextBox.MaxLength = 4;
		this.l2CAPMaxLengthTextBox.Name = "l2CAPMaxLengthTextBox";
		this.l2CAPMaxLengthTextBox.Size = new System.Drawing.Size(82, 20);
		this.l2CAPMaxLengthTextBox.TabIndex = 5;
		this.l2CAPMaxLengthTextBox.Text = "FFFF";
		this.l2CAPSequenceNumberingCheckBox.AutoSize = true;
		this.l2CAPSequenceNumberingCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
		this.l2CAPSequenceNumberingCheckBox.Checked = true;
		this.l2CAPSequenceNumberingCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
		this.l2CAPSequenceNumberingCheckBox.Location = new System.Drawing.Point(239, 65);
		this.l2CAPSequenceNumberingCheckBox.Name = "l2CAPSequenceNumberingCheckBox";
		this.l2CAPSequenceNumberingCheckBox.Size = new System.Drawing.Size(165, 17);
		this.l2CAPSequenceNumberingCheckBox.TabIndex = 4;
		this.l2CAPSequenceNumberingCheckBox.Text = "L2CAP Sequence Numbering";
		this.l2CAPSequenceNumberingCheckBox.UseVisualStyleBackColor = true;
		this.label3.AutoSize = true;
		this.label3.Location = new System.Drawing.Point(7, 49);
		this.label3.Name = "label3";
		this.label3.Size = new System.Drawing.Size(114, 13);
		this.label3.TabIndex = 3;
		this.label3.Text = "Max ACL Length (Hex)";
		this.cycleL2CAPSizeCheckBox.AutoSize = true;
		this.cycleL2CAPSizeCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
		this.cycleL2CAPSizeCheckBox.Location = new System.Drawing.Point(293, 42);
		this.cycleL2CAPSizeCheckBox.Name = "cycleL2CAPSizeCheckBox";
		this.cycleL2CAPSizeCheckBox.Size = new System.Drawing.Size(111, 17);
		this.cycleL2CAPSizeCheckBox.TabIndex = 2;
		this.cycleL2CAPSizeCheckBox.Text = "Cycle L2CAP Size";
		this.cycleL2CAPSizeCheckBox.UseVisualStyleBackColor = true;
		this.label2.AutoSize = true;
		this.label2.Location = new System.Drawing.Point(228, 20);
		this.label2.Name = "label2";
		this.label2.Size = new System.Drawing.Size(88, 13);
		this.label2.TabIndex = 1;
		this.label2.Text = "Channel ID (Hex)";
		this.label1.AutoSize = true;
		this.label1.Location = new System.Drawing.Point(7, 20);
		this.label1.Name = "label1";
		this.label1.Size = new System.Drawing.Size(127, 13);
		this.label1.TabIndex = 0;
		this.label1.Text = "L2CAP Max Length (Hex)";
		this.groupBox2.Controls.Add(this.checkReceiveDataIntegrityCheckBox);
		this.groupBox2.Controls.Add(this.sequentialDataPatternCheckBox);
		this.groupBox2.Controls.Add(this.dataPatternTextBox);
		this.groupBox2.Controls.Add(this.label4);
		this.groupBox2.Location = new System.Drawing.Point(13, 107);
		this.groupBox2.Name = "groupBox2";
		this.groupBox2.Size = new System.Drawing.Size(425, 68);
		this.groupBox2.TabIndex = 1;
		this.groupBox2.TabStop = false;
		this.groupBox2.Text = "Data Pattern";
		this.checkReceiveDataIntegrityCheckBox.AutoSize = true;
		this.checkReceiveDataIntegrityCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
		this.checkReceiveDataIntegrityCheckBox.Checked = true;
		this.checkReceiveDataIntegrityCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
		this.checkReceiveDataIntegrityCheckBox.Location = new System.Drawing.Point(238, 42);
		this.checkReceiveDataIntegrityCheckBox.Name = "checkReceiveDataIntegrityCheckBox";
		this.checkReceiveDataIntegrityCheckBox.Size = new System.Drawing.Size(166, 17);
		this.checkReceiveDataIntegrityCheckBox.TabIndex = 9;
		this.checkReceiveDataIntegrityCheckBox.Text = "Check Receive Data Integrity";
		this.checkReceiveDataIntegrityCheckBox.UseVisualStyleBackColor = true;
		this.sequentialDataPatternCheckBox.AutoSize = true;
		this.sequentialDataPatternCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
		this.sequentialDataPatternCheckBox.Checked = true;
		this.sequentialDataPatternCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
		this.sequentialDataPatternCheckBox.Location = new System.Drawing.Point(265, 19);
		this.sequentialDataPatternCheckBox.Name = "sequentialDataPatternCheckBox";
		this.sequentialDataPatternCheckBox.Size = new System.Drawing.Size(139, 17);
		this.sequentialDataPatternCheckBox.TabIndex = 8;
		this.sequentialDataPatternCheckBox.Text = "Sequential Data Pattern";
		this.sequentialDataPatternCheckBox.UseVisualStyleBackColor = true;
		this.sequentialDataPatternCheckBox.CheckedChanged += new System.EventHandler(sequentialDataPatternCheckBox_CheckedChanged);
		this.dataPatternTextBox.Location = new System.Drawing.Point(107, 22);
		this.dataPatternTextBox.MaxLength = 2;
		this.dataPatternTextBox.Name = "dataPatternTextBox";
		this.dataPatternTextBox.ReadOnly = true;
		this.dataPatternTextBox.Size = new System.Drawing.Size(82, 20);
		this.dataPatternTextBox.TabIndex = 8;
		this.dataPatternTextBox.Text = "55";
		this.label4.AutoSize = true;
		this.label4.Location = new System.Drawing.Point(6, 25);
		this.label4.Name = "label4";
		this.label4.Size = new System.Drawing.Size(95, 13);
		this.label4.TabIndex = 8;
		this.label4.Text = "Data Pattern (Hex)";
		this.groupBox3.Controls.Add(this.startDelayTextBox);
		this.groupBox3.Controls.Add(this.label7);
		this.groupBox3.Controls.Add(this.packetDelayTextBox);
		this.groupBox3.Controls.Add(this.label6);
		this.groupBox3.Controls.Add(this.numberofL2CAPPacketsTextBox);
		this.groupBox3.Controls.Add(this.label5);
		this.groupBox3.Controls.Add(this.continuousDataCheckBox);
		this.groupBox3.Location = new System.Drawing.Point(13, 181);
		this.groupBox3.Name = "groupBox3";
		this.groupBox3.Size = new System.Drawing.Size(425, 83);
		this.groupBox3.TabIndex = 2;
		this.groupBox3.TabStop = false;
		this.groupBox3.Text = "Transmit (Delay values in decimal)";
		this.startDelayTextBox.Location = new System.Drawing.Point(329, 47);
		this.startDelayTextBox.MaxLength = 2;
		this.startDelayTextBox.Name = "startDelayTextBox";
		this.startDelayTextBox.Size = new System.Drawing.Size(82, 20);
		this.startDelayTextBox.TabIndex = 15;
		this.startDelayTextBox.Text = "00";
		this.label7.AutoSize = true;
		this.label7.Location = new System.Drawing.Point(218, 50);
		this.label7.Name = "label7";
		this.label7.Size = new System.Drawing.Size(85, 13);
		this.label7.TabIndex = 14;
		this.label7.Text = "Start Delay (sec)";
		this.packetDelayTextBox.Location = new System.Drawing.Point(329, 17);
		this.packetDelayTextBox.MaxLength = 4;
		this.packetDelayTextBox.Name = "packetDelayTextBox";
		this.packetDelayTextBox.Size = new System.Drawing.Size(82, 20);
		this.packetDelayTextBox.TabIndex = 13;
		this.packetDelayTextBox.Text = "0000";
		this.label6.AutoSize = true;
		this.label6.Location = new System.Drawing.Point(218, 20);
		this.label6.Name = "label6";
		this.label6.Size = new System.Drawing.Size(105, 13);
		this.label6.TabIndex = 12;
		this.label6.Text = "Packet Delay (msec)";
		this.numberofL2CAPPacketsTextBox.Enabled = false;
		this.numberofL2CAPPacketsTextBox.Location = new System.Drawing.Point(144, 47);
		this.numberofL2CAPPacketsTextBox.MaxLength = 32267;
		this.numberofL2CAPPacketsTextBox.Name = "numberofL2CAPPacketsTextBox";
		this.numberofL2CAPPacketsTextBox.Size = new System.Drawing.Size(68, 20);
		this.numberofL2CAPPacketsTextBox.TabIndex = 11;
		this.numberofL2CAPPacketsTextBox.Text = "0";
		this.label5.AutoSize = true;
		this.label5.Location = new System.Drawing.Point(6, 50);
		this.label5.Name = "label5";
		this.label5.Size = new System.Drawing.Size(132, 13);
		this.label5.TabIndex = 10;
		this.label5.Text = "# of L2CAP Packets (Hex)";
		this.continuousDataCheckBox.AutoSize = true;
		this.continuousDataCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
		this.continuousDataCheckBox.Checked = true;
		this.continuousDataCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
		this.continuousDataCheckBox.Location = new System.Drawing.Point(6, 19);
		this.continuousDataCheckBox.Name = "continuousDataCheckBox";
		this.continuousDataCheckBox.Size = new System.Drawing.Size(105, 17);
		this.continuousDataCheckBox.TabIndex = 9;
		this.continuousDataCheckBox.Text = "Continuous Data";
		this.continuousDataCheckBox.UseVisualStyleBackColor = true;
		this.continuousDataCheckBox.CheckedChanged += new System.EventHandler(continuousDataCheckBox_CheckedChanged);
		this.groupBox4.Controls.Add(this.receiveDelayTextBox);
		this.groupBox4.Controls.Add(this.label9);
		this.groupBox4.Controls.Add(this.transmitDelayTextBox);
		this.groupBox4.Controls.Add(this.label8);
		this.groupBox4.Location = new System.Drawing.Point(13, 270);
		this.groupBox4.Name = "groupBox4";
		this.groupBox4.Size = new System.Drawing.Size(425, 42);
		this.groupBox4.TabIndex = 3;
		this.groupBox4.TabStop = false;
		this.groupBox4.Text = "Stall Delays (Delay values in decimal)";
		this.receiveDelayTextBox.Location = new System.Drawing.Point(324, 13);
		this.receiveDelayTextBox.MaxLength = 2;
		this.receiveDelayTextBox.Name = "receiveDelayTextBox";
		this.receiveDelayTextBox.Size = new System.Drawing.Size(82, 20);
		this.receiveDelayTextBox.TabIndex = 19;
		this.receiveDelayTextBox.Text = "15";
		this.label9.AutoSize = true;
		this.label9.Location = new System.Drawing.Point(213, 16);
		this.label9.Name = "label9";
		this.label9.Size = new System.Drawing.Size(103, 13);
		this.label9.TabIndex = 18;
		this.label9.Text = "Receive Delay (sec)";
		this.transmitDelayTextBox.Location = new System.Drawing.Point(118, 13);
		this.transmitDelayTextBox.MaxLength = 2;
		this.transmitDelayTextBox.Name = "transmitDelayTextBox";
		this.transmitDelayTextBox.Size = new System.Drawing.Size(82, 20);
		this.transmitDelayTextBox.TabIndex = 17;
		this.transmitDelayTextBox.Text = "30";
		this.label8.AutoSize = true;
		this.label8.Location = new System.Drawing.Point(7, 16);
		this.label8.Name = "label8";
		this.label8.Size = new System.Drawing.Size(103, 13);
		this.label8.TabIndex = 16;
		this.label8.Text = "Transmit Delay (sec)";
		this.groupBox5.Controls.Add(this.dataTextBox);
		this.groupBox5.Controls.Add(this.label11);
		this.groupBox5.Controls.Add(this.addressTextBox);
		this.groupBox5.Controls.Add(this.label10);
		this.groupBox5.Controls.Add(this.debugWriteCheckBox);
		this.groupBox5.Location = new System.Drawing.Point(13, 318);
		this.groupBox5.Name = "groupBox5";
		this.groupBox5.Size = new System.Drawing.Size(425, 45);
		this.groupBox5.TabIndex = 4;
		this.groupBox5.TabStop = false;
		this.groupBox5.Text = "Debug Write to Location on Error";
		this.groupBox5.Visible = false;
		this.dataTextBox.Location = new System.Drawing.Point(319, 16);
		this.dataTextBox.MaxLength = 8;
		this.dataTextBox.Name = "dataTextBox";
		this.dataTextBox.Size = new System.Drawing.Size(87, 20);
		this.dataTextBox.TabIndex = 14;
		this.dataTextBox.Text = "DEADDADA";
		this.label11.AutoSize = true;
		this.label11.Location = new System.Drawing.Point(285, 20);
		this.label11.Name = "label11";
		this.label11.Size = new System.Drawing.Size(30, 13);
		this.label11.TabIndex = 13;
		this.label11.Text = "Data";
		this.addressTextBox.Location = new System.Drawing.Point(192, 16);
		this.addressTextBox.MaxLength = 8;
		this.addressTextBox.Name = "addressTextBox";
		this.addressTextBox.Size = new System.Drawing.Size(87, 20);
		this.addressTextBox.TabIndex = 12;
		this.addressTextBox.Text = "AFFFFF0C";
		this.label10.AutoSize = true;
		this.label10.Location = new System.Drawing.Point(141, 20);
		this.label10.Name = "label10";
		this.label10.Size = new System.Drawing.Size(45, 13);
		this.label10.TabIndex = 11;
		this.label10.Text = "Address";
		this.debugWriteCheckBox.AutoSize = true;
		this.debugWriteCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
		this.debugWriteCheckBox.Location = new System.Drawing.Point(6, 19);
		this.debugWriteCheckBox.Name = "debugWriteCheckBox";
		this.debugWriteCheckBox.Size = new System.Drawing.Size(122, 17);
		this.debugWriteCheckBox.TabIndex = 10;
		this.debugWriteCheckBox.Text = "Debug Write Enable";
		this.debugWriteCheckBox.UseVisualStyleBackColor = true;
		this.groupBox6.Controls.Add(this.groupBox7);
		this.groupBox6.Controls.Add(this.debugToggleCheckBox);
		this.groupBox6.Location = new System.Drawing.Point(13, 369);
		this.groupBox6.Name = "groupBox6";
		this.groupBox6.Size = new System.Drawing.Size(425, 76);
		this.groupBox6.TabIndex = 5;
		this.groupBox6.TabStop = false;
		this.groupBox6.Text = "Debug Toggle Par Port \"D0\" on Error";
		this.groupBox6.Visible = false;
		this.groupBox7.Controls.Add(this.lowRadioButton);
		this.groupBox7.Controls.Add(this.highRadioButton);
		this.groupBox7.Location = new System.Drawing.Point(178, 19);
		this.groupBox7.Name = "groupBox7";
		this.groupBox7.Size = new System.Drawing.Size(214, 49);
		this.groupBox7.TabIndex = 12;
		this.groupBox7.TabStop = false;
		this.groupBox7.Text = "Pulse Polarity";
		this.lowRadioButton.AutoSize = true;
		this.lowRadioButton.Location = new System.Drawing.Point(115, 19);
		this.lowRadioButton.Name = "lowRadioButton";
		this.lowRadioButton.Size = new System.Drawing.Size(45, 17);
		this.lowRadioButton.TabIndex = 1;
		this.lowRadioButton.Text = "Low";
		this.lowRadioButton.UseVisualStyleBackColor = true;
		this.highRadioButton.AutoSize = true;
		this.highRadioButton.Checked = true;
		this.highRadioButton.Location = new System.Drawing.Point(38, 19);
		this.highRadioButton.Name = "highRadioButton";
		this.highRadioButton.Size = new System.Drawing.Size(47, 17);
		this.highRadioButton.TabIndex = 0;
		this.highRadioButton.TabStop = true;
		this.highRadioButton.Text = "High";
		this.highRadioButton.UseVisualStyleBackColor = true;
		this.debugToggleCheckBox.AutoSize = true;
		this.debugToggleCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
		this.debugToggleCheckBox.Location = new System.Drawing.Point(6, 19);
		this.debugToggleCheckBox.Name = "debugToggleCheckBox";
		this.debugToggleCheckBox.Size = new System.Drawing.Size(130, 17);
		this.debugToggleCheckBox.TabIndex = 11;
		this.debugToggleCheckBox.Text = "Debug Toggle Enable";
		this.debugToggleCheckBox.UseVisualStyleBackColor = true;
		this.groupBox8.Controls.Add(this.bothRadioButton);
		this.groupBox8.Controls.Add(this.nonFlushRadioButton);
		this.groupBox8.Controls.Add(this.flushRadioButton);
		this.groupBox8.Location = new System.Drawing.Point(13, 452);
		this.groupBox8.Name = "groupBox8";
		this.groupBox8.Size = new System.Drawing.Size(425, 54);
		this.groupBox8.TabIndex = 6;
		this.groupBox8.TabStop = false;
		this.groupBox8.Text = "L2CAP Packet Types";
		this.bothRadioButton.AutoSize = true;
		this.bothRadioButton.Location = new System.Drawing.Point(345, 19);
		this.bothRadioButton.Name = "bothRadioButton";
		this.bothRadioButton.Size = new System.Drawing.Size(47, 17);
		this.bothRadioButton.TabIndex = 3;
		this.bothRadioButton.Text = "Both";
		this.bothRadioButton.UseVisualStyleBackColor = true;
		this.nonFlushRadioButton.AutoSize = true;
		this.nonFlushRadioButton.Location = new System.Drawing.Point(192, 19);
		this.nonFlushRadioButton.Name = "nonFlushRadioButton";
		this.nonFlushRadioButton.Size = new System.Drawing.Size(93, 17);
		this.nonFlushRadioButton.TabIndex = 2;
		this.nonFlushRadioButton.Text = "Non-Flushable";
		this.nonFlushRadioButton.UseVisualStyleBackColor = true;
		this.flushRadioButton.AutoSize = true;
		this.flushRadioButton.Checked = true;
		this.flushRadioButton.Location = new System.Drawing.Point(24, 19);
		this.flushRadioButton.Name = "flushRadioButton";
		this.flushRadioButton.Size = new System.Drawing.Size(70, 17);
		this.flushRadioButton.TabIndex = 1;
		this.flushRadioButton.TabStop = true;
		this.flushRadioButton.Text = "Flushable";
		this.flushRadioButton.UseVisualStyleBackColor = true;
		this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
		this.okButton.Location = new System.Drawing.Point(76, 524);
		this.okButton.Name = "okButton";
		this.okButton.Size = new System.Drawing.Size(75, 23);
		this.okButton.TabIndex = 7;
		this.okButton.Text = "OK";
		this.okButton.UseVisualStyleBackColor = true;
		this.okButton.Click += new System.EventHandler(okButton_Click);
		this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
		this.cancelButton.Location = new System.Drawing.Point(261, 524);
		this.cancelButton.Name = "cancelButton";
		this.cancelButton.Size = new System.Drawing.Size(75, 23);
		this.cancelButton.TabIndex = 8;
		this.cancelButton.Text = "Cancel";
		this.cancelButton.UseVisualStyleBackColor = true;
		base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.ClientSize = new System.Drawing.Size(450, 559);
		base.Controls.Add(this.cancelButton);
		base.Controls.Add(this.okButton);
		base.Controls.Add(this.groupBox8);
		base.Controls.Add(this.groupBox6);
		base.Controls.Add(this.groupBox5);
		base.Controls.Add(this.groupBox4);
		base.Controls.Add(this.groupBox3);
		base.Controls.Add(this.groupBox2);
		base.Controls.Add(this.groupBox1);
		base.MaximizeBox = false;
		base.MinimizeBox = false;
		base.Name = "ChooseUserDataOption";
		base.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
		this.Text = "ChooseUserDataOption";
		base.FormClosing += new System.Windows.Forms.FormClosingEventHandler(ChooseUserDataOption_FormClosing);
		base.Load += new System.EventHandler(ChooseUserDataOption_Load);
		this.groupBox1.ResumeLayout(false);
		this.groupBox1.PerformLayout();
		this.groupBox2.ResumeLayout(false);
		this.groupBox2.PerformLayout();
		this.groupBox3.ResumeLayout(false);
		this.groupBox3.PerformLayout();
		this.groupBox4.ResumeLayout(false);
		this.groupBox4.PerformLayout();
		this.groupBox5.ResumeLayout(false);
		this.groupBox5.PerformLayout();
		this.groupBox6.ResumeLayout(false);
		this.groupBox6.PerformLayout();
		this.groupBox7.ResumeLayout(false);
		this.groupBox7.PerformLayout();
		this.groupBox8.ResumeLayout(false);
		this.groupBox8.PerformLayout();
		base.ResumeLayout(false);
	}
}
