示例#1
0
        public void EmptySlot(int slotIndex)
        {
            if (slotIndex < 0 || slotIndex >= MaxNumConnectedDevices)
            {
                return;
            }

            var eventArgs = new SlotEventArgs(_deviceSlots[slotIndex]);

            RaiseDeviceWillBeRemovedEvent(eventArgs);
            _deviceSlots[slotIndex].EmptySlot();
            RaiseDeviceRemovedEvent(new SlotEventArgs(_deviceSlots[slotIndex]));
        }
示例#2
0
 private void RaiseBatteryInfoChangedEvent(SlotEventArgs e)
 {
     BatteryInfoChanged?.Invoke(this, e);
 }
示例#3
0
 private void RaiseSessionInfoChangedEvent(SlotEventArgs e)
 {
     SessionInfoChanged?.Invoke(this, e);
 }
示例#4
0
 private void RaiseDeviceWillBeRemovedEvent(SlotEventArgs e)
 {
     DeviceWillBeRemoved?.Invoke(this, e);
 }
示例#5
0
 private void RaiseDeviceAddedEvent(SlotEventArgs e)
 {
     DeviceAdded?.Invoke(this, e);
 }