示例#1
0
 public void LooseItemAreaWeightChanged(int weightOfLooseItem)
 {
     ProductsDAO.GetRandomLooseProduct();
     currentProduct.SetWeight(weightOfLooseItem);
     scannedProducts.Add(currentProduct);
     baggingArea.SetExpectedWeight(scannedProducts.CalculateWeight());
     looseItemScale.Disable();
 }
示例#2
0
 public void BarcodeWasScanned(int barcode)
 {
     currentProduct = ProductsDAO.SearchUsingBarcode(barcode);         //Find product in the database and store it
     scannedProducts.Add(currentProduct);                              //Add product to ScannedProducts
     ProductsList[i]   = currentProduct;                               //put current product into productslist
     mostRecentProduct = ProductsList[i];                              //gets recent product from list
     baggingArea.SetExpectedWeight(scannedProducts.CalculateWeight()); //Use to SetExpectedWeight in BaggingAreaScale to new weight
     ++i;                                                              //adds to index of products
 }
示例#3
0
        private SelfCheckout selfCheckout;      //This correct? How does it get passed this?

        // Operations
        public void BarcodeDetected()
        {
            // NOTE: In reality BarcodeScanner would see a real barcode and convert
            //       it to a number. We have to fake this, so we grab a random
            //       barcode from the available products and pretend we saw that
            int barcode = ProductsDAO.GetRandomProductBarcode();

            selfCheckout.BarcodeWasScanned(barcode);        //passes selfcheckout the random barcode
        }
 public void BarcodeDetected()
 {
     selfCheckout.BarcodeWasScanned(ProductsDAO.GetRandomProductBarcode());
 }
示例#5
0
 // Operations
 public void LooseProductSelected()
 {
     looseItemScale.Enable();
     currentProduct = ProductsDAO.GetRandomLooseProduct();   //enable scale and get the current loose product    (just finding random one for now)
 }
示例#6
0
 public void BarcodeWasScanned(int barcode)
 {
     scannedProducts.Add(ProductsDAO.SearchUsingBarcode(barcode));
     baggingArea.SetExpectedWeight(scannedProducts.CalculateWeight());
 }
示例#7
0
 // Operations
 public void LooseProductSelected()
 {
     ProductsDAO.GetRandomLooseProduct();
     looseItemScale.Enable();
 }