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

namespace QCRPG.TSL.BT;

public class ESCOUserControl : UserControl
{
	private const int ESCO_TRANSMITBANDHWIDTH = 8000;

	private const int ESCO_RECEIVEBANDWIDTH = 8000;

	private const int ESCO_MAXLATENCY = 10;

	private const bool ESCO_MSMAXLATENCY = true;

	private const bool ESCO_SLOTMAXLATENCY = false;

	private const bool ESCO_NORETRANS = false;

	private const bool ESCO_OPTIMIZEPOWER = true;

	private const bool ESCO_OPTIMIZEQUALITY = false;

	private const bool ESCO_DONTCARE = false;

	private const bool ESCO_HV1ENABLE = true;

	private const bool ESCO_HV2ENABLE = true;

	private const bool ESCO_HV3ENABLE = true;

	private const bool ESCO_EV3ENABLE = true;

	private const bool ESCO_EV4ENABLE = true;

	private const bool ESCO_EV5ENABLE = true;

	private const bool ESCO_2EV3ENABLE = true;

	private const bool ESCO_3EV3ENABLE = true;

	private const bool ESCO_2EV5ENABLE = true;

	private const bool ESCO_3EV5ENABLE = true;

	private const string ESCO_VOICESETTING = "0060";

	private int TransmitBandwidth = 8000;

	private int ReceiveBandwidth = 8000;

	private int MaxLatency = 10;

	private bool MsMaxLatency = true;

	private bool SlotMaxLatency;

	private bool NoRestrans;

	private bool OptimizePower = true;

	private bool OptimizeQuality;

	private bool DontCare;

	private bool ESCOHV1enable = true;

	private bool ESCOHV2enable = true;

	private bool ESCOHV3enable = true;

	private bool ESCOEV3enable = true;

	private bool ESCOEV4enable = true;

	private bool ESCOEV5enable = true;

	private bool ESCO2EV3enable = true;

	private bool ESCO3EV3enable = true;

	private bool ESCO2EV5enable = true;

	private bool ESCO3EV5enable = true;

	private string VoiceSetting = "024C";

	private bool AirCodingCVSDEnable = true;

	private bool AirCodingULawEnable;

	private bool AirCodingALawEnable;

	private bool AirCodingTransparentDataEnable;

	private int LinearPCMBitPosition = 3;

	private bool SampleSize8BitEnable = true;

	private bool SampleSize16BitEnable;

	private bool InputData1ComplEnable;

	private bool InputData2ComplEnable = true;

	private bool InputDataSignMagnitudeEnable;

	private bool InputDataUnsignedEnable;

	private bool InputCodingLinearEnable;

	private bool InputCodingALawEnable = true;

	private bool InputCodingULawEnable;

	private bool InputCodingCVSDEnable;

	private bool AudioSourceCodecEnable = true;

	private bool AudioSourceHCIEnable;

	private VoiceSettings voiceSettings;

	private IContainer components;

	private Button resetButton;

	private GroupBox groupBox13;

	private RadioButton dontCareRadioButton;

	private RadioButton optimizeQualityRadioButton;

	private RadioButton optimizePowerRadioButton;

	private RadioButton noRetransRadioButton;

	private GroupBox groupBox12;

	private Button editButton;

	private TextBox voiceSettingsTextBox;

	private GroupBox groupBox9;

	private TextBox receiveTextBox;

	private TextBox transmitTextBox;

	private Label label8;

	private Label label7;

	private GroupBox groupBox11;

	private CheckBox esco3EV5CheckBox;

	private CheckBox esco3EV3CheckBox;

	private CheckBox esco2EV5CheckBox;

	private CheckBox esco2EV3CheckBox;

	private CheckBox escoEV5CheckBox;

	private CheckBox escoEV4CheckBox;

	private CheckBox escoEV3CheckBox;

	private CheckBox escoHV3CheckBox;

	private CheckBox escoHV2CheckBox;

	private CheckBox escoHV1CheckBox;

	private GroupBox groupBox10;

	private RadioButton slotRadioButton;

	private RadioButton msRadioButton;

	private TextBox maxLatencyTextBox;

	private FlowLayoutPanel flowLayoutPanel1;

	public int transmitBandwidth
	{
		get
		{
			return TransmitBandwidth;
		}
		set
		{
			TransmitBandwidth = value;
		}
	}

	public int receiveBandwidth
	{
		get
		{
			return ReceiveBandwidth;
		}
		set
		{
			ReceiveBandwidth = value;
		}
	}

	public int maxLatency
	{
		get
		{
			return MaxLatency;
		}
		set
		{
			MaxLatency = value;
		}
	}

	public bool msMaxLatency
	{
		get
		{
			return MsMaxLatency;
		}
		set
		{
			MsMaxLatency = value;
		}
	}

	public bool slotMaxLatency
	{
		get
		{
			return SlotMaxLatency;
		}
		set
		{
			SlotMaxLatency = value;
		}
	}

	public bool noRestrans
	{
		get
		{
			return NoRestrans;
		}
		set
		{
			NoRestrans = value;
		}
	}

	public bool optimizePower
	{
		get
		{
			return OptimizePower;
		}
		set
		{
			OptimizePower = value;
		}
	}

