public void LooseItemAreaWeightChanged(int weightOfLooseItem)
 {
     currentProduct.SetWeight(weightOfLooseItem);
     scannedProducts.Add(currentProduct);
     baggingArea.SetExpectedWeight(scannedProducts.CalculateWeight());
     looseItemScale.Disable();
 }
Example #2
0
 public void LooseItemAreaWeightChanged(int weightOfLooseItem)         //Add changed weight to current weight
 {
     currentProduct.SetWeight(weightOfLooseItem);                      //sets weight to current product weight
     scannedProducts.Add(currentProduct);                              //adds current item to list
     ProductsList[i]   = currentProduct;                               //puts current product into list
     mostRecentProduct = ProductsList[i];                              //puts most recent product
     baggingArea.SetExpectedWeight(scannedProducts.CalculateWeight()); //calculates new bagging weight
     ++i;                                                              //adds to the index of products
 }
        private void UserSelectsALooseProduct(object sender, EventArgs e)
        {
            btnUserSelectsLooseProduct.Enabled = false;
            btnUserScansBarcodeProduct.Enabled = false;
            btnUserChooseToPay.Enabled         = false;
            btnUserWeighsLooseProduct.Enabled  = true;

            selfCheckout.LooseProductSelected();
            scannedProducts.Add(selfCheckout.GetCurrentProduct());

            UpdateDisplay();
        }