コード例 #1
0
 public PrinterConnection()
 {
     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;
     }
 }
コード例 #2
0
 public LinkedList <int> nackLines   = new LinkedList <int>(); // Lines, whoses receivement were not acknowledged
 public PrinterConnection()
 {
     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 + "\\repetier.log");
         }
     }
     catch
     {
         logWriter = null;
     }
 }
コード例 #3
0
        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);
        }
コード例 #4
0
 public PrinterConnection()
 {
     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+"\\repetier.log");
     }
     catch
     {
         logWriter = null;
     }
 }
コード例 #5
0
 public SerialConnector()
 {
     con = Main.conn;
     job = new Printjob(Main.conn);
     writeEvent = new AutoResetEvent(false);
     if (Environment.OSVersion.Platform == PlatformID.Unix)
         port = "/dev/ttyUSB0";
 }
コード例 #6
0
 public VirtualPrinterConnector()
 {
     virtualPrinter = new VirtualPrinter(this);
     con = Main.conn;
     job = new Printjob(Main.conn);
 }