	public bool optimizeQuality
	{
		get
		{
			return OptimizeQuality;
		}
		set
		{
			OptimizeQuality = value;
		}
	}

	public bool dontCare
	{
		get
		{
			return DontCare;
		}
		set
		{
			DontCare = value;
		}
	}

	public bool escoHV1enable
	{
		get
		{
			return ESCOHV1enable;
		}
		set
		{
			ESCOHV1enable = value;
		}
	}

	public bool escoHV2enable
	{
		get
		{
			return ESCOHV2enable;
		}
		set
		{
			ESCOHV2enable = value;
		}
	}

	public bool escoHV3enable
	{
		get
		{
			return ESCOHV3enable;
		}
		set
		{
			ESCOHV3enable = value;
		}
	}

	public bool escoEV3enable
	{
		get
		{
			return ESCOEV3enable;
		}
		set
		{
			ESCOEV3enable = value;
		}
	}

	public bool escoEV4enable
	{
		get
		{
			return ESCOEV4enable;
		}
		set
		{
			ESCOEV4enable = value;
		}
	}

	public bool escoEV5enable
	{
		get
		{
			return ESCOEV5enable;
		}
		set
		{
			ESCOEV5enable = value;
		}
	}

	public bool esco2EV3enable
	{
		get
		{
			return ESCO2EV3enable;
		}
		set
		{
			ESCO2EV3enable = value;
		}
	}

	public bool esco3EV3enable
	{
		get
		{
			return ESCO3EV3enable;
		}
		set
		{
			ESCO3EV3enable = value;
		}
	}

	public bool esco2EV5enable
	{
		get
		{
			return ESCO2EV5enable;
		}
		set
		{
			ESCO2EV5enable = value;
		}
	}

	public bool esco3EV5enable
	{
		get
		{
			return ESCO3EV5enable;
		}
		set
		{
			ESCO3EV5enable = value;
		}
	}

	public string voiceSetting
	{
		get
		{
			return VoiceSetting;
		}
		set
		{
			VoiceSetting = value;
		}
	}

	public bool airCodingCVSDEnable
	{
		get
		{
			return AirCodingCVSDEnable;
		}
		set
		{
			AirCodingCVSDEnable = value;
		}
	}

	public bool airCodingULawEnable
	{
		get
		{
			return AirCodingULawEnable;
		}
		set
		{
			AirCodingULawEnable = value;
		}
	}

	public bool airCodingALawEnable
	{
		get
		{
			return AirCodingALawEnable;
		}
		set
		{
			AirCodingALawEnable = value;
		}
	}

	public bool airCodingTransparentDataEnable
	{
		get
		{
			return AirCodingTransparentDataEnable;
		}
		set
		{
			AirCodingTransparentDataEnable = value;
		}
	}

	public int linearPCMBitPosition
	{
		get
		{
			return LinearPCMBitPosition;
		}
		set
		{
			LinearPCMBitPosition = value;
		}
	}

	public bool sampleSize8BitEnable
	{
		get
		{
			return SampleSize8BitEnable;
		}
		set
		{
			SampleSize8BitEnable = value;
		}
	}

	public bool sampleSize16BitEnable
	{
		get
		{
			return SampleSize16BitEnable;
		}
		set
		{
			SampleSize16BitEnable = value;
		}
	}

	public bool inputData1ComplEnable
	{
		get
		{
			return InputData1ComplEnable;
		}
		set
		{
			InputData1ComplEnable = value;
		}
	}

	public bool inputData2ComplEnable
	{
		get
		{
			return InputData2ComplEnable;
		}
		set
		{
			InputData2ComplEnable = value;
		}
	}

	public bool inputDataSignMagnitudeEnable
	{
		get
		{
			return InputDataSignMagnitudeEnable;
		}
		set
		{
			InputDataSignMagnitudeEnable = value;
		}
	}

	public bool inputDataUnsignedEnable
	{
		get
		{
			return InputDataUnsignedEnable;
		}
		set
		{
			InputDataUnsignedEnable = value;
		}
	}

	public bool inputCodingLinearEnable
	{
		get
		{
			return InputCodingLinearEnable;
		}
		set
		{
			InputCodingLinearEnable = value;
		}
	}

	public bool inputCodingALawEnable
	{
		get
		{
			return InputCodingALawEnable;
		}
		set
		{
			InputCodingALawEnable = value;
		}
	}

	public bool inputCodingULawEnable
	{
		get
		{
			return InputCodingULawEnable;
		}
		set
		{
			InputCodingULawEnable = value;
		}
	}

	public bool inputCodingCVSDEnable
	{
		get
		{
			return InputCodingCVSDEnable;
		}
		set
		{
			InputCodingCVSDEnable = value;
		}
	}

	public bool audioSourceCodecEnable
	{
		get
		{
			return AudioSourceCodecEnable;
		}
		set
		{
			AudioSourceCodecEnable = value;
		}
	}

	public bool audioSourceHCIEnable
	{
		get
		{
			return AudioSourceHCIEnable;
		}
		set
		{
			AudioSourceHCIEnable = value;
		}
	}

	public ESCOUserControl()
	{
		InitializeComponent();
	}

