Exemplo n.º 1
0
        private void init()
        {
            InitializeComponent();

            int h = Height;

            if (channels < 8)
            {
                ioB8.Hide(); h = ioB8.Location.Y;
            }
            if (channels < 7)
            {
                ioB7.Hide(); h = ioB7.Location.Y;
            }
            if (channels < 6)
            {
                ioB6.Hide(); h = ioB6.Location.Y;
            }
            if (channels < 5)
            {
                ioB5.Hide(); h = ioB5.Location.Y;
            }
            if (channels < 4)
            {
                ioB4.Hide(); h = ioB4.Location.Y;
            }
            if (channels < 3)
            {
                ioB3.Hide(); h = ioB3.Location.Y;
            }
            if (channels < 2)
            {
                ioB2.Hide(); h = ioB2.Location.Y;
            }
            if (channels == 1)
            {
                ioB1.title = "B";
            }
            Height = h;

            bnDisplayWin.buttonStateChanged += BnDisplayWin_buttonStateChanged;

            ow = null;

            vnaState = VNAState.Idle;
            running  = false;
            step     = 0;
            phi      = 0;

            BSINint = new double[channels];
            BCOSint = new double[channels];

            dataFifo = new DataPointFifo(32);

            processingType = ProcessingType.Sink;
        }
Exemplo n.º 2
0
 public override void Disconnect()
 {
     base.Disconnect();
     if (ow != null)
     {
         ow.CanClose = true;
         ow.Close();
         ow.vna = null;
         ow     = null;
     }
 }
Exemplo n.º 3
0
 private void BnDisplayWin_buttonStateChanged(object sender, EventArgs e)
 {
     if (ow == null)
     {
         ow = new VNAWin();
         ow.initVNA(this);
         ow.Show();
     }
     else
     {
         ow.Show();
     }
 }