private void ReadingChanged(object sender, ReadingChangedEventArgs e) { if (FirstReading) { FirstReading = false; OutputLabel.Text = "Connected to SNP OPM"; } ReadingLabel.Text = e.reading.DisplayValue + " " + e.reading.DisplayWavelength; ReadingFrame.BorderColor = e.reading.ToneDetected == "None" ? (Color)Application.Current.Resources["Green"] : (Color)Application.Current.Resources["DarkGray"]; if (e.reading.ToneDetected != "" && e.reading.ToneDetected != "None") { ToneLabel.TextColor = Color.Red; ToneLabel.Text = "Tone:" + e.reading.ToneDetected; } else { ToneLabel.TextColor = Color.White; ToneLabel.Text = "Tone:None"; } }
protected void NotifyReadingChanged(ReadingChangedEventArgs e) { if (ReadingChanged != null) ReadingChanged(this, e); }