Example #1
0
 protected virtual void OnSpectrographData(SpectrographDataEventArgs e)
 {
     if (SpectrographData != null)
     {
         SpectrographData(this, e);
     }
 }
Example #2
0
        void source_SpectrographData(object sender, SpectrographDataEventArgs e)
        {
            if (InvokeRequired)
            {
                BeginInvoke(new EventHandler <SpectrographDataEventArgs>(source_SpectrographData), sender, e);
                return;
            }

            cachedImages.Add(CreateImage(e.Data));

            spectrPictureBox.Invalidate();

            if (activityToolStripProgressBar.Value < activityToolStripProgressBar.Maximum)
            {
                activityToolStripProgressBar.Value++;
            }
            else
            {
                activityToolStripProgressBar.Value = 0;
            }
        }