	public void UpdateInfoFromUserControl()
	{
		if (base.IsHandleCreated)
		{
			if (!int.TryParse(transmitTextBox.Text, out TransmitBandwidth))
			{
				TransmitBandwidth = 8000;
			}
			if (!int.TryParse(receiveTextBox.Text, out ReceiveBandwidth))
			{
				ReceiveBandwidth = 8000;
			}
			if (!int.TryParse(maxLatencyTextBox.Text, out MaxLatency))
			{
				MaxLatency = 10;
			}
			SlotMaxLatency = slotRadioButton.Checked;
			MsMaxLatency = msRadioButton.Checked;
			VoiceSetting = voiceSettingsTextBox.Text;
			NoRestrans = noRetransRadioButton.Checked;
			OptimizePower = optimizePowerRadioButton.Checked;
			OptimizeQuality = optimizeQualityRadioButton.Checked;
			DontCare = dontCareRadioButton.Checked;
			ESCOHV1enable = escoHV1CheckBox.Checked;
			ESCOHV2enable = escoHV2CheckBox.Checked;
			ESCOHV3enable = escoHV3CheckBox.Checked;
			ESCOEV3enable = escoEV3CheckBox.Checked;
			ESCOEV4enable = escoEV4CheckBox.Checked;
			ESCOEV5enable = escoEV5CheckBox.Checked;
			ESCO2EV3enable = esco2EV3CheckBox.Checked;
			ESCO3EV3enable = esco3EV3CheckBox.Checked;
			ESCO2EV5enable = esco2EV5CheckBox.Checked;
			ESCO3EV5enable = esco3EV3CheckBox.Checked;
		}
	}

	private void msRadioButton_CheckedChanged(object sender, EventArgs e)
	{
		if (msRadioButton.Checked)
		{
			int result = 0;
			int.TryParse(maxLatencyTextBox.Text.ToString(), out result);
			result = (int)((double)result * 0.625);
			maxLatencyTextBox.Text = result.ToString();
		}
	}

	private void slotRadioButton_CheckedChanged(object sender, EventArgs e)
	{
		if (slotRadioButton.Checked)
		{
			int result = 0;
			int.TryParse(maxLatencyTextBox.Text.ToString(), out result);
			result = (int)((double)result / 0.625);
			maxLatencyTextBox.Text = result.ToString();
		}
	}

	private void ESCOUserControl_Load(object sender, EventArgs e)
	{
		transmitTextBox.Text = TransmitBandwidth.ToString();
		receiveTextBox.Text = ReceiveBandwidth.ToString();
		maxLatencyTextBox.Text = MaxLatency.ToString();
		slotRadioButton.Checked = SlotMaxLatency;
		msRadioButton.Checked = MsMaxLatency;
		voiceSettingsTextBox.Text = VoiceSetting.ToString();
		noRetransRadioButton.Checked = NoRestrans;
		optimizePowerRadioButton.Checked = OptimizePower;
		optimizeQualityRadioButton.Checked = OptimizeQuality;
		dontCareRadioButton.Checked = DontCare;
		escoHV1CheckBox.Checked = ESCOHV1enable;
		escoHV2CheckBox.Checked = ESCOHV2enable;
		escoHV3CheckBox.Checked = ESCOHV3enable;
		escoEV3CheckBox.Checked = ESCOEV3enable;
		escoEV4CheckBox.Checked = ESCOEV4enable;
		escoEV5CheckBox.Checked = ESCOEV5enable;
		esco2EV3CheckBox.Checked = ESCO2EV3enable;
		esco3EV3CheckBox.Checked = ESCO3EV3enable;
		esco2EV5CheckBox.Checked = ESCO2EV5enable;
		esco3EV3CheckBox.Checked = ESCO3EV5enable;
	}

