void setStatus(DataRow row, SystemStatus status, string columnName) { statusGrid.ifVisible(row, () => { if (status != SystemStatus.UNKNOWN) { statusGrid.makeWhite(row); } Action <Brush> setColor = color => makeColor(row, columnName, color); switch (status) { case SystemStatus.GREEN: setColor(Brushes.SpringGreen); break; case SystemStatus.YELLOW: setColor(Brushes.Yellow); break; case SystemStatus.RED: setColor(Brushes.Red); break; case SystemStatus.UNKNOWN: statusGrid.makeColor(row, Brushes.Silver); break; default: throw Bomb.toss("unknown status " + status); } }); }
void unloadInstanceRow(DataRow row) { instanceGrid.makeWhite(row); }
void unloadOrderRow(DataRow row) { orderGrid.makeWhite(row); orderTimers.remove(row); }