static void freq_Count(object sender, FrequencyCounterCountEventArgs e)
 {
     Console.WriteLine("Counts on {0}: {1} in {2} - Freq: {3}Hz", e.Index, e.Counts, e.Time, ((FrequencyCounter)sender).inputs[e.Index].Frequency);
 }
Example #2
0
        void freqCounter_Count(object sender, FrequencyCounterCountEventArgs e)
        {
            if (e.Index == channelCmb.SelectedIndex)
            {
                try
                {
                    freqTxt.Text = freqCounter.inputs[e.Index].Frequency.ToString("f4");
                }
                catch { }

                timeTxt.Text = (e.Time / 1000.0).ToString("f2");
                countTxt.Text = e.Counts.ToString();

                totalTimeTxt.Text = (freqCounter.inputs[channelCmb.SelectedIndex].TotalTime / 1000.0).ToString("f2");
                totalCntTxt.Text = freqCounter.inputs[channelCmb.SelectedIndex].TotalCount.ToString();
            }
        }