Remove slicing members from PrintItemWrapper

- Issue MatterHackers/MCCentral#2825
This commit is contained in:
John Lewin 2018-02-13 16:41:09 -08:00
parent 2efc28bc94
commit 2e631c5a49
2 changed files with 3 additions and 67 deletions

View file

@ -114,18 +114,14 @@ namespace MatterHackers.MatterControl.PrintQueue
}
else if (Path.GetExtension(printItemWrapper.FileLocation).ToUpper() == ".GCODE")
{
sliceItem_Done(printItemWrapper, null);
this.SlicingCompleted(printItemWrapper);
}
}
}
}
private void sliceItem_Done(object sender, EventArgs e)
private void SlicingCompleted(PrintItemWrapper sliceItem)
{
PrintItemWrapper sliceItem = (PrintItemWrapper)sender;
sliceItem.SlicingDone -= sliceItem_Done;
if (File.Exists(sliceItem.FileLocation))
{
savedGCodeFileNames.Add(sliceItem.GetGCodePathAndFileName());
@ -224,10 +220,7 @@ namespace MatterHackers.MatterControl.PrintQueue
}
}
if (DoneSaving != null)
{
DoneSaving(this, new StringEventArgs(string.Format("{0:0.0}", total)));
}
DoneSaving?.Invoke(this, new StringEventArgs(string.Format("{0:0.0}", total)));
}
}
}