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

namespace NPTGUI;

public class FormWLANMoreSettings : Form
{
	public delegate void UpdateInfoHandler(int GainIdx2G, int GainIdx5G, bool xLNAState2G, bool xLNAState5G);

	private IContainer components;

	private Label label1;

	private Label label2;

	private Label label3;

	private Label label4;

	private CheckBox chkbxXLNA2g;

	private CheckBox chkbxXLNA5g;

	private NumericUpDown numeric_2GGain;

	private NumericUpDown numeric_5GGain;

	private Label labelWarning;

	private Label label5;

	private GroupBox groupBox1;

	public event UpdateInfoHandler UpdateInfo;

	public FormWLANMoreSettings()
	{
		InitializeComponent();
		base.FormBorderStyle = FormBorderStyle.FixedSingle;
	}

	public void InitializeInfo(int GainIndex2G, int GainIndex5G, bool xLNA2G, bool xLNA5G)
	{
		numeric_2GGain.Value = GainIndex2G;
		numeric_5GGain.Value = GainIndex5G;
		chkbxXLNA2g.Checked = xLNA2G;
		chkbxXLNA5g.Checked = xLNA5G;
	}

	private void FormWLANMoreSettings_FormClosing(object sender, FormClosingEventArgs e)
	{
		this.UpdateInfo((int)numeric_2GGain.Value, (int)numeric_5GGain.Value, chkbxXLNA2g.Checked, chkbxXLNA5g.Checked);
	}

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

