context: //=================================================================
  // DSPTestForm.cs
  //=================================================================
  // PowerSDR is a C# implementation of a Software Defined Radio.
  // Copyright (C) 2004-2009  FlexRadio Systems
  //
  // This program is free software; you can redistribute it and/or
  // modify it under the terms of the GNU General Public License
  // as published by the Free Software Foundation; either version 2
  // of the License, or (at your option) any later version.
  //
  // This program is distributed in the hope that it will be useful,
  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  // GNU General Public License for more details.
  //
  // You should have received a copy of the GNU General Public License
  // along with this program; if not, write to the Free Software
  // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  //
  // You may contact us via email at: sales@flex-radio.com.
  // Paper mail may be sent to: 
  //    FlexRadio Systems
  //    8900 Marybank Dr.
  //    Austin, TX 78750
  //    USA
  //=================================================================
  
  using System;
  using System.Drawing;
  using System.Collections;
  using System.ComponentModel;
  using System.Windows.Forms;
  
  namespace PowerSDR
  {
  	unsafe public class DSPTestForm : System.Windows.Forms.Form
  	{
  		private Console console;
  		private System.Windows.Forms.CheckBox chkMu;
  		private System.Windows.Forms.GroupBox grpWBIQ;
  		private System.Windows.Forms.NumericUpDown udMu;
  		private System.Windows.Forms.GroupBoxTS grpDSPLMSNR;
  		private System.Windows.Forms.LabelTS lblLMSNRLeak;
  		private System.Windows.Forms.NumericUpDownTS udLMSNRLeak;
  		private System.Windows.Forms.LabelTS lblLMSNRgain;
  		private System.Windows.Forms.NumericUpDownTS udLMSNRgain;
  		private System.Windows.Forms.NumericUpDownTS udLMSNRdelay;
  		private System.Windows.Forms.LabelTS lblLMSNRdelay;
  		private System.Windows.Forms.NumericUpDownTS udLMSNRtaps;
  		private System.Windows.Forms.LabelTS lblLMSNRtaps;
  		private System.Windows.Forms.GroupBoxTS grpDSPLMSANF;
  		private System.Windows.Forms.LabelTS lblLMSANFLeak;
  		private System.Windows.Forms.NumericUpDownTS udLMSANFLeak;
  		private System.Windows.Forms.LabelTS lblLMSANFgain;
  		private System.Windows.Forms.NumericUpDownTS udLMSANFgain;
  		private System.Windows.Forms.LabelTS lblLMSANFdelay;
  		private System.Windows.Forms.NumericUpDownTS udLMSANFdelay;
  		private System.Windows.Forms.LabelTS lblLMSANFTaps;
  		private System.Windows.Forms.NumericUpDownTS udLMSANFtaps;
  		private System.Windows.Forms.CheckBox checkBoxIQEnable;
  		private System.Windows.Forms.Button btnSAMPLL;
  		private System.Windows.Forms.TextBox txtSAMPLL;
  		private System.Windows.Forms.TextBox txtIQWReal;
  		private System.Windows.Forms.Button btnIQW;
  		private System.Windows.Forms.TextBox txtIQWImag;
  		private System.ComponentModel.Container components = null;
  
  		public DSPTestForm(Console c)
  		{
  			InitializeComponent();
  			console = c;
  		}
  
  		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.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(DSPTestForm));
  			this.chkMu = new System.Windows.Forms.CheckBox();
  			this.grpWBIQ = new System.Windows.Forms.GroupBox();
  			this.checkBoxIQEnable = new System.Windows.Forms.CheckBox();
  			this.udMu = new System.Windows.Forms.NumericUpDown();
  			this.grpDSPLMSNR = new System.Windows.Forms.GroupBoxTS();
  			this.lblLMSNRLeak = new System.Windows.Forms.LabelTS();
  			this.udLMSNRLeak = new System.Windows.Forms.NumericUpDownTS();
  			this.lblLMSNRgain = new System.Windows.Forms.LabelTS();
  			this.udLMSNRgain = new System.Windows.Forms.NumericUpDownTS();
  			this.udLMSNRdelay = new System.Windows.Forms.NumericUpDownTS();
  			this.lblLMSNRdelay = new System.Windows.Forms.LabelTS();
  			this.udLMSNRtaps = new System.Windows.Forms.NumericUpDownTS();
  			this.lblLMSNRtaps = new System.Windows.Forms.LabelTS();
  			this.grpDSPLMSANF = new System.Windows.Forms.GroupBoxTS();
  			this.lblLMSANFLeak = new System.Windows.Forms.LabelTS();
  			this.udLMSANFLeak = new System.Windows.Forms.NumericUpDownTS();
  			this.lblLMSANFgain = new System.Windows.Forms.LabelTS();
  			this.udLMSANFgain = new System.Windows.Forms.NumericUpDownTS();
  			this.lblLMSANFdelay = new System.Windows.Forms.LabelTS();
  			this.udLMSANFdelay = new System.Windows.Forms.NumericUpDownTS();
  			this.lblLMSANFTaps = new System.Windows.Forms.LabelTS();
  			this.udLMSANFtaps = new System.Windows.Forms.NumericUpDownTS();
  			this.btnSAMPLL = new System.Windows.Forms.Button();
  			this.txtSAMPLL = new System.Windows.Forms.TextBox();
  			this.txtIQWReal = new System.Windows.Forms.TextBox();
  			this.btnIQW = new System.Windows.Forms.Button();
  			this.txtIQWImag = new System.Windows.Forms.TextBox();
  			this.grpWBIQ.SuspendLayout();
  			((System.ComponentModel.ISupportInitialize)(this.udMu)).BeginInit();
  			this.grpDSPLMSNR.SuspendLayout();
  			((System.ComponentModel.ISupportInitialize)(this.udLMSNRLeak)).BeginInit();
  			((System.ComponentModel.ISupportInitialize)(this.udLMSNRgain)).BeginInit();
  			((System.ComponentModel.ISupportInitialize)(this.udLMSNRdelay)).BeginInit();
  			((System.ComponentModel.ISupportInitialize)(this.udLMSNRtaps)).BeginInit();
  			this.grpDSPLMSANF.SuspendLayout();
  			((System.ComponentModel.ISupportInitialize)(this.udLMSANFLeak)).BeginInit();
  			((System.ComponentModel.ISupportInitialize)(this.udLMSANFgain)).BeginInit();
  			((System.ComponentModel.ISupportInitialize)(this.udLMSANFdelay)).BeginInit();
  			((System.ComponentModel.ISupportInitialize)(this.udLMSANFtaps)).BeginInit();
  			this.SuspendLayout();
  			// 
  			// chkMu
  			// 
  			this.chkMu.Appearance = System.Windows.Forms.Appearance.Button;
  			this.chkMu.Location = new System.Drawing.Point(8, 24);
  			this.chkMu.Name = "chkMu";
  			this.chkMu.Size = new System.Drawing.Size(48, 24);
  			this.chkMu.TabIndex = 0;
  			this.chkMu.Text = "Mu";
  			this.chkMu.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  			this.chkMu.CheckedChanged += new System.EventHandler(this.chkMu_CheckedChanged);
  			// 
  			// grpWBIQ
  			// 
  			this.grpWBIQ.Controls.Add(this.checkBoxIQEnable);
  			this.grpWBIQ.Controls.Add(this.udMu);
  			this.grpWBIQ.Controls.Add(this.chkMu);
  			this.grpWBIQ.Location = new System.Drawing.Point(8, 8);
  			this.grpWBIQ.Name = "grpWBIQ";
  			this.grpWBIQ.Size = new System.Drawing.Size(272, 64);
  			this.grpWBIQ.TabIndex = 1;
  			this.grpWBIQ.TabStop = false;
  			this.grpWBIQ.Text = "WBIQ";
  			// 
  			// checkBoxIQEnable
  			// 
  			this.checkBoxIQEnable.Location = new System.Drawing.Point(176, 24);
  			this.checkBoxIQEnable.Name = "checkBoxIQEnable";
  			this.checkBoxIQEnable.Size = new System.Drawing.Size(80, 24);
  			this.checkBoxIQEnable.TabIndex = 2;
  			this.checkBoxIQEnable.Text = "IQ disable";
  			this.checkBoxIQEnable.CheckedChanged += new System.EventHandler(this.checkBoxIQEnable_CheckedChanged);
  			// 
  			// udMu
  			// 
  			this.udMu.DecimalPlaces = 8;
  			this.udMu.Increment = new System.Decimal(new int[] {
  																   1,
  																   0,
  																   0,
  																   327680});
  			this.udMu.Location = new System.Drawing.Point(80, 24);
  			this.udMu.Maximum = new System.Decimal(new int[] {
  																 1,
  																 0,
  																 0,
  																 0});
  			this.udMu.Name = "udMu";
  			this.udMu.Size = new System.Drawing.Size(80, 20);
  			this.udMu.TabIndex = 1;
  			this.udMu.Value = new System.Decimal(new int[] {
  															   5,
  															   0,
  															   0,
  															   196608});
  			this.udMu.ValueChanged += new System.EventHandler(this.udMu_ValueChanged);
  			// 
  			// grpDSPLMSNR
  			// 
  			this.grpDSPLMSNR.Controls.Add(this.lblLMSNRLeak);
  			this.grpDSPLMSNR.Controls.Add(this.udLMSNRLeak);
  			this.grpDSPLMSNR.Controls.Add(this.lblLMSNRgain);
  			this.grpDSPLMSNR.Controls.Add(this.udLMSNRgain);
  			this.grpDSPLMSNR.Controls.Add(this.udLMSNRdelay);
  			this.grpDSPLMSNR.Controls.Add(this.lblLMSNRdelay);
  			this.grpDSPLMSNR.Controls.Add(this.udLMSNRtaps);
  			this.grpDSPLMSNR.Controls.Add(this.lblLMSNRtaps);
  			this.grpDSPLMSNR.Location = new System.Drawing.Point(8, 80);
  			this.grpDSPLMSNR.Name = "grpDSPLMSNR";
  			this.grpDSPLMSNR.Size = new System.Drawing.Size(112, 128);
  			this.grpDSPLMSNR.TabIndex = 35;
  			this.grpDSPLMSNR.TabStop = false;
  			this.grpDSPLMSNR.Text = "NR";
  			// 
  			// lblLMSNRLeak
  			// 
  			this.lblLMSNRLeak.Image = null;
  			this.lblLMSNRLeak.Location = new System.Drawing.Point(8, 96);
  			this.lblLMSNRLeak.Name = "lblLMSNRLeak";
  			this.lblLMSNRLeak.Size = new System.Drawing.Size(40, 16);
  			this.lblLMSNRLeak.TabIndex = 11;
  			this.lblLMSNRLeak.Text = "Leak:";
  			// 
  			// udLMSNRLeak
  			// 
  			this.udLMSNRLeak.Enabled = false;
  			this.udLMSNRLeak.Increment = new System.Decimal(new int[] {
  																		  10,
  																		  0,
  																		  0,
  																		  0});
  			this.udLMSNRLeak.Location = new System.Drawing.Point(56, 96);
  			this.udLMSNRLeak.Maximum = new System.Decimal(new int[] {
  																		1000,
  																		0,
  																		0,
  																		0});
  			this.udLMSNRLeak.Minimum = new System.Decimal(new int[] {
  																		1,
  																		0,
  																		0,
  																		0});
  			this.udLMSNRLeak.Name = "udLMSNRLeak";
  			this.udLMSNRLeak.Size = new System.Drawing.Size(48, 20);
  			this.udLMSNRLeak.TabIndex = 10;
  			this.udLMSNRLeak.Value = new System.Decimal(new int[] {
  																	  10,
  																	  0,
  																	  0,
  																	  0});
  			this.udLMSNRLeak.ValueChanged += new System.EventHandler(this.udLMSNR_ValueChanged);
  			// 
  			// lblLMSNRgain
  			// 
  			this.lblLMSNRgain.Image = null;
  
gt: 			this.lblLMSNRgain.Location = new System.Drawing.Point(8, 72);