Allow MediaScan to be aborted.

This commit is contained in:
2019-04-21 00:59:01 +01:00
parent 359efb369c
commit 66108773d2
6 changed files with 16 additions and 14 deletions

View File

@@ -10,6 +10,7 @@ namespace DiscImageChef.Core.Devices.Scanning
readonly string devicePath;
readonly string ibgLogPath;
readonly string mhddLogPath;
bool aborted;
/// <param name="mhddLogPath">Path to a MHDD log file</param>
/// <param name="ibgLogPath">Path to a IMGBurn log file</param>
@@ -21,6 +22,7 @@ namespace DiscImageChef.Core.Devices.Scanning
this.ibgLogPath = ibgLogPath;
this.devicePath = devicePath;
this.dev = dev;
aborted = false;
}
public ScanResults Scan()
@@ -37,6 +39,11 @@ namespace DiscImageChef.Core.Devices.Scanning
}
}
public void Abort()
{
aborted = true;
}
/// <summary>
/// Event raised when the progress bar is not longer needed
/// </summary>