Revise ReportProgressRatio implementation

This commit is contained in:
John Lewin 2017-07-14 13:55:02 -07:00
parent 990539d979
commit 4eb8ebe254
21 changed files with 95 additions and 87 deletions

View file

@ -33,6 +33,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
using System.Threading;
namespace MatterHackers.GCodeVisualizer
{
@ -175,7 +176,7 @@ namespace MatterHackers.GCodeVisualizer
return false;
}
public static GCodeFile Load(string fileName)
public static GCodeFile Load(string fileName, CancellationToken cancellationToken)
{
if (FileTooBigToLoad(fileName))
{
@ -183,7 +184,7 @@ namespace MatterHackers.GCodeVisualizer
}
else
{
return new GCodeMemoryFile(fileName);
return new GCodeMemoryFile(fileName, cancellationToken);
}
}