- Timestamp:
- 2/8/2010 6:44:59 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/CodeReview/Eraser.Manager/DirectExecutor.cs
r1745 r1765 27 27 using System.Threading; 28 28 using System.IO; 29 using System.Runtime.Serialization; 30 using System.Runtime.Serialization.Formatters.Binary; 29 31 30 32 using Eraser.Util; 31 33 using Eraser.Util.ExtensionMethods; 32 using System.Security.Principal;33 using System.Runtime.Serialization;34 using System.Runtime.Serialization.Formatters.Binary;35 using System.Security.Permissions;36 34 37 35 namespace Eraser.Manager … … 152 150 } 153 151 154 private void OnTaskEdited(object sender, TaskEventArgs e)152 private void OnTaskEdited(object sender, EventArgs e) 155 153 { 156 154 //Find all schedule entries containing the task - since the user cannot make 157 155 //edits to the task when it is queued (only if it is scheduled) remove 158 156 //all task references and add them back 157 Task task = (Task)sender; 159 158 lock (tasksLock) 160 159 for (int i = 0; i != scheduledTasks.Count; ++i) … … 162 161 { 163 162 Task currentTask = scheduledTasks.Values[i][j]; 164 if (currentTask == e.Task)163 if (currentTask == task) 165 164 scheduledTasks.Values[i].RemoveAt(j); 166 165 else … … 169 168 170 169 //Then reschedule the task 171 if ( e.Task.Schedule is RecurringSchedule)172 ScheduleTask( e.Task);170 if (task.Schedule is RecurringSchedule) 171 ScheduleTask(task); 173 172 } 174 173 … … 248 247 //Broadcast the task started event. 249 248 task.Canceled = false; 250 task.OnTaskStarted(new TaskEventArgs(task)); 251 OnTaskProcessing(new TaskEventArgs(task)); 249 task.OnTaskStarted(); 252 250 253 251 //Run the task … … 318 316 319 317 //And the task finished event. 320 task.OnTaskFinished(new TaskEventArgs(task)); 321 OnTaskProcessed(new TaskEventArgs(task)); 318 task.OnTaskFinished(); 322 319 323 320 //Remove the actively executing task from our instance variable
Note: See TracChangeset
for help on using the changeset viewer.
