示例#1
0
        private void UserPutsProductInBaggingAreaIncorrect(object sender, EventArgs e)
        {
            // NOTE: We are pretending to put down an item with the wrong weight.
            // To simulate this we'll use a random number, here's one for you to use.
            int weight = new Random().Next(20, 100);

            btnUserPutsProductInBaggingAreaCorrect.Enabled   = false;
            btnUserPutsProductInBaggingAreaIncorrect.Enabled = false;
            btnUserScansBarcodeProduct.Enabled = false;
            btnUserSelectsLooseProduct.Enabled = false;
            btnUserChooseToPay.Enabled         = false;
            btnAdminOverridesWeight.Enabled    = true;
            selfCheckout.BaggingAreaWeightChanged(weight);
            UpdateDisplay();
        }
示例#2
0
 public void WeightChangeDetected(int change)
 {
     weight += change;       //adds to current weight
     selfCheckout.BaggingAreaWeightChanged();
 }
示例#3
0
 // NOTE: In reality the difference wouldn't be passed in here, the
 //       scale would detect the change and notify the self checkout
 public void WeightChangeDetected(int weight)
 {
     this.weight += weight;
     selfCheckout.BaggingAreaWeightChanged(weight);
 }
示例#4
0
 // NOTE: In reality the difference wouldn't be passed in here, the
 //       scale would detect the change and notify the self checkout
 public void WeightChangeDetected(int difference)
 {
     weight += difference;
     selfCheckout.BaggingAreaWeightChanged();
 }