Ejemplo n.º 1
0
 public override void Disconnect()
 {
     base.Disconnect();
     if (ow != null)
     {
         ow.CanClose = true;
         ow.Close();
         ow.spectrumAnalyzer = null;
         ow = null;
     }
 }
Ejemplo n.º 2
0
 private void BnDisplayWin_buttonStateChanged(object sender, EventArgs e)
 {
     if (ow == null)
     {
         ow = new SpectrumAnalyzerWin();
         ow.initSpectrumAnalyzer(this, channels, owner.sampleRate / 2);
         ow.Show();
     }
     else
     {
         ow.Show();
     }
 }
        public void initSpectrumAnalyzerScreen(SpectrumAnalyzerWin _root, int _channels,
                                               SinkSource.SpectrumAnalyzerWin.SpectrumAnalyzerLine[] _lines)
        {
            root  = _root;
            lines = _lines;

            sizeXLable = GraphicsUtil.sizeText(Vector.Zero, _axesFont, 1.0, "100k", -1, 2, -1, 0, Vector.X).boundingDim();
            sizeYLable = GraphicsUtil.sizeText(Vector.Zero, _axesFont, 1.0, "-120.0", -1, 2, -1, 0, Vector.X).boundingDim();

            gridF = new GridCalculator(0, 1e6, 10, 0.1, 2, 100, 20000, false,
                                       sizeXLable.x + 10, Width - 10, sizeXLable.x + 10);
            gridY = new GridCalculator(-200, 200, 1, 1e-10, 1.1, -120, 0, false,
                                       Height - sizeXLable.y - 10, 10, sizeYLable.y + 10);

            channels = _channels;

            reCalcF();
        }