private void nmeaInterpreter1_SentenceReceived(object sender, NmeaSentenceEventArgs e) { BeginInvoke(new MethodInvoker(delegate { if (sentenceListBox.Items.Count >= 100) { sentenceListBox.Items.RemoveAt(0); } sentenceListBox.Items.Add(e.Sentence.ToString()); sentenceListBox.SelectedIndex = sentenceListBox.Items.Count - 1; statusLabel.Text = "Receiving GPS data."; })); }
private void nmeaInterpreter1_SentenceReceived(object sender, NmeaSentenceEventArgs e) { BeginInvoke(new MethodInvoker(delegate { if (sentenceListBox.Items.Count >= 100) sentenceListBox.Items.RemoveAt(0); sentenceListBox.Items.Add(e.Sentence.ToString()); sentenceListBox.SelectedIndex = sentenceListBox.Items.Count - 1; statusLabel.Text = "Receiving GPS data."; })); }