예제 #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();
            }
        }
예제 #2
0
        protected override void OnInterfaceChanged(HeliosInterface oldInterface, HeliosInterface newInterface)
        {
            PhidgetLEDBoard oldBoard = oldInterface as PhidgetLEDBoard;

            if (oldBoard != null)
            {
                oldBoard.Detach();
            }

            PhidgetLEDBoard newBoard = newInterface as PhidgetLEDBoard;

            if (newBoard != null)
            {
                newBoard.Attach();
            }

            GroupsViewModel = new LedGroupsViewModel(newInterface as PhidgetLEDBoard);
        }