private void init() { InitializeComponent(); int ymax = Height; if (channels < 4) { ioD.Hide(); ymax = ioD.Location.Y; } if (channels < 3) { ioC.Hide(); ymax = ioC.Location.Y; } if (channels < 2) { ioB.Hide(); ymax = ioB.Location.Y; } Height = ymax; bnDisplayWin.buttonStateChanged += BnDisplayWin_buttonStateChanged; ow = null; processingType = ProcessingType.Sink; }
public override void Disconnect() { base.Disconnect(); if (ow != null) { ow.CanClose = true; ow.Close(); ow.oscilloscope = null; ow = null; } }
private void BnDisplayWin_buttonStateChanged(object sender, EventArgs e) { if (ow == null) { ow = new OscilloscopeWin(); ow.initOscilloscope(this, channels, owner.sampleRate / 2); ow.Show(); } else { ow.Show(); } }
public void initOscilloscopeScreen(OscilloscopeWin _root, int _channels, OscilloscopeWin.OscilloscopeLine[] _lines) { root = _root; lines = _lines; channels = _channels; }