	private void editButton_Click(object sender, EventArgs e)
	{
		CalculateVoiceSettingFromHex();
		voiceSettings = new VoiceSettings();
		voiceSettings.airCodingCVSDEnable = AirCodingCVSDEnable;
		voiceSettings.airCodingULawEnable = AirCodingULawEnable;
		voiceSettings.airCodingALawEnable = AirCodingALawEnable;
		voiceSettings.airCodingTransparentDataEnable = AirCodingTransparentDataEnable;
		voiceSettings.linearPCMBitPosition = LinearPCMBitPosition;
		voiceSettings.sampleSize8BitEnable = SampleSize8BitEnable;
		voiceSettings.sampleSize16BitEnable = SampleSize16BitEnable;
		voiceSettings.inputData1ComplEnable = InputData1ComplEnable;
		voiceSettings.inputData2ComplEnable = InputData2ComplEnable;
		voiceSettings.inputDataSignMagnitudeEnable = InputDataSignMagnitudeEnable;
		voiceSettings.inputDataUnsignedEnable = InputDataUnsignedEnable;
		voiceSettings.inputCodingLinearEnable = InputCodingLinearEnable;
		voiceSettings.inputCodingALawEnable = InputCodingALawEnable;
		voiceSettings.inputCodingULawEnable = InputCodingULawEnable;
		voiceSettings.inputCodingCVSDEnable = InputCodingCVSDEnable;
		voiceSettings.audioSourceCodecEnable = AudioSourceCodecEnable;
		voiceSettings.audioSourceHCIEnable = AudioSourceHCIEnable;
		voiceSettings.ShowDialog();
		if (voiceSettings.DialogResult == DialogResult.OK)
		{
			AirCodingCVSDEnable = voiceSettings.airCodingCVSDEnable;
			AirCodingULawEnable = voiceSettings.airCodingULawEnable;
			AirCodingALawEnable = voiceSettings.airCodingALawEnable;
			AirCodingTransparentDataEnable = voiceSettings.airCodingTransparentDataEnable;
			LinearPCMBitPosition = voiceSettings.linearPCMBitPosition;
			SampleSize8BitEnable = voiceSettings.sampleSize8BitEnable;
			SampleSize16BitEnable = voiceSettings.sampleSize16BitEnable;
			InputData1ComplEnable = voiceSettings.inputData1ComplEnable;
			InputData2ComplEnable = voiceSettings.inputData2ComplEnable;
			InputDataSignMagnitudeEnable = voiceSettings.inputDataSignMagnitudeEnable;
			InputDataUnsignedEnable = voiceSettings.inputDataUnsignedEnable;
			InputCodingLinearEnable = voiceSettings.inputCodingLinearEnable;
			InputCodingALawEnable = voiceSettings.inputCodingALawEnable;
			InputCodingULawEnable = voiceSettings.inputCodingULawEnable;
			InputCodingCVSDEnable = voiceSettings.inputCodingCVSDEnable;
			AudioSourceCodecEnable = voiceSettings.audioSourceCodecEnable;
			AudioSourceHCIEnable = voiceSettings.audioSourceHCIEnable;
			VoiceSetting = CalculateVoiceSettingForESCOConnection().ToString("X4");
			voiceSettingsTextBox.Text = VoiceSetting;
		}
	}

	private int CalculateVoiceSettingForESCOConnection()
	{
		int num = 0;
		if (InputCodingLinearEnable)
		{
			num = num;
		}
		if (InputCodingULawEnable)
		{
			num += 256;
		}
		if (InputCodingALawEnable)
		{
			num += 512;
		}
		if (InputCodingCVSDEnable)
		{
			num += 768;
		}
		if (InputData1ComplEnable)
		{
			num = num;
		}
		if (InputData2ComplEnable)
		{
			num += 64;
		}
		if (InputDataSignMagnitudeEnable)
		{
			num += 128;
		}
		if (InputDataUnsignedEnable)
		{
			num += 192;
		}
		if (SampleSize8BitEnable)
		{
			num = num;
		}
		if (SampleSize16BitEnable)
		{
			num += 32;
		}
		if (AirCodingCVSDEnable)
		{
			num = num;
		}
		if (AirCodingULawEnable)
		{
			num++;
		}
		if (AirCodingALawEnable)
		{
			num += 2;
		}
		if (AirCodingTransparentDataEnable)
		{
			num += 3;
		}
		if (AudioSourceCodecEnable)
		{
			num = num;
		}
		if (AudioSourceHCIEnable)
		{
			num += 32768;
		}
		return num + (LinearPCMBitPosition << 2);
	}

	private void CalculateVoiceSettingFromHex()
	{
		int num = 0;
		try
		{
			num = Convert.ToInt32(voiceSettingsTextBox.Text, 16);
		}
		catch (FormatException)
		{
			MessageBox.Show("Invalid Voice Setting (Hex).\nUsing default values.");
			voiceSettingsTextBox.Text = "024C";
			num = Convert.ToInt32(voiceSettingsTextBox.Text, 16);
		}
		AirCodingCVSDEnable = false;
		AirCodingULawEnable = false;
		AirCodingALawEnable = false;
		AirCodingTransparentDataEnable = false;
		LinearPCMBitPosition = 0;
		SampleSize8BitEnable = false;
		SampleSize16BitEnable = false;
		InputData1ComplEnable = false;
		InputData2ComplEnable = false;
		InputDataSignMagnitudeEnable = false;
		InputDataUnsignedEnable = false;
		InputCodingLinearEnable = false;
		InputCodingALawEnable = false;
		InputCodingULawEnable = false;
		InputCodingCVSDEnable = false;
		AudioSourceCodecEnable = false;
		AudioSourceHCIEnable = false;
		short num2 = (short)(num & 0x300);
		short num3 = (short)(num & 0xC0);
		short num4 = (short)(num & 0x20);
		short num5 = (short)(num & 3);
		int num6 = num & 0x8000;
		if (num2 == 0)
		{
			InputCodingLinearEnable = true;
		}
		if (num2 == 256)
		{
			InputCodingULawEnable = true;
		}
		if (num2 == 512)
		{
			InputCodingALawEnable = true;
		}
		if (num2 == 768)
		{
			InputCodingCVSDEnable = true;
		}
		if (num3 == 0)
		{
			InputData1ComplEnable = true;
		}
		if (num3 == 64)
		{
			InputData2ComplEnable = true;
		}
		if (num3 == 128)
		{
			InputDataSignMagnitudeEnable = true;
		}
		if (num3 == 192)
		{
			InputDataUnsignedEnable = true;
		}
		if (num4 == 0)
		{
			SampleSize8BitEnable = true;
		}
		if (num4 == 32)
		{
			SampleSize16BitEnable = true;
		}
		if (num5 == 0)
		{
			AirCodingCVSDEnable = true;
		}
		if (num5 == 1)
		{
			AirCodingULawEnable = true;
		}
		if (num5 == 2)
		{
			AirCodingALawEnable = true;
		}
		if (num5 == 3)
		{
			AirCodingTransparentDataEnable = true;
		}
		if (num6 == 0)
		{
			AudioSourceCodecEnable = true;
		}
		if (num6 == 32768)
		{
			AudioSourceHCIEnable = true;
		}
		LinearPCMBitPosition = (num & 0x1C) >> 2;
	}

