Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using CheckoutLibrary;
- namespace SumaApp
- {
- class BarcoderCheckOut
- {
- private SumaClient.SupermarketService shop;
- private SumaClient.Product[] AllProducts;/
- CheckoutLibrary.BarcodeScanner scanner;
- public void CheckoutItem()
- {
- shop = new SumaClient.SupermarketService();
- AllProducts = shop.GetAllProducts();
- }
- public void On_click()
- {
- scanner = new CheckoutLibrary.BarcodeScanner();
- scanner.ItemScanned += new CheckoutLibrary.BarcodeScanner.ItemScannedHandler(Scan);
- scanner.AllItemsScanned += new CheckoutLibrary.BarcodeScanner.AllItemsScannedHandler(Allscanned);
- scanner.Start(1);
- }
- public void Scan(ScanEventArgs ItemScan )
- {
- foreach (SumaClient.Product product in AllProducts)
- {
- string listproduct;
- if (product.Barcode == ItemScan.Barcode)
- {
- listproduct = (product.Barcode.ToString() + " " + product.Description.ToString());
- }
- }
- }
- public void Allscanned(EventArgs ItemScanEnd )
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement