public static void OnDriveChanged(DriveEventArgs e)
        {
            var handler = DriveChanged;

            if (handler != null)
            {
                handler(null, e);
            }
        }
 public static void OnDriveChanged(DriveEventArgs e)
 {
     var handler = DriveChanged;
     if (handler != null) handler(null, e);
 }
 /// <summary>
 /// Обновляет коллекцию табов в соответстивии с Drive Scaner
 /// </summary>
 /// <param name="sender">DriveEventArgs</param>
 /// <param name="e">DriveScaner - не используется</param>
 private void DriveChanged(object sender, DriveEventArgs e)
 {
     switch (e.Action)
     {
         case DeviceAction.AddDevice:
             Dispatcher.Invoke(new Action(() => AddDevice(e.DriveName)), null);
             break;
         case DeviceAction.RemoveDevice:
             Dispatcher.Invoke(new Action(() => RemoveDevice(e.ListPosition)), null);
             break;
     }
 }
 public void OnDriveSelected(DriveEventArgs e)
 {
     var handler = DriveSelected;
     if (handler != null) handler(this, e);
 }
 /// <summary>
 /// Event on TabItem clicked - it open root;
 /// </summary>
 /// <param name="sender">TabItem</param>
 /// <param name="e">RoutedEventArgs</param>
 private void DriveTabDriveSelected(object sender, DriveEventArgs e)
 {
     if (_fileSystem.DirectoryExists(e.DriveName))
     {
         CurrentPath = e.DriveName;
     }
     else
         if (Windows.Dialogs.MessageBox.ShowDialog(
                String.Format(
                    "Диск {0,3} не найден.\n\nПерейти на системный диск {1} ?",
                    CurrentDrive,
                    Environment.SystemDirectory.Substring(0, 3)
                    ),
                "Ultimate Commander - Подсистема доступа",
                MessageBoxButton.YesNo) == true)
         {
             CurrentPath = Environment.SystemDirectory.Substring(0, 3);
             CurrentDrive = CurrentPath;
         }
 }