Beispiel #1
0
 protected override void WndProc(ref Message m)
 {
     base.WndProc(ref m);
     if (m.Msg == MessageID.SF_WAIT)
     {
         timer.Interval = 200;
     }
     if (m.Msg == MessageID.SF_CONTINUTE)
     {
         timer.Interval = 40;
     }
     if (m.Msg == MessageID.SPECTRUEME_SUCCED)
     {
         ISpectrumObj.GetSpectrumData();
     }
 }
Beispiel #2
0
        /// <summary>
        /// 获取频谱数据
        /// </summary>
        /// <returns></returns>
        private float GetSpeRev()
        {
            int   maxIndex = 0;
            float max      = float.MinValue;

            PointF[] PaintPointFs = (PointF[])ISpectrumObj.GetSpectrumData();
            for (int i = 0; i < PaintPointFs.Length; i++)
            {
                if (PaintPointFs[i].Y > max)
                {
                    max      = PaintPointFs[i].Y;
                    maxIndex = i;
                }
            }

            max = OffsetSpec(PaintPointFs[maxIndex].X, PaintPointFs[maxIndex].Y);
            return(max);
        }