Ejemplo n.º 1
0
 private void clearButton_Click(object sender, EventArgs e)
 {
     while (_displayPackets.Count > 0)
     {
         var firstItem = _displayPackets.Dequeue();
         DGV.RemoveObject(firstItem);
     }
 }
Ejemplo n.º 2
0
        private void DGVUpdate(IPDisplayPacket packet)
        {
            // Remove rows if there are too many
            if (DGV.Items.Count > _maxBuffer)
            {
                var firstItem = _displayPackets.Dequeue();
                DGV.RemoveObject(firstItem);
            }

            _displayPackets.Enqueue(packet);
            DGV.AddObject(packet);
        }