Index: /branches/eraser6/pluginsRewrite/Eraser.Manager/Task.cs
===================================================================
--- /branches/eraser6/pluginsRewrite/Eraser.Manager/Task.cs	(revision 2483)
+++ /branches/eraser6/pluginsRewrite/Eraser.Manager/Task.cs	(revision 2484)
@@ -100,5 +100,20 @@
 		/// The Executor object which is managing this task.
 		/// </summary>
-		public Executor Executor { get; internal set; }
+		public Executor Executor
+		{
+			get
+			{
+				return executor;
+			}
+			internal set
+			{
+				if (value == null)
+					throw new ArgumentNullException();
+				if (executor != null)
+					throw new InvalidOperationException();
+
+				executor = value;
+			}
+		}
 
 		/// <summary>
@@ -111,32 +126,29 @@
 		/// The name of the task, used for display in UI elements.
 		/// </summary>
-		public string UIText
-		{
-			get
-			{
-				//Simple case, the task name was given by the user.
-				if (!string.IsNullOrEmpty(Name))
-					return Name;
-
-				string result = string.Empty;
-				if (Targets.Count == 0)
-					return result;
-				else if (Targets.Count < 5)
-				{
-					//Simpler case, small set of data.
-					foreach (IErasureTarget tgt in Targets)
-						result += S._("{0}, ", tgt);
-
-					return result.Remove(result.Length - 2);
-				}
-				else
-				{
-					//Ok, we've quite a few entries, get the first, the mid and the end.
-					result = S._("{0}, ", Targets[0]);
-					result += S._("{0}, ", Targets[Targets.Count / 2]);
-					result += Targets[Targets.Count - 1];
-
-					return S._("{0} and {1} other targets", result, Targets.Count - 3);
-				}
+		public string ToString()
+		{
+			//Simple case, the task name was given by the user.
+			if (!string.IsNullOrEmpty(Name))
+				return Name;
+
+			string result = string.Empty;
+			if (Targets.Count == 0)
+				return result;
+			else if (Targets.Count < 5)
+			{
+				//Simpler case, small set of data.
+				foreach (IErasureTarget tgt in Targets)
+					result += S._("{0}, ", tgt);
+
+				return result.Remove(result.Length - 2);
+			}
+			else
+			{
+				//Ok, we've quite a few entries, get the first, the mid and the end.
+				result = S._("{0}, ", Targets[0]);
+				result += S._("{0}, ", Targets[Targets.Count / 2]);
+				result += Targets[Targets.Count - 1];
+
+				return S._("{0} and {1} other targets", result, Targets.Count - 3);
 			}
 		}
@@ -230,4 +242,5 @@
 		}
 
+		private Executor executor;
 		private Schedule schedule;
 		private SteppedProgressManager progress;
@@ -243,9 +256,4 @@
 		/// </summary>
 		public EventHandler TaskStarted { get; set; }
-
-		/// <summary>
-		/// The event object holding all event handlers.
-		/// </summary>
-		public EventHandler<ProgressChangedEventArgs> ProgressChanged { get; set; }
 
 		/// <summary>
@@ -272,31 +280,4 @@
 			Executing = true;
 			Progress = new SteppedProgressManager();
-		}
-
-		/// <summary>
-		/// Broadcasts a ProgressChanged event. The sender will be the erasure target
-		/// which broadcast this event; e.UserState will contain extra information
-		/// about the progress which is stored as a TaskProgressChangedEventArgs
-		/// object.
-		/// </summary>
-		/// <param name="sender">The <see cref="IErasureTarget"/> which is reporting
-		/// progress.</param>
-		/// <param name="e">The new progress value.</param>
-		/// <exception cref="ArgumentException">e.UserState must be of the type
-		/// <see cref="TaskProgressEventargs"/></exception>
-		/// <exception cref="ArgumentNullException">Both sender and e cannot be null.</exception>
-		internal void OnProgressChanged(IErasureTarget sender, ProgressChangedEventArgs e)
-		{
-			if (sender == null)
-				throw new ArgumentNullException("sender");
-			if (e == null)
-				throw new ArgumentNullException("sender");
-			if (e.UserState.GetType() != typeof(TaskProgressChangedEventArgs))
-				throw new ArgumentException("The Task.OnProgressChanged event expects a " +
-					"TaskProgressEventArgs argument for the ProgressChangedEventArgs' UserState " +
-					"object.", "e");
-
-			if (ProgressChanged != null)
-				ProgressChanged(sender, e);
 		}
 
@@ -333,41 +314,3 @@
 		public Task Task { get; private set; }
 	}
-
-	/// <summary>
-	/// Stores extra information in the <see cref="ProgressChangedEventArgs"/>
-	/// structure that is not conveyed in the ProgressManagerBase classes.
-	/// </summary>
-	public class TaskProgressChangedEventArgs
-	{
-		/// <summary>
-		/// Constructor.
-		/// </summary>
-		/// <param name="itemName">The item whose erasure progress is being erased.</param>
-		/// <param name="itemPass">The current pass number for this item.</param>
-		/// <param name="itemTotalPasses">The total number of passes to complete erasure
-		/// of this item.</param>
-		public TaskProgressChangedEventArgs(string itemName, int itemPass,
-			int itemTotalPasses)
-		{
-			ItemName = itemName;
-			ItemPass = itemPass;
-			ItemTotalPasses = itemTotalPasses;
-		}
-
-		/// <summary>
-		/// The file name of the item being erased.
-		/// </summary>
-		public string ItemName { get; private set; }
-
-		/// <summary>
-		/// The pass number of a multi-pass erasure method.
-		/// </summary>
-		public int ItemPass { get; private set; }
-
-		/// <summary>
-		/// The total number of passes to complete before this erasure method is
-		/// completed.
-		/// </summary>
-		public int ItemTotalPasses { get; private set; }
-	}
 }
