Change the namespace of PrinterCommunication and the class name.
Deleted lots of unused usings. Working to get the 2point leveling working. Started work on a new printer io layer Fixed the crash on disconnect while printing.
This commit is contained in:
parent
e6a1cabadf
commit
0e646dca68
50 changed files with 571 additions and 443 deletions
|
|
@ -33,10 +33,11 @@ using System.IO;
|
|||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.GCodeVisualizer;
|
||||
using MatterHackers.MeshVisualizer;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.PrinterCommunication;
|
||||
using MatterHackers.MatterControl.PrintQueue;
|
||||
using MatterHackers.MatterControl.SlicerConfiguration;
|
||||
using MatterHackers.MeshVisualizer;
|
||||
using MatterHackers.VectorMath;
|
||||
|
||||
namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||
|
|
@ -250,11 +251,11 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
private void SetAnimationPosition()
|
||||
{
|
||||
int currentLayer = PrinterCommunication.Instance.CurrentlyPrintingLayer;
|
||||
int currentLayer = PrinterConnectionAndCommunication.Instance.CurrentlyPrintingLayer;
|
||||
if (currentLayer >= 1)
|
||||
{
|
||||
selectLayerSlider.Value = currentLayer-1;
|
||||
layerEndRenderRatioSlider.Value = PrinterCommunication.Instance.RatioIntoCurrentLayer;
|
||||
layerEndRenderRatioSlider.Value = PrinterConnectionAndCommunication.Instance.RatioIntoCurrentLayer;
|
||||
layerStartRenderRatioSlider.Value = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -532,8 +533,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
// The idea here is we just got asked to rebuild the window (and it is being created now)
|
||||
// because the gcode finished creating for the print that is printing.
|
||||
// We don't want to be notified if any other updates happen to this gcode while it is printing.
|
||||
if (PrinterCommunication.Instance.PrinterIsPrinting
|
||||
&& PrinterCommunication.Instance.ActivePrintItem == printItem)
|
||||
if (PrinterConnectionAndCommunication.Instance.PrinterIsPrinting
|
||||
&& PrinterConnectionAndCommunication.Instance.ActivePrintItem == printItem)
|
||||
{
|
||||
printItem.SlicingOutputMessage.UnregisterEvent(sliceItem_SlicingOutputMessage, ref unregisterEvents);
|
||||
printItem.SlicingDone.UnregisterEvent(sliceItem_Done, ref unregisterEvents);
|
||||
|
|
@ -541,7 +542,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
generateGCodeButton.Visible = false;
|
||||
|
||||
// However if the print finished or is canceled we are going to want to get updates again. So, hook the status event
|
||||
PrinterCommunication.Instance.CommunicationStateChanged.RegisterEvent(HookUpGCodeMessagesWhenDonePrinting, ref unregisterEvents);
|
||||
PrinterConnectionAndCommunication.Instance.CommunicationStateChanged.RegisterEvent(HookUpGCodeMessagesWhenDonePrinting, ref unregisterEvents);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -554,7 +555,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
void HookUpGCodeMessagesWhenDonePrinting(object sender, EventArgs e)
|
||||
{
|
||||
if(!PrinterCommunication.Instance.PrinterIsPaused && !PrinterCommunication.Instance.PrinterIsPrinting)
|
||||
if(!PrinterConnectionAndCommunication.Instance.PrinterIsPaused && !PrinterConnectionAndCommunication.Instance.PrinterIsPrinting)
|
||||
{
|
||||
// unregister first to make sure we don't double up in error (should not be needed but no harm)
|
||||
printItem.SlicingOutputMessage.UnregisterEvent(sliceItem_SlicingOutputMessage, ref unregisterEvents);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue