Esempio n. 1
0
        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();
            }
        }
Esempio n. 2
0
 partial void UpdateTagReading(TagReading instance);
Esempio n. 3
0
 partial void DeleteTagReading(TagReading instance);
Esempio n. 4
0
 partial void InsertTagReading(TagReading instance);