public void Run() { if (PrinterConnectionAndCommunication.Instance.PrinterIsConnected) { PrinterConnectionAndCommunication.Instance.MacroStart(); SendCommandToPrinter(GCode); if (GCode.Contains(QueuedCommandsStream.MacroPrefix)) { SendCommandToPrinter("\n" + QueuedCommandsStream.MacroPrefix + "close()"); } } }
public void Run(PrinterConnection printerConnection) { if (printerConnection.IsConnected) { printerConnection.MacroStart(); printerConnection.QueueLine(GCode); if (GCode.Contains(MacroProcessingStream.MacroPrefix)) { printerConnection.QueueLine("\n" + MacroProcessingStream.MacroPrefix + "close()"); } } }