public PrinterConnection() { virtualPrinter = new VirtualPrinter(); if (Environment.OSVersion.Platform == PlatformID.Unix) port = "/dev/ttyUSB0"; job = new Printjob(this); timer = new System.Timers.Timer(); timer.Interval = 100; timer.AutoReset = true; timer.Elapsed += handleTimer; timer.Start(); try { string dir = Main.globalSettings.Workdir; if (dir.Length > 0 && Main.globalSettings.LogEnabled) logWriter = new StreamWriter(dir + Path.DirectorySeparatorChar + "repetier.log"); } catch { logWriter = null; } writeEvent = new AutoResetEvent(false); }
public VirtualPrinterConnector() { virtualPrinter = new VirtualPrinter(this); con = Main.conn; job = new Printjob(Main.conn); }