public override void Closed() { base.Closed(); PhidgetLEDBoard board = Interface as PhidgetLEDBoard; if (board != null) { foreach (LEDGroup group in board.LedGroups) { board.SetGroupPower(group, false); } board.Detach(); } }
private void EditorGotFocus(object sender, RoutedEventArgs e) { PhidgetLEDBoard board = Interface as PhidgetLEDBoard; LedGroupViewModel model = LedGroupListBox.SelectedItem as LedGroupViewModel; foreach (LEDGroup group in board.LedGroups) { board.SetGroupPower(group, false); } if (model != null) { model.Group.Level = model.Group.DefaultLevel; } SetLeds(); }