mirror of
https://github.com/Tichau/FileConverter.git
synced 2026-11-19 09:01:32 +01:00
Fixed: Issue where cancel button was always disabled
This commit is contained in:
1 parent
e63704b9ec
commit
ea5830f6fe
5 files changed
+7
-22
No files matched your search
@@ -207,6 +207,8 @@ namespace FileConverter.ConversionJobs
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual bool IsCancelable => this.State == ConversionState.InProgress;
|
||||
|
||||
protected string[] OutputFilePaths
|
||||
{
|
||||
get;
|
||||
@@ -376,7 +378,7 @@ namespace FileConverter.ConversionJobs
|
||||
|
||||
public virtual void Cancel()
|
||||
{
|
||||
if (!this.IsCancelable())
|
||||
if (!this.IsCancelable)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -385,11 +387,6 @@ namespace FileConverter.ConversionJobs
|
||||
this.ConversionFailed(Properties.Resources.ErrorCanceled);
|
||||
}
|
||||
|
||||
protected virtual bool IsCancelable()
|
||||
{
|
||||
return this.State == ConversionState.InProgress;
|
||||
}
|
||||
|
||||
protected virtual int GetOutputFilesCount()
|
||||
{
|
||||
return 1;
|
||||
|
||||
@@ -34,10 +34,7 @@ namespace FileConverter.ConversionJobs
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool IsCancelable()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
protected override bool IsCancelable => false;
|
||||
|
||||
protected override int GetOutputFilesCount()
|
||||
{
|
||||
|
||||
@@ -26,10 +26,7 @@ namespace FileConverter.ConversionJobs
|
||||
get;
|
||||
}
|
||||
|
||||
protected override bool IsCancelable()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
protected override bool IsCancelable => false;
|
||||
|
||||
protected override void Initialize()
|
||||
{
|
||||
|
||||
@@ -35,10 +35,7 @@ namespace FileConverter.ConversionJobs
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool IsCancelable()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
protected override bool IsCancelable => false;
|
||||
|
||||
protected override int GetOutputFilesCount()
|
||||
{
|
||||
|
||||
@@ -34,10 +34,7 @@ namespace FileConverter.ConversionJobs
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool IsCancelable()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
protected override bool IsCancelable => false;
|
||||
|
||||
protected override int GetOutputFilesCount()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user