private void DeviceAdded(object sender, Shared.Interop.DeviceManagement.DeviceChangeEventArgs e)
 {
     if (!AvailableDevicePorts.Contains(e.Name))
     {
         var ltoFlashViewModel = CompositionHelpers.Container.GetExportedValueOrDefault <LtoFlashViewModel>();
         if (ltoFlashViewModel.IsLtoFlashSerialPort(INTV.Core.Model.Device.Connection.CreatePseudoConnection(e.Name, e.Type)))
         {
             AvailableDevicePorts.Add(e.Name);
         }
     }
     CommandManager.InvalidateRequerySuggested();
 }
 private void AvailableDevicePortsCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     if (!AvailableDevicePorts.Any())
     {
         SelectedDevice = null;
     }
     else
     {
         Message        = string.Format(System.Globalization.CultureInfo.CurrentCulture, Resources.Strings.ConnectToDevice_Message_Format, AvailableDevicePorts.First());
         SelectedDevice = AvailableDevicePorts.First();
     }
 }
 private void DeviceRemoved(object sender, Shared.Interop.DeviceManagement.DeviceChangeEventArgs e)
 {
     AvailableDevicePorts.Remove(e.Name);
     CommandManager.InvalidateRequerySuggested();
 }