Rename GCodeFileLoaded to GCodeMemoryFile

This commit is contained in:
John Lewin 2017-06-29 14:22:04 -07:00
parent 694024443c
commit 6eb9f09976
6 changed files with 14 additions and 14 deletions

View file

@ -183,7 +183,7 @@ namespace MatterHackers.GCodeVisualizer
}
else
{
return new GCodeFileLoaded(fileName);
return new GCodeMemoryFile(fileName);
}
}

View file

@ -39,7 +39,7 @@ using MatterHackers.VectorMath;
namespace MatterHackers.GCodeVisualizer
{
public class GCodeFileLoaded : GCodeFile
public class GCodeMemoryFile : GCodeFile
{
private double amountOfAccumulatedEWhileParsing = 0;
@ -55,12 +55,12 @@ namespace MatterHackers.GCodeVisualizer
private List<PrinterMachineInstruction> GCodeCommandQueue = new List<PrinterMachineInstruction>();
public GCodeFileLoaded(bool gcodeHasExplicitLayerChangeInfo = false)
public GCodeMemoryFile(bool gcodeHasExplicitLayerChangeInfo = false)
{
this.gcodeHasExplicitLayerChangeInfo = gcodeHasExplicitLayerChangeInfo;
}
public GCodeFileLoaded(string pathAndFileName, bool gcodeHasExplicitLayerChangeInfo = false)
public GCodeMemoryFile(string pathAndFileName, bool gcodeHasExplicitLayerChangeInfo = false)
{
this.gcodeHasExplicitLayerChangeInfo = gcodeHasExplicitLayerChangeInfo;
this.Load(pathAndFileName);
@ -104,9 +104,9 @@ namespace MatterHackers.GCodeVisualizer
return ParseFileContents(gcodeContents, null);
}
public static GCodeFileLoaded Load(Stream fileStream)
public static GCodeMemoryFile Load(Stream fileStream)
{
GCodeFileLoaded loadedGCode = null;
GCodeMemoryFile loadedGCode = null;
try
{
string gCodeString = "";
@ -125,7 +125,7 @@ namespace MatterHackers.GCodeVisualizer
return loadedGCode;
}
public static async Task<GCodeFileLoaded> LoadInBackground(string fileName, ReportProgressRatio progressReporter)
public static async Task<GCodeMemoryFile> LoadInBackground(string fileName, ReportProgressRatio progressReporter)
{
if (Path.GetExtension(fileName).ToUpper() == ".GCODE")
{
@ -156,7 +156,7 @@ namespace MatterHackers.GCodeVisualizer
{
using (StreamReader streamReader = new StreamReader(fileStream))
{
GCodeFileLoaded loadedFile = GCodeFileLoaded.Load(streamReader.BaseStream);
GCodeMemoryFile loadedFile = GCodeMemoryFile.Load(streamReader.BaseStream);
this.indexOfChangeInZ = loadedFile.indexOfChangeInZ;
this.center = loadedFile.center;
@ -198,7 +198,7 @@ namespace MatterHackers.GCodeVisualizer
return crCount + 1;
}
public static GCodeFileLoaded ParseFileContents(string gCodeString, ReportProgressRatio progressReporter)
public static GCodeMemoryFile ParseFileContents(string gCodeString, ReportProgressRatio progressReporter)
{
if (gCodeString == null)
{
@ -217,7 +217,7 @@ namespace MatterHackers.GCodeVisualizer
gcodeHasExplicitLayerChangeInfo = true;
}
GCodeFileLoaded loadedGCodeFile = new GCodeFileLoaded(gcodeHasExplicitLayerChangeInfo);
GCodeMemoryFile loadedGCodeFile = new GCodeMemoryFile(gcodeHasExplicitLayerChangeInfo);
int crCount = CountNumLines(gCodeString);
int lineIndex = 0;

View file

@ -43,7 +43,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="GCode\GCodeFile.cs" />
<Compile Include="GCode\GCodeFileLoaded.cs" />
<Compile Include="GCode\GCodeMemoryFile.cs" />
<Compile Include="GCode\GCodeFileStreamed.cs" />
<Compile Include="GCode\PrinterMachineInstruction.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />