示例#1
0
        /// <summary>
        /// Click event changing the screen to the user control that was cliked on
        /// </summary>
        /// <param name="sender">needed for click event</param>
        /// <param name="e">needed for click event</param>
        void Coffee(Object sender, RoutedEventArgs e)
        {
            var cc = new CandlehearthCoffeeUC(b, ord, co, sb);

            cc.DataContext = new CandlehearthCoffee();
            b.Child        = cc;
            ord.order.Add((IOrderItem)cc.DataContext);
        }
        /// <summary>
        /// Click event changing the screen to the user control that was cliked on
        /// </summary>
        /// <param name="sender">needed for click event</param>
        /// <param name="e">needed for click event</param>
        void Coffee(Object sender, RoutedEventArgs e)
        {
            var cc = new CandlehearthCoffeeUC(b, o, co, sb);

            cc.DataContext = new CandlehearthCoffee();
            b.Child        = cc;

            com.Drink = (Drink)(cc.DataContext);
            o.order.Add(com);
        }