private void viewUpdateTimer_Tick(object sender, EventArgs e) { if (readingsQueue.Count > 0 || passingsQueue.Count > 0) { while (readingsQueue.Count != 0) { TagInfo tagInfo = readingsQueue.GetNext(); TagReading reading = new TagReading(); reading.Antenna = (short)tagInfo.Antenna; reading.Frequency = tagInfo.Frequency; reading.SignalStrength = tagInfo.SignalStrenth; reading.Tag = tagInfo.ID.Value; reading.Time = tagInfo.Time; tagReadingBindingSource.Add(reading); } while (passingsQueue.Count != 0) { TagInfo tagInfo = passingsQueue.GetNext(); Passing passing = new Passing(); passing.Tag = tagInfo.ID.Value; passing.PassingTime = tagInfo.Time; passing.ReadingNumber = -1; passing.Lap = -1; passingBindingSource.Add(passing); } database.SubmitChanges(); passingDataGridView.Invalidate(); tagReadingDataGridView.Invalidate(); } }
partial void UpdateTagReading(TagReading instance);
partial void DeleteTagReading(TagReading instance);
partial void InsertTagReading(TagReading instance);