Exemplo n.º 1
0
        private void Ciencuenta_Click(object sender, RoutedEventArgs e)
        {
            var      Bill         = DeviceLibrary.Models.Enums.DocumentType.Bill;
            Document objcincuenta = new Document(50, Bill, 50);

            var deviceLibrary = new DeviceLibrary.DeviceLibrary();

            deviceLibrary.SimulateInsertion(objcincuenta);

            pago = pago + objcincuenta.Count;
            infDepositado.Content = pago;
            infRestante.Content   = Convert.ToDouble(infDeuda2.Content) - pago;

            deviceLibrary.AcceptedDocument += new Action <Document>(deviceLibrary.SimulateInsertion);
            deviceLibrary.AcceptedDocument -= null;
        }
Exemplo n.º 2
0
        private void CincoCentavos_Click(object sender, RoutedEventArgs e)
        {
            var      Coin             = DeviceLibrary.Models.Enums.DocumentType.Coin;
            Document objCincoCentavos = new Document(1 / 2, Coin, 1 / 2);

            var deviceLibrary = new DeviceLibrary.DeviceLibrary();

            deviceLibrary.SimulateInsertion(objCincoCentavos);

            pago = pago + 0.5;
            infDepositado.Content = pago;
            infRestante.Content   = Convert.ToDouble(infDeuda2.Content) - pago;

            deviceLibrary.AcceptedDocument += new Action <Document>(deviceLibrary.SimulateInsertion);
            deviceLibrary.AcceptedDocument -= null;
        }
Exemplo n.º 3
0
        void Quinientos_Click(object sender, RoutedEventArgs e)
        {
            var Status = DeviceLibrary.Models.Enums.DeviceStatus.Enabled;

            var      Bill          = DeviceLibrary.Models.Enums.DocumentType.Bill;
            Document objquinientos = new Document(500, Bill, 500);

            var deviceLibrary = new DeviceLibrary.DeviceLibrary();

            deviceLibrary.SimulateInsertion(objquinientos);

            pago = pago + objquinientos.Count;
            infDepositado.Content = pago;
            infRestante.Content   = Convert.ToDouble(infDeuda2.Content) - pago;

            deviceLibrary.AcceptedDocument += new Action <Document>(deviceLibrary.SimulateInsertion);
            deviceLibrary.AcceptedDocument -= null;

            Console.WriteLine(Status);
        }