Index: /branches/eraser6/pluginsRewrite/Eraser.DefaultPlugins/ErasureTargets/RecycleBinErasureTargetConfigurer.cs
===================================================================
--- /branches/eraser6/pluginsRewrite/Eraser.DefaultPlugins/ErasureTargets/RecycleBinErasureTargetConfigurer.cs	(revision 2450)
+++ /branches/eraser6/pluginsRewrite/Eraser.DefaultPlugins/ErasureTargets/RecycleBinErasureTargetConfigurer.cs	(revision 2451)
@@ -25,4 +25,5 @@
 using System.Text;
 using System.Text.RegularExpressions;
+using System.IO;
 
 using Eraser.Util;
@@ -32,13 +33,14 @@
 namespace Eraser.DefaultPlugins
 {
-	class RecycleBinErasureTargetConfigurer : IErasureTargetConfigurer
+	class RecycleBinErasureTargetConfigurer : IErasureTargetConfigurer,
+		IDragAndDropConfigurer<IErasureTarget>
 	{
 		#region IConfigurer<ErasureTarget> Members
 
-		public void LoadFrom(ErasureTarget target)
+		public void LoadFrom(IErasureTarget target)
 		{
 		}
 
-		public bool SaveTo(ErasureTarget target)
+		public bool SaveTo(IErasureTarget target)
 		{
 			return true;
@@ -69,4 +71,33 @@
 
 		#endregion
+
+		#region IDragAndDropConfigurer<IErasureTarget> Members
+
+		public ICollection<IErasureTarget> ProcessArgument(System.Windows.Forms.DragEventArgs e)
+		{
+			//Then try to see if we have shell locations dropped on us.
+			if (e.Data.GetDataPresent("Shell IDList Array"))
+			{
+				MemoryStream stream = (MemoryStream)e.Data.GetData("Shell IDList Array");
+				byte[] buffer = new byte[stream.Length];
+				stream.Read(buffer, 0, buffer.Length);
+				ShellCIDA cida = new ShellCIDA(buffer);
+
+				if (cida.cidl > 0)
+				{
+					for (int i = 1; i <= cida.cidl; ++i)
+					{
+						if (cida.aoffset[i].Guid == Shell.KnownFolderIDs.RecycleBin)							
+						{
+							return new IErasureTarget[] { new RecycleBinErasureTarget() };
+						}
+					}
+				}
+			}
+
+			return new IErasureTarget[0];
+		}
+
+		#endregion
 	}
 }
Index: /branches/eraser6/pluginsRewrite/Eraser.DefaultPlugins/ErasureTargets/FileSystemObjectErasureTarget.cs
===================================================================
--- /branches/eraser6/pluginsRewrite/Eraser.DefaultPlugins/ErasureTargets/FileSystemObjectErasureTarget.cs	(revision 2450)
+++ /branches/eraser6/pluginsRewrite/Eraser.DefaultPlugins/ErasureTargets/FileSystemObjectErasureTarget.cs	(revision 2451)
@@ -42,5 +42,5 @@
 	/// </summary>
 	[Serializable]
-	public abstract class FileSystemObjectErasureTarget : ErasureTarget
+	public abstract class FileSystemObjectErasureTarget : IErasureTarget
 	{
 		#region Serialization code
@@ -174,5 +174,5 @@
 		public string Path { get; set; }
 
-		public sealed override ErasureMethod EffectiveMethod
+		public sealed override IErasureMethod EffectiveMethod
 		{
 			get
@@ -241,5 +241,5 @@
 
 			//Get the filesystem provider to handle the secure file erasures
-			FileSystem fsManager = Host.Instance.FileSystems[
+			IFileSystem fsManager = Host.Instance.FileSystems[
 				VolumeInfo.FromMountPoint(info.DirectoryName)];
 
@@ -249,5 +249,5 @@
 			{
 				//Update the task progress
-				ErasureMethod method = EffectiveMethod;
+				IErasureMethod method = EffectiveMethod;
 				OnProgressChanged(this, new ProgressChangedEventArgs(progress,
 					new TaskProgressChangedEventArgs(info.FullName, 0, method.Passes)));
@@ -258,5 +258,5 @@
 
 				//Define the callback function for progress reporting.
-				ErasureMethod.ErasureMethodProgressFunction callback =
+				IErasureMethod.ErasureMethodProgressFunction callback =
 					delegate(long lastWritten, long totalData, int currentPass)
 					{
@@ -303,6 +303,6 @@
 		/// <param name="info">The stream to erase.</param>
 		/// <param name="callback">The erasure progress callback.</param>
-		private void TryEraseStream(FileSystem fsManager, ErasureMethod method, StreamInfo info,
-			ErasureMethod.ErasureMethodProgressFunction callback)
+		private void TryEraseStream(IFileSystem fsManager, IErasureMethod method, StreamInfo info,
+			IErasureMethod.ErasureMethodProgressFunction callback)
 		{
 			for (int i = 0; ; ++i)
@@ -384,5 +384,5 @@
 				List<string> entries = new List<string>(
 					ManagerLibrary.Settings.PlausibleDeniabilityFiles);
-				Prng prng = Host.Instance.Prngs.ActivePrng;
+				IPrng prng = Host.Instance.Prngs.ActivePrng;
 				do
 				{
Index: /branches/eraser6/pluginsRewrite/Eraser.DefaultPlugins/ErasureTargets/FolderErasureTargetConfigurer.cs
===================================================================
--- /branches/eraser6/pluginsRewrite/Eraser.DefaultPlugins/ErasureTargets/FolderErasureTargetConfigurer.cs	(revision 2450)
+++ /branches/eraser6/pluginsRewrite/Eraser.DefaultPlugins/ErasureTargets/FolderErasureTargetConfigurer.cs	(revision 2451)
@@ -33,9 +33,11 @@
 
 using Eraser.Util;
+using Eraser.Plugins;
 using Eraser.Plugins.ExtensionPoints;
 
 namespace Eraser.DefaultPlugins
 {
-	public partial class FolderErasureTargetConfigurer : UserControl, IErasureTargetConfigurer
+	public partial class FolderErasureTargetConfigurer : UserControl,
+		IErasureTargetConfigurer, IDragAndDropConfigurer<IErasureTarget>
 	{
 		public FolderErasureTargetConfigurer()
@@ -47,5 +49,5 @@
 		#region IConfigurer<ErasureTarget> Members
 
-		public void LoadFrom(ErasureTarget target)
+		public void LoadFrom(IErasureTarget target)
 		{
 			FolderErasureTarget folder = target as FolderErasureTarget;
@@ -60,5 +62,5 @@
 		}
 
-		public bool SaveTo(ErasureTarget target)
+		public bool SaveTo(IErasureTarget target)
 		{
 			FolderErasureTarget folder = target as FolderErasureTarget;
@@ -143,4 +145,28 @@
 		#endregion
 
+		#region IDragAndDropConfigurer<IErasureTarget> Members
+
+		public ICollection<IErasureTarget> ProcessArgument(DragEventArgs e)
+		{
+			List<string> files = e.Data.GetDataPresent(DataFormats.FileDrop) ?
+				new List<string>((string[])e.Data.GetData(DataFormats.FileDrop, false)) :
+				new List<string>();
+
+			List<IErasureTarget> result = new List<IErasureTarget>();
+			foreach (string file in files)
+			{
+				if (File.Exists(file))
+				{
+					FileErasureTarget target = new FileErasureTarget();
+					target.Path = file;
+					result.Add(target);
+				}
+			}
+
+			return result;
+		}
+
+		#endregion
+
 		private void folderBrowse_Click(object sender, EventArgs e)
 		{
Index: /branches/eraser6/pluginsRewrite/Eraser/TaskDragDropHelper.cs
===================================================================
--- /branches/eraser6/pluginsRewrite/Eraser/TaskDragDropHelper.cs	(revision 2450)
+++ /branches/eraser6/pluginsRewrite/Eraser/TaskDragDropHelper.cs	(revision 2451)
@@ -31,4 +31,5 @@
 using Eraser.Util;
 using Eraser.Manager;
+using Eraser.Plugins;
 using Eraser.Plugins.ExtensionPoints;
 
@@ -64,14 +65,7 @@
 					for (int i = 1; i <= cida.cidl; ++i)
 					{
-						/*if (!string.IsNullOrEmpty(cida.aoffset[i].Path))
+						if (cida.aoffset[i].Guid == Shell.KnownFolderIDs.RecycleBin)
 						{
-							files.Add(cida.aoffset[i].Path);
-						}
-						else */if (cida.aoffset[i].Guid != Guid.Empty)
-						{
-							if (cida.aoffset[i].Guid == Shell.KnownFolderIDs.RecycleBin)
-							{
-								recycleBin = true;
-							}
+							recycleBin = true;
 						}
 					}
@@ -82,28 +76,26 @@
 		}
 
-		public static ICollection<IErasureTarget> GetTargets(ICollection<string> paths, bool recycleBin)
+		/// <summary>
+		/// Parses a list of locations dropped on the target, converting them to the appropriate
+		/// IErasureTarget instance.
+		/// </summary>
+		/// <param name="e">The event argument.</param>
+		/// <returns>A list of erasure targets which will erase all the files and directories
+		/// as described by the drag-and-drop operation.</returns>
+		public static ICollection<IErasureTarget> GetTargets(DragEventArgs e)
 		{
 			ICollection<IErasureTarget> result = new List<IErasureTarget>();
-			foreach (string path in paths)
+			foreach (IErasureTarget target in Host.Instance.ErasureTargetFactories)
 			{
-				//If the path doesn't exist, skip the file
-				if (!(File.Exists(path) || Directory.Exists(path)))
+				//Skip targets not supporting IDragAndDropConfigurer
+				if (!(target.Configurer is IDragAndDropConfigurer<IErasureTarget>))
 					continue;
 
-				FileSystemObjectErasureTarget target;
-				if ((File.GetAttributes(path) & FileAttributes.Directory) != 0)
-					target = new FolderErasureTarget();
-				else
-					target = new FileErasureTarget();
-				target.Path = path;
-
-				result.Add(target);
+				IDragAndDropConfigurer<IErasureTarget> configurer =
+					(IDragAndDropConfigurer<IErasureTarget>)target.Configurer;
+				foreach (IErasureTarget newTarget in configurer.ProcessArgument(e))
+					result.Add(newTarget);
 			}
 
-			//Add the recycle bin if it was specified
-			if (recycleBin)
-				result.Add(new RecycleBinErasureTarget());
-
-			//Return our result
 			return result;
 		}
Index: /branches/eraser6/pluginsRewrite/Eraser.Plugins/IConfigurer.cs
===================================================================
--- /branches/eraser6/pluginsRewrite/Eraser.Plugins/IConfigurer.cs	(revision 2450)
+++ /branches/eraser6/pluginsRewrite/Eraser.Plugins/IConfigurer.cs	(revision 2451)
@@ -24,4 +24,6 @@
 using System.Linq;
 using System.Text;
+
+using System.Windows.Forms;
 
 namespace Eraser.Plugins
@@ -69,3 +71,19 @@
 		bool ProcessArgument(string argument);
 	}
+
+	/// <summary>
+	/// Represents an object which is able to configure a given instance of
+	/// <typeparamref name="T"/> from a Drag-and-Drop operation.
+	/// </summary>
+	/// <typeparam name="T">The type to configure</typeparam>
+	public interface IDragAndDropConfigurer<T> : IConfigurer<T>
+	{
+		/// <summary>
+		/// Sets the configuration of the current configurer from the provided
+		/// Drag-and-Drop event argument.
+		/// </summary>
+		/// <param name="e">The event argument.</param>
+		/// <returns>A collection of T based on the drag-and-drop event.</returns>
+		ICollection<T> ProcessArgument(DragEventArgs e);
+	}
 }