	private void resetButton_Click(object sender, EventArgs e)
	{
		transmitTextBox.Text = 8000.ToString();
		receiveTextBox.Text = 8000.ToString();
		slotRadioButton.Checked = false;
		msRadioButton.Checked = true;
		maxLatencyTextBox.Text = 10.ToString();
		voiceSettingsTextBox.Text = "0060";
		noRetransRadioButton.Checked = false;
		optimizePowerRadioButton.Checked = true;
		optimizeQualityRadioButton.Checked = false;
		dontCareRadioButton.Checked = false;
		escoHV1CheckBox.Checked = true;
		escoHV2CheckBox.Checked = true;
		escoHV3CheckBox.Checked = true;
		escoEV3CheckBox.Checked = true;
		escoEV4CheckBox.Checked = true;
		escoEV5CheckBox.Checked = true;
		esco2EV3CheckBox.Checked = true;
		esco3EV3CheckBox.Checked = true;
		esco2EV5CheckBox.Checked = true;
		esco3EV3CheckBox.Checked = true;
	}

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

	private void InitializeComponent()
	{
		this.resetButton = new System.Windows.Forms.Button();
		this.groupBox13 = new System.Windows.Forms.GroupBox();
		this.dontCareRadioButton = new System.Windows.Forms.RadioButton();
		this.optimizeQualityRadioButton = new System.Windows.Forms.RadioButton();
		this.optimizePowerRadioButton = new System.Windows.Forms.RadioButton();
		this.noRetransRadioButton = new System.Windows.Forms.RadioButton();
		this.groupBox12 = new System.Windows.Forms.GroupBox();
		this.editButton = new System.Windows.Forms.Button();
		this.voiceSettingsTextBox = new System.Windows.Forms.TextBox();
		this.groupBox9 = new System.Windows.Forms.GroupBox();
		this.receiveTextBox = new System.Windows.Forms.TextBox();
		this.transmitTextBox = new System.Windows.Forms.TextBox();
		this.label8 = new System.Windows.Forms.Label();
		this.label7 = new System.Windows.Forms.Label();
		this.groupBox11 = new System.Windows.Forms.GroupBox();
		this.esco3EV5CheckBox = new System.Windows.Forms.CheckBox();
		this.esco3EV3CheckBox = new System.Windows.Forms.CheckBox();
		this.esco2EV5CheckBox = new System.Windows.Forms.CheckBox();
		this.esco2EV3CheckBox = new System.Windows.Forms.CheckBox();
		this.escoEV5CheckBox = new System.Windows.Forms.CheckBox();
		this.escoEV4CheckBox = new System.Windows.Forms.CheckBox();
		this.escoEV3CheckBox = new System.Windows.Forms.CheckBox();
		this.escoHV3CheckBox = new System.Windows.Forms.CheckBox();
		this.escoHV2CheckBox = new System.Windows.Forms.CheckBox();
		this.escoHV1CheckBox = new System.Windows.Forms.CheckBox();
		this.groupBox10 = new System.Windows.Forms.GroupBox();
		this.slotRadioButton = new System.Windows.Forms.RadioButton();
		this.msRadioButton = new System.Windows.Forms.RadioButton();
		this.maxLatencyTextBox = new System.Windows.Forms.TextBox();
		this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
		this.groupBox13.SuspendLayout();
		this.groupBox12.SuspendLayout();
		this.groupBox9.SuspendLayout();
		this.groupBox11.SuspendLayout();
		this.groupBox10.SuspendLayout();
		this.flowLayoutPanel1.SuspendLayout();
		base.SuspendLayout();
		this.resetButton.Location = new System.Drawing.Point(3, 249);
		this.resetButton.Name = "resetButton";
		this.resetButton.Size = new System.Drawing.Size(98, 23);
		this.resetButton.TabIndex = 5;
		this.resetButton.Text = "Reset Settings";
		this.resetButton.UseVisualStyleBackColor = true;
		this.resetButton.Click += new System.EventHandler(resetButton_Click);
		this.groupBox13.Controls.Add(this.dontCareRadioButton);
		this.groupBox13.Controls.Add(this.optimizeQualityRadioButton);
		this.groupBox13.Controls.Add(this.optimizePowerRadioButton);
		this.groupBox13.Controls.Add(this.noRetransRadioButton);
		this.groupBox13.Location = new System.Drawing.Point(3, 105);
		this.groupBox13.Name = "groupBox13";
		this.groupBox13.Size = new System.Drawing.Size(293, 66);
		this.groupBox13.TabIndex = 3;
		this.groupBox13.TabStop = false;
		this.groupBox13.Text = "Retransmission Effort";
		this.dontCareRadioButton.AutoSize = true;
		this.dontCareRadioButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8f);
		this.dontCareRadioButton.Location = new System.Drawing.Point(164, 42);
		this.dontCareRadioButton.Name = "dontCareRadioButton";
		this.dontCareRadioButton.Size = new System.Drawing.Size(73, 17);
		this.dontCareRadioButton.TabIndex = 3;
		this.dontCareRadioButton.Text = "Dont Care";
		this.dontCareRadioButton.UseVisualStyleBackColor = true;
		this.optimizeQualityRadioButton.AutoSize = true;
		this.optimizeQualityRadioButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8f);
		this.optimizeQualityRadioButton.Location = new System.Drawing.Point(23, 42);
		this.optimizeQualityRadioButton.Name = "optimizeQualityRadioButton";
		this.optimizeQualityRadioButton.Size = new System.Drawing.Size(100, 17);
		this.optimizeQualityRadioButton.TabIndex = 2;
		this.optimizeQualityRadioButton.Text = "Optimize Quality";
		this.optimizeQualityRadioButton.UseVisualStyleBackColor = true;
		this.optimizePowerRadioButton.AutoSize = true;
		this.optimizePowerRadioButton.Checked = true;
		this.optimizePowerRadioButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8f);
		this.optimizePowerRadioButton.Location = new System.Drawing.Point(164, 19);
		this.optimizePowerRadioButton.Name = "optimizePowerRadioButton";
		this.optimizePowerRadioButton.Size = new System.Drawing.Size(98, 17);
		this.optimizePowerRadioButton.TabIndex = 1;
		this.optimizePowerRadioButton.TabStop = true;
		this.optimizePowerRadioButton.Text = "Optimize Power";
		this.optimizePowerRadioButton.UseVisualStyleBackColor = true;
		this.noRetransRadioButton.AutoSize = true;
		this.noRetransRadioButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
		this.noRetransRadioButton.Location = new System.Drawing.Point(23, 19);
		this.noRetransRadioButton.Name = "noRetransRadioButton";
		this.noRetransRadioButton.Size = new System.Drawing.Size(79, 17);
		this.noRetransRadioButton.TabIndex = 0;
		this.noRetransRadioButton.Text = "No Retrans";
		this.noRetransRadioButton.UseVisualStyleBackColor = true;
		this.groupBox12.Controls.Add(this.editButton);
		this.groupBox12.Controls.Add(this.voiceSettingsTextBox);
		this.groupBox12.Location = new System.Drawing.Point(151, 57);
		this.groupBox12.Name = "groupBox12";
		this.groupBox12.Size = new System.Drawing.Size(145, 42);
		this.groupBox12.TabIndex = 2;
		this.groupBox12.TabStop = false;
		this.groupBox12.Text = "Voice Settings (Hex)";
		this.editButton.Location = new System.Drawing.Point(70, 15);
		this.editButton.Name = "editButton";
		this.editButton.Size = new System.Drawing.Size(61, 20);
		this.editButton.TabIndex = 4;
		this.editButton.Text = "Edit";
		this.editButton.UseVisualStyleBackColor = true;
		this.editButton.Click += new System.EventHandler(editButton_Click);
		this.voiceSettingsTextBox.Location = new System.Drawing.Point(6, 16);
		this.voiceSettingsTextBox.Name = "voiceSettingsTextBox";
		this.voiceSettingsTextBox.Size = new System.Drawing.Size(58, 20);
		this.voiceSettingsTextBox.TabIndex = 3;
		this.voiceSettingsTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.groupBox9.Controls.Add(this.receiveTextBox);
		this.groupBox9.Controls.Add(this.transmitTextBox);
		this.groupBox9.Controls.Add(this.label8);
		this.groupBox9.Controls.Add(this.label7);
		this.groupBox9.Location = new System.Drawing.Point(3, 3);
		this.groupBox9.Name = "groupBox9";
		this.groupBox9.Size = new System.Drawing.Size(293, 48);
		this.groupBox9.TabIndex = 0;
		this.groupBox9.TabStop = false;
		this.groupBox9.Text = "Bandwidth in Bytes/Second (decimal values)";
		this.receiveTextBox.Location = new System.Drawing.Point(194, 21);
		this.receiveTextBox.Name = "receiveTextBox";
		this.receiveTextBox.Size = new System.Drawing.Size(90, 20);
		this.receiveTextBox.TabIndex = 3;
		this.transmitTextBox.Location = new System.Drawing.Point(55, 21);
		this.transmitTextBox.Name = "transmitTextBox";
		this.transmitTextBox.Size = new System.Drawing.Size(82, 20);
		this.transmitTextBox.TabIndex = 2;
		this.label8.AutoSize = true;
		this.label8.Location = new System.Drawing.Point(143, 24);
		this.label8.Name = "label8";
		this.label8.Size = new System.Drawing.Size(47, 13);
		this.label8.TabIndex = 1;
		this.label8.Text = "Receive";
		this.label7.AutoSize = true;
		this.label7.Location = new System.Drawing.Point(4, 24);
		this.label7.Name = "label7";
		this.label7.Size = new System.Drawing.Size(47, 13);
		this.label7.TabIndex = 0;
		this.label7.Text = "Transmit";
		this.groupBox11.Controls.Add(this.esco3EV5CheckBox);
		this.groupBox11.Controls.Add(this.esco3EV3CheckBox);
		this.groupBox11.Controls.Add(this.esco2EV5CheckBox);
		this.groupBox11.Controls.Add(this.esco2EV3CheckBox);
		this.groupBox11.Controls.Add(this.escoEV5CheckBox);
		this.groupBox11.Controls.Add(this.escoEV4CheckBox);
		this.groupBox11.Controls.Add(this.escoEV3CheckBox);
		this.groupBox11.Controls.Add(this.escoHV3CheckBox);
		this.groupBox11.Controls.Add(this.escoHV2CheckBox);
		this.groupBox11.Controls.Add(this.escoHV1CheckBox);
		this.groupBox11.Location = new System.Drawing.Point(3, 177);
		this.groupBox11.Name = "groupBox11";
		this.groupBox11.Size = new System.Drawing.Size(293, 66);
		this.groupBox11.TabIndex = 4;
		this.groupBox11.TabStop = false;
		this.groupBox11.Text = "Packet Type";
		this.esco3EV5CheckBox.AutoSize = true;
		this.esco3EV5CheckBox.Checked = true;
		this.esco3EV5CheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
		this.esco3EV5CheckBox.Location = new System.Drawing.Point(238, 42);
		this.esco3EV5CheckBox.Name = "esco3EV5CheckBox";
		this.esco3EV5CheckBox.Size = new System.Drawing.Size(55, 17);
		this.esco3EV5CheckBox.TabIndex = 9;
		this.esco3EV5CheckBox.Text = "3-EV5";
		this.esco3EV5CheckBox.UseVisualStyleBackColor = true;
		this.esco3EV3CheckBox.AutoSize = true;
		this.esco3EV3CheckBox.Checked = true;
		this.esco3EV3CheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
		this.esco3EV3CheckBox.Location = new System.Drawing.Point(116, 42);
		this.esco3EV3CheckBox.Name = "esco3EV3CheckBox";
		this.esco3EV3CheckBox.Size = new System.Drawing.Size(55, 17);
		this.esco3EV3CheckBox.TabIndex = 7;
		this.esco3EV3CheckBox.Text = "3-EV3";
		this.esco3EV3CheckBox.UseVisualStyleBackColor = true;
		this.esco2EV5CheckBox.AutoSize = true;
		this.esco2EV5CheckBox.Checked = true;
		this.esco2EV5CheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
		this.esco2EV5CheckBox.Location = new System.Drawing.Point(177, 42);
		this.esco2EV5CheckBox.Name = "esco2EV5CheckBox";
		this.esco2EV5CheckBox.Size = new System.Drawing.Size(55, 17);
		this.esco2EV5CheckBox.TabIndex = 8;
		this.esco2EV5CheckBox.Text = "2-EV5";
		this.esco2EV5CheckBox.UseVisualStyleBackColor = true;
		this.esco2EV3CheckBox.AutoSize = true;
		this.esco2EV3CheckBox.Checked = true;
		this.esco2EV3CheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
		this.esco2EV3CheckBox.Location = new System.Drawing.Point(55, 42);
		this.esco2EV3CheckBox.Name = "esco2EV3CheckBox";
		this.esco2EV3CheckBox.Size = new System.Drawing.Size(55, 17);
		this.esco2EV3CheckBox.TabIndex = 6;
		this.esco2EV3CheckBox.Text = "2-EV3";
		this.esco2EV3CheckBox.UseVisualStyleBackColor = true;
		this.escoEV5CheckBox.AutoSize = true;
		this.escoEV5CheckBox.Checked = true;
		this.escoEV5CheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
		this.escoEV5CheckBox.Location = new System.Drawing.Point(5, 42);
		this.escoEV5CheckBox.Name = "escoEV5CheckBox";
		this.escoEV5CheckBox.Size = new System.Drawing.Size(46, 17);
		this.escoEV5CheckBox.TabIndex = 5;
		this.escoEV5CheckBox.Text = "EV5";
		this.escoEV5CheckBox.UseVisualStyleBackColor = true;
		this.escoEV4CheckBox.AutoSize = true;
		this.escoEV4CheckBox.Checked = true;
		this.escoEV4CheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
		this.escoEV4CheckBox.Location = new System.Drawing.Point(238, 19);
		this.escoEV4CheckBox.Name = "escoEV4CheckBox";
		this.escoEV4CheckBox.Size = new System.Drawing.Size(46, 17);
		this.escoEV4CheckBox.TabIndex = 4;
		this.escoEV4CheckBox.Text = "EV4";
		this.escoEV4CheckBox.UseVisualStyleBackColor = true;
		this.escoEV3CheckBox.AutoSize = true;
		this.escoEV3CheckBox.Checked = true;
		this.escoEV3CheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
		this.escoEV3CheckBox.Location = new System.Drawing.Point(177, 19);
		this.escoEV3CheckBox.Name = "escoEV3CheckBox";
		this.escoEV3CheckBox.Size = new System.Drawing.Size(46, 17);
		this.escoEV3CheckBox.TabIndex = 3;
		this.escoEV3CheckBox.Text = "EV3";
		this.escoEV3CheckBox.UseVisualStyleBackColor = true;
		this.escoHV3CheckBox.AutoSize = true;
		this.escoHV3CheckBox.Checked = true;
		this.escoHV3CheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
		this.escoHV3CheckBox.Location = new System.Drawing.Point(116, 19);
		this.escoHV3CheckBox.Name = "escoHV3CheckBox";
		this.escoHV3CheckBox.Size = new System.Drawing.Size(47, 17);
		this.escoHV3CheckBox.TabIndex = 2;
		this.escoHV3CheckBox.Text = "HV3";
		this.escoHV3CheckBox.UseVisualStyleBackColor = true;
		this.escoHV2CheckBox.AutoSize = true;
		this.escoHV2CheckBox.Checked = true;
		this.escoHV2CheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
		this.escoHV2CheckBox.Location = new System.Drawing.Point(55, 19);
		this.escoHV2CheckBox.Name = "escoHV2CheckBox";
		this.escoHV2CheckBox.Size = new System.Drawing.Size(47, 17);
		this.escoHV2CheckBox.TabIndex = 1;
		this.escoHV2CheckBox.Text = "HV2";
		this.escoHV2CheckBox.UseVisualStyleBackColor = true;
		this.escoHV1CheckBox.AutoSize = true;
		this.escoHV1CheckBox.Checked = true;
		this.escoHV1CheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
		this.escoHV1CheckBox.Location = new System.Drawing.Point(5, 19);
		this.escoHV1CheckBox.Name = "escoHV1CheckBox";
		this.escoHV1CheckBox.Size = new System.Drawing.Size(47, 17);
		this.escoHV1CheckBox.TabIndex = 0;
		this.escoHV1CheckBox.Text = "HV1";
		this.escoHV1CheckBox.UseVisualStyleBackColor = true;
		this.groupBox10.Controls.Add(this.slotRadioButton);
		this.groupBox10.Controls.Add(this.msRadioButton);
		this.groupBox10.Controls.Add(this.maxLatencyTextBox);
		this.groupBox10.Location = new System.Drawing.Point(3, 57);
		this.groupBox10.Name = "groupBox10";
		this.groupBox10.Size = new System.Drawing.Size(142, 42);
		this.groupBox10.TabIndex = 1;
		this.groupBox10.TabStop = false;
		this.groupBox10.Text = "Max Latency (decimal)";
		this.slotRadioButton.AutoSize = true;
		this.slotRadioButton.Location = new System.Drawing.Point(91, 16);
		this.slotRadioButton.Name = "slotRadioButton";
		this.slotRadioButton.Size = new System.Drawing.Size(46, 17);
		this.slotRadioButton.TabIndex = 2;
		this.slotRadioButton.Text = "slots";
		this.slotRadioButton.UseVisualStyleBackColor = true;
		this.slotRadioButton.CheckedChanged += new System.EventHandler(slotRadioButton_CheckedChanged);
		this.msRadioButton.AutoSize = true;
		this.msRadioButton.Checked = true;
		this.msRadioButton.Location = new System.Drawing.Point(47, 16);
		this.msRadioButton.Name = "msRadioButton";
		this.msRadioButton.Size = new System.Drawing.Size(38, 17);
		this.msRadioButton.TabIndex = 1;
		this.msRadioButton.TabStop = true;
		this.msRadioButton.Text = "ms";
		this.msRadioButton.UseVisualStyleBackColor = true;
		this.msRadioButton.CheckedChanged += new System.EventHandler(msRadioButton_CheckedChanged);
		this.maxLatencyTextBox.Location = new System.Drawing.Point(6, 16);
		this.maxLatencyTextBox.Name = "maxLatencyTextBox";
		this.maxLatencyTextBox.Size = new System.Drawing.Size(34, 20);
		this.maxLatencyTextBox.TabIndex = 0;
		this.flowLayoutPanel1.Controls.Add(this.groupBox9);
		this.flowLayoutPanel1.Controls.Add(this.groupBox10);
		this.flowLayoutPanel1.Controls.Add(this.groupBox12);
		this.flowLayoutPanel1.Controls.Add(this.groupBox13);
		this.flowLayoutPanel1.Controls.Add(this.groupBox11);
		this.flowLayoutPanel1.Controls.Add(this.resetButton);
		this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
		this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
		this.flowLayoutPanel1.Name = "flowLayoutPanel1";
		this.flowLayoutPanel1.Size = new System.Drawing.Size(300, 320);
		this.flowLayoutPanel1.TabIndex = 8;
		base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.Controls.Add(this.flowLayoutPanel1);
		base.Name = "ESCOUserControl";
		base.Size = new System.Drawing.Size(300, 320);
		base.Load += new System.EventHandler(ESCOUserControl_Load);
		this.groupBox13.ResumeLayout(false);
		this.groupBox13.PerformLayout();
		this.groupBox12.ResumeLayout(false);
		this.groupBox12.PerformLayout();
		this.groupBox9.ResumeLayout(false);
		this.groupBox9.PerformLayout();
		this.groupBox11.ResumeLayout(false);
		this.groupBox11.PerformLayout();
		this.groupBox10.ResumeLayout(false);
		this.groupBox10.PerformLayout();
		this.flowLayoutPanel1.ResumeLayout(false);
		base.ResumeLayout(false);
	}
}
