Ejemplo n.º 1
0
 private void USBInit()
 {
     mmj = new Paperang(mmjcx, mmjmd);
     mmj.SetLogContext(logger);
     logger.Verbose("# printers found: " + mmj.Printer.AvailablePrinters.Count);
     if (!mmj.Printer.PrinterAvailable)
     {
         logger.Error("Couldn't initialise printer as none is connected");
         return;
     }
     logger.Info("USB Initialising");
     mmj.Initialise();
     logger.Debug("PrinterInitialised? " + mmj.Printer.PrinterInitialised);
     logger.Debug("Printer initialised and ready");
     state = AppState.InitDev;
     btInitUSB.IsEnabled   = false;
     btDeInitUSB.IsEnabled = true;
     gbOtherFunc.IsEnabled = true;
     gbPrinting.IsEnabled  = true;
 }