	private void InitializeComponent()
	{
		this.label1 = new System.Windows.Forms.Label();
		this.label2 = new System.Windows.Forms.Label();
		this.label3 = new System.Windows.Forms.Label();
		this.label4 = new System.Windows.Forms.Label();
		this.chkbxXLNA2g = new System.Windows.Forms.CheckBox();
		this.chkbxXLNA5g = new System.Windows.Forms.CheckBox();
		this.numeric_2GGain = new System.Windows.Forms.NumericUpDown();
		this.numeric_5GGain = new System.Windows.Forms.NumericUpDown();
		this.labelWarning = new System.Windows.Forms.Label();
		this.label5 = new System.Windows.Forms.Label();
		this.groupBox1 = new System.Windows.Forms.GroupBox();
		((System.ComponentModel.ISupportInitialize)this.numeric_2GGain).BeginInit();
		((System.ComponentModel.ISupportInitialize)this.numeric_5GGain).BeginInit();
		this.groupBox1.SuspendLayout();
		base.SuspendLayout();
		this.label1.AutoSize = true;
		this.label1.Location = new System.Drawing.Point(20, 59);
		this.label1.Name = "label1";
		this.label1.Size = new System.Drawing.Size(100, 13);
		this.label1.TabIndex = 4;
		this.label1.Text = "39xx 2G Gain Index";
		this.label2.AutoSize = true;
		this.label2.Location = new System.Drawing.Point(20, 86);
		this.label2.Name = "label2";
		this.label2.Size = new System.Drawing.Size(117, 13);
		this.label2.TabIndex = 5;
		this.label2.Text = "39xx 2G xLNA Enabled";
		this.label3.AutoSize = true;
		this.label3.Location = new System.Drawing.Point(20, 113);
		this.label3.Name = "label3";
		this.label3.Size = new System.Drawing.Size(100, 13);
		this.label3.TabIndex = 6;
		this.label3.Text = "39xx 5G Gain Index";
		this.label4.AutoSize = true;
		this.label4.Location = new System.Drawing.Point(20, 140);
		this.label4.Name = "label4";
		this.label4.Size = new System.Drawing.Size(117, 13);
		this.label4.TabIndex = 7;
		this.label4.Text = "39xx 5G xLNA Enabled";
		this.chkbxXLNA2g.AutoSize = true;
		this.chkbxXLNA2g.Location = new System.Drawing.Point(143, 86);
		this.chkbxXLNA2g.Name = "chkbxXLNA2g";
		this.chkbxXLNA2g.Size = new System.Drawing.Size(15, 14);
		this.chkbxXLNA2g.TabIndex = 8;
		this.chkbxXLNA2g.UseVisualStyleBackColor = true;
		this.chkbxXLNA5g.AutoSize = true;
		this.chkbxXLNA5g.Location = new System.Drawing.Point(143, 138);
		this.chkbxXLNA5g.Name = "chkbxXLNA5g";
		this.chkbxXLNA5g.Size = new System.Drawing.Size(15, 14);
		this.chkbxXLNA5g.TabIndex = 9;
		this.chkbxXLNA5g.UseVisualStyleBackColor = true;
		this.numeric_2GGain.Location = new System.Drawing.Point(143, 57);
		this.numeric_2GGain.Maximum = new decimal(new int[4] { 256, 0, 0, 0 });
		this.numeric_2GGain.Name = "numeric_2GGain";
		this.numeric_2GGain.Size = new System.Drawing.Size(62, 20);
		this.numeric_2GGain.TabIndex = 10;
		this.numeric_5GGain.Location = new System.Drawing.Point(143, 113);
		this.numeric_5GGain.Maximum = new decimal(new int[4] { 256, 0, 0, 0 });
		this.numeric_5GGain.Name = "numeric_5GGain";
		this.numeric_5GGain.Size = new System.Drawing.Size(62, 20);
		this.numeric_5GGain.TabIndex = 11;
		this.labelWarning.AutoSize = true;
		this.labelWarning.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 0);
		this.labelWarning.Location = new System.Drawing.Point(11, 16);
		this.labelWarning.Name = "labelWarning";
		this.labelWarning.Size = new System.Drawing.Size(343, 13);
		this.labelWarning.TabIndex = 12;
		this.labelWarning.Text = "NOTE: These values are not to be changed unless advised";
		this.label5.AutoSize = true;
		this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 0);
		this.label5.Location = new System.Drawing.Point(53, 30);
		this.label5.Name = "label5";
		this.label5.Size = new System.Drawing.Size(266, 13);
		this.label5.TabIndex = 13;
		this.label5.Text = "Using incorrect values will create invalid data";
		this.groupBox1.Controls.Add(this.label5);
		this.groupBox1.Controls.Add(this.labelWarning);
		this.groupBox1.Controls.Add(this.numeric_5GGain);
		this.groupBox1.Controls.Add(this.numeric_2GGain);
		this.groupBox1.Controls.Add(this.chkbxXLNA5g);
		this.groupBox1.Controls.Add(this.chkbxXLNA2g);
		this.groupBox1.Controls.Add(this.label4);
		this.groupBox1.Controls.Add(this.label3);
		this.groupBox1.Controls.Add(this.label2);
		this.groupBox1.Controls.Add(this.label1);
		this.groupBox1.Location = new System.Drawing.Point(10, 13);
		this.groupBox1.Name = "groupBox1";
		this.groupBox1.Size = new System.Drawing.Size(360, 177);
		this.groupBox1.TabIndex = 14;
		this.groupBox1.TabStop = false;
		this.groupBox1.Text = "WCN39xx Settings";
		base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.ClientSize = new System.Drawing.Size(387, 213);
		base.Controls.Add(this.groupBox1);
		base.Name = "FormWLANMoreSettings";
		base.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
		this.Text = "Advanced WLAN Settings";
		base.FormClosing += new System.Windows.Forms.FormClosingEventHandler(FormWLANMoreSettings_FormClosing);
		((System.ComponentModel.ISupportInitialize)this.numeric_2GGain).EndInit();
		((System.ComponentModel.ISupportInitialize)this.numeric_5GGain).EndInit();
		this.groupBox1.ResumeLayout(false);
		this.groupBox1.PerformLayout();
		base.ResumeLayout(false);
	}
}
