Ejemplo n.º 1
0
        /// <summary>
        /// Load all peripheral devices.
        /// </summary>
        public void Load()
        {
            // Construct all peripheral objects.
            Printer = Application.CompositionContainer.GetExportedValues <IPrinter>().First();
            Printer.SetUpPrinter(
                LSRetailPosis.Settings.HardwareProfiles.Printer.DeviceType.ToString(),
                LSRetailPosis.Settings.HardwareProfiles.Printer.DeviceName,
                LSRetailPosis.Settings.HardwareProfiles.Printer.DeviceDescription);
            Printer2 = Application.CompositionContainer.GetExportedValues <IPrinter>().First();
            Printer2.SetUpPrinter(
                LSRetailPosis.Settings.HardwareProfiles.Printer2.DeviceType.ToString(),
                LSRetailPosis.Settings.HardwareProfiles.Printer2.DeviceName,
                LSRetailPosis.Settings.HardwareProfiles.Printer2.DeviceDescription);
            CashDrawer       = Application.CompositionContainer.GetExportedValues <ICashDrawer>().First();
            DualDisplay      = Application.CompositionContainer.GetExportedValues <IDualDisplay>().First();
            KeyLock          = Application.CompositionContainer.GetExportedValues <IKeyLock>().First();
            LineDisplay      = Application.CompositionContainer.GetExportedValues <ILineDisplay>().First();
            LogOnDevice      = Application.CompositionContainer.GetExportedValues <ILogOnDevice>().First();
            MSR              = Application.CompositionContainer.GetExportedValues <IMSR>().First();
            PinPad           = Application.CompositionContainer.GetExportedValues <IPinPad>().First();
            RFIDScanner      = Application.CompositionContainer.GetExportedValues <IRadioFrequencyIDScanner>().First();
            Scale            = Application.CompositionContainer.GetExportedValues <IScale>().First();
            Scanner          = Application.CompositionContainer.GetExportedValues <IScanner>().First();
            SignatureCapture = Application.CompositionContainer.GetExportedValues <ISignatureCapture>().First();

            LoadPeripheral(6209, Printer);
            LoadPeripheral(6209, Printer2);
            LoadPeripheral(6203, CashDrawer);
            LoadPeripheral(6205, KeyLock);
            LoadPeripheral(6207, LineDisplay);
            LoadPeripheral(6204, MSR);
            LoadPeripheral(6210, PinPad);
            LoadPeripheral(6202, RFIDScanner);
            LoadPeripheral(6206, Scale);
            LoadPeripheral(6208, Scanner);
            LoadPeripheral(6201, DualDisplay);
            LoadPeripheral(6213, SignatureCapture);

            if (BiometricDevice != null)
            {
                LoadPeripheral(6214, BiometricDevice);
            }

            LogOnDevice.Load(); // It is a proxy device, no error handling required on load
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Unload all peripheral devices.
        /// </summary>
        public void Unload()
        {
            LogOnDevice.Unload();
            CashDrawer.Unload();
            KeyLock.Unload();
            MSR.Unload();
            LineDisplay.Unload();
            PinPad.Unload();
            RFIDScanner.Unload();
            Scale.Unload();
            Scanner.Unload();
            SignatureCapture.Unload();
            Printer2.Unload();
            Printer.Unload();
            LogOnDevice.Unload();

            if (BiometricDevice != null)
            {
                BiometricDevice.Unload();
            }
        }