private void ReadingQueueDataPool(object _) { while (true) { while (renderDelayTime == -1) { Thread.Sleep(1); } byte[] disData = P543.GetAndReset(); Dispatcher.Invoke(() => { Print(disData); }); Thread.Sleep(renderDelayTime); } }
private void Print(byte[] disData) { // каждый разряд for (int i = 0; i < P543.TOTAL_DISCHARGE_COUNT; i++) { // каждый сегмент for (int j = discharges[i].Length - 1; j >= 0; j--) { if (discharges[i][j] == null) { continue; } if (P543.IsBitSet(disData[i], j)) { discharges[i][j].Show(); } else { discharges[i][j].HideSmooth(); } } } }