Beispiel #1
0
        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();
            }
        }
Beispiel #2
0
        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();
        }