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(); }
public void WeightChangeDetected(int change) { weight += change; //adds to current weight selfCheckout.BaggingAreaWeightChanged(); }
// 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); }
// 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(); }