예제 #1
0
        /// <summary>
        /// Инициализация драйверов устройств
        /// </summary>
        /// <param name="log"></param>
        public MachineDrivers(Log log)
        {
            this.log = log;

            this.log.Write(LogMessageType.Information, "DRIVERS: Старт драйверов. Версия " + Globals.ProductVersion);

            // создаем все объекты драйверов
            if (scaner == null)
            {
                scaner = new ZebexScaner();
            }
            if (CCNETDriver == null)
            {
                CCNETDriver = new CCRSProtocol();
            }
            if (printer == null)
            {
                printer = new PrinterESC();
            }
            if (control == null)
            {
                control = new ControlDevice();
            }
            if (modem == null)
            {
                modem = new Modem();
            }
        }
예제 #2
0
        public void ManualInitDevice()
        {
            if (Globals.ClientConfiguration.Settings.offCheck != 1)
            {
                // не платим чеком - не нужен сканер
                scaner             = new ZebexScaner();
                WorkerScanerDriver = new SaleThread {
                    ThreadName = "WorkerScanerDriver"
                };
                WorkerScanerDriver.Work     += WorkerScanerDriver_Work;
                WorkerScanerDriver.Complete += WorkerScanerDriver_Complete;
            }

            if (Globals.ClientConfiguration.Settings.offBill != 1)
            {
                CCNETDriver          = new CCRSProtocol();
                WorkerBillPollDriver = new SaleThread {
                    ThreadName = "WorkerBillPollDriver"
                };
                WorkerBillPollDriver.Work     += WorkerBillPollDriver_Work;
                WorkerBillPollDriver.Complete += WorkerBillPollDriver_Complete;
            }

            printer = new PrinterESC();

            if (Globals.ClientConfiguration.Settings.offControl != 1)
            {
                control = new ControlDevice();
            }

            if (Globals.ClientConfiguration.Settings.offModem != 1)
            {
                modem = new Modem();
            }
        }