Added DecrementProgress function to TrangaTask
This commit is contained in:
parent
5bce3c6fdd
commit
a3a96b6b55
@ -59,6 +59,13 @@ public abstract class TrangaTask
|
|||||||
return this.progress;
|
return this.progress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float DecrementProgress(float amount)
|
||||||
|
{
|
||||||
|
this.progress -= amount;
|
||||||
|
this.lastChange = DateTime.Now;
|
||||||
|
return this.progress;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// BL for concrete Tasks
|
/// BL for concrete Tasks
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -25,6 +25,13 @@ public class DownloadNewChaptersTask : TrangaTask
|
|||||||
return this.progress;
|
return this.progress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public new float DecrementProgress(float amount)
|
||||||
|
{
|
||||||
|
this.progress -= amount / this.childTaskAmount;
|
||||||
|
this.lastChange = DateTime.Now;
|
||||||
|
return this.progress;
|
||||||
|
}
|
||||||
|
|
||||||
protected override void ExecuteTask(TaskManager taskManager, Logger? logger)
|
protected override void ExecuteTask(TaskManager taskManager, Logger? logger)
|
||||||
{
|
{
|
||||||
Publication pub = publication!;
|
Publication pub = publication!;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user