public void SendStatus(StatusChangedEnum type, object data, long tasksToAdd) { tasksDone += tasksToAdd; lastTDone = tasksDone; if (tasksDone < 0) { tasksDone = 0; } if (tasksTotal == 0) { tasksTotal = 1; } if (StatusChanged != null) { StatusChanged(this, new StatusChangedEventArgs { TotalTasks = tasksTotal, TasksDone = tasksDone, Percentage = (double)tasksDone / (double)tasksTotal * 100.00, Type = type, data = data }); } }
public void SendStatus(StatusChangedEnum type, object data, long tasksToAdd) { tasksDone += tasksToAdd; lastTDone = tasksDone; if (tasksDone < 0) tasksDone = 0; if (tasksTotal == 0) tasksTotal = 1; if (StatusChanged != null) { StatusChanged(this, new StatusChangedEventArgs { TotalTasks = tasksTotal, TasksDone = tasksDone, Percentage = (double)tasksDone / (double)tasksTotal * 100.00, Type = type, data = data }); } }
public void SendStatus(StatusChangedEnum type) { SendStatus(type, null, 0); }