/// <summary> /// Der Haupteinstiegspunkt für die Anwendung. /// </summary> static void Main(string[] args) { if (!Environment.UserInteractive) { var ServicesToRun = new ServiceBase[] { new BarcodeScannerService() }; ServiceBase.Run(ServicesToRun); } else { try { EnableConsole(); var service = new BarcodeScannerService(); service.StartForeground(args); } catch (Exception exc) { Console.WriteLine(exc.Message); var innerExc = exc.InnerException; while (innerExc != null) { Console.WriteLine(innerExc.Message); innerExc = innerExc.InnerException; } } } }