More making printerConnection passed to classes.
This commit is contained in:
parent
a0e77afa66
commit
3dd9270797
34 changed files with 151 additions and 351 deletions
|
|
@ -62,22 +62,22 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
return result;
|
||||
}
|
||||
|
||||
public void Run()
|
||||
public void Run(PrinterConnection printerConnection)
|
||||
{
|
||||
if (PrinterConnection.Instance.PrinterIsConnected)
|
||||
if (printerConnection.PrinterIsConnected)
|
||||
{
|
||||
PrinterConnection.Instance.MacroStart();
|
||||
SendCommandToPrinter(GCode);
|
||||
printerConnection.MacroStart();
|
||||
SendCommandToPrinter(printerConnection, GCode);
|
||||
if (GCode.Contains(MacroProcessingStream.MacroPrefix))
|
||||
{
|
||||
SendCommandToPrinter("\n" + MacroProcessingStream.MacroPrefix + "close()");
|
||||
SendCommandToPrinter(printerConnection, "\n" + MacroProcessingStream.MacroPrefix + "close()");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void SendCommandToPrinter(string command)
|
||||
protected void SendCommandToPrinter(PrinterConnection printerConnection, string command)
|
||||
{
|
||||
PrinterConnection.Instance.SendLineToPrinterNow(command);
|
||||
printerConnection.SendLineToPrinterNow(command);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue