예제 #1
0
 /// <summary>
 /// Contructor that initializes the components and events
 /// </summary>
 public OrderControl()
 {
     InitializeComponent();
     DataContext = new Order();
     OrderSumm   = new OrderSummaryControl();
     itemSelectionButton.Click += OnItemSelectionClicked;
 }
예제 #2
0
 /// <summary>
 /// Constructor that takes in the total cost as a string and the order summary from previous controls
 /// </summary>
 /// <param name="total"></param>
 /// <param name="osc"></param>
 public CashControl(string total, OrderSummaryControl osc)
 {
     InitializeComponent();
     this.orderSummary.DataContext = osc.DataContext;
     DataContext           = new CashRegisterModelView(Convert.ToDouble(total.Remove(0, 1)));
     TotalTextBox.Text     = total;
     GivenChangeTitle.Text = "Given Change:\n";
 }