コード例 #1
0
ファイル: UserInterface.cs プロジェクト: boden1080/SystemsMod
        // Constructor
        public UserInterface()
        {
            InitializeComponent();

            // NOTE: This is where we set up all the objects,
            // and create the various relationships between them.

            baggingAreaScale = new BaggingAreaScale();
            scannedProducts  = new ScannedProducts();
            barcodeScanner   = new BarcodeScanner();
            looseItemScale   = new LooseItemScale();

            selfCheckout = new SelfCheckout(baggingAreaScale, scannedProducts, looseItemScale);
            barcodeScanner.LinkToSelfCheckout(selfCheckout);
            baggingAreaScale.LinkToSelfCheckout(selfCheckout);
            looseItemScale.LinkToSelfCheckout(selfCheckout);

            //button enabled/disabled
            btnUserWeighsLooseProduct.Enabled = false;
            btnUserPutsProductInBaggingAreaCorrect.Enabled   = false;
            btnUserPutsProductInBaggingAreaIncorrect.Enabled = false;
            btnUserChooseToPay.Enabled      = false;
            btnAdminOverridesWeight.Enabled = false;



            UpdateDisplay();
        }
コード例 #2
0
 // Constructor
 public UserInterface()
 {
     InitializeComponent();
     displayList      = new List <DisplayList>();
     baggingAreaScale = new BaggingAreaScale();
     scannedProducts  = new ScannedProducts();
     barcodeScanner   = new BarcodeScanner();
     looseItemScale   = new LooseItemScale();
     selfCheckout     = new SelfCheckout(baggingAreaScale, scannedProducts, looseItemScale);
     barcodeScanner.LinkToSelfCheckout(selfCheckout);
     baggingAreaScale.LinkToSelfCheckout(selfCheckout);
     looseItemScale.LinkToSelfCheckout(selfCheckout);
     UpdateDisplay();
 }
コード例 #3
0
 public void LinkToSelfCheckout(SelfCheckout sc)
 {
     this.selfCheckout = sc;
 }
コード例 #4
0
 public void LinkToSelfCheckout(SelfCheckout selfCheckout)
 {
     this.selfCheckout = selfCheckout;
 }
コード例 #5
0
 public void LinkToSelfCheckout(SelfCheckout selfCheckout)
 {
     this.selfCheckout = selfCheckout;   //reference self checkout
 }