private void EditorLostFocus(object sender, RoutedEventArgs e) { PhidgetLEDBoard board = Interface as PhidgetLEDBoard; for (int i = 0; i < 64; i++) { board.SetLedPower(i, 0); } }
private void SetLeds() { PhidgetLEDBoard board = Interface as PhidgetLEDBoard; LedGroupViewModel model = LedGroupListBox.SelectedItem as LedGroupViewModel; for (int i = 0; i < 64; i++) { int level = 0; if (model != null && model.Group.Leds.Contains(i)) { level = model.Group.DefaultLevel; } board.SetLedPower(i, level); } }