/// <summary> /// creates a cash menu /// </summary> /// <param name="ancestor"></param> public CashMenu(MenuComponent ancestor) { InitializeComponent(); Ancestor = ancestor; drawer = new CashRegister((Order)Ancestor.DataContext); this.DataContext = drawer; }
/// <summary> /// Creates a new CurrencyPayment screen with the current instance of the order object. /// </summary> /// <param name="order">The current order object stored in the data context.</param> public CurrencyPayment(Order order) { _orderInstance = order; CashRegister cr = new CashRegister(); cr.Total = _orderInstance.Total; DataContext = cr; InitializeComponent(); }
/// <summary> /// Initalizes MainWindow an decalres variables for each /// of the screens. /// </summary> public MainWindow() { InitializeComponent(); this.DataContext = new Order(); menuSelect = new MenuSelect(this); orderSummary = new OrderSummary(this); paymentOptions = new PaymentOptions(this); cashRegister = new CashRegister(this); comboCustom = new ComboCustomization(this); //Entrees bbCustom = new BBurgerCustomization(this); ddCustom = new DDraugrCustomization(this); ttCustom = new TTripleCustomization(this); gooCustom = new GOOmeletteCustomization(this); ppCustom = new PPoacherCustomization(this); ssCustom = new SSkeletonCustomization(this); //Sides dbwfCustom = new DBWFriesCustomization(this); fmCustom = new FMiraakCustomization(this); mogCustom = new MOGritsCustomization(this); vsCustom = new VSaladCustomization(this); //Drinks aajCustom = new AAJuiceCustomization(this); ccCustom = new CCoffeeCustomization(this); mmCustom = new MMilkCustomization(this); ssodaCustom = new SSodaCustomization(this); wwCustom = new WWaterCustomization(this); screen.Child = menuSelect; orderScreen.Child = orderSummary; }
public CashRegisterTests() { _cashRegister = new CashRegister(_productFinderMock.Object); _monitoredCashRegister = _cashRegister.Monitor(); }