private void HoldPickleClicked(object sender, RoutedEventArgs args)
 {
     steak?.HoldPickle();
     if (this.combo != null)
     {
         if (this.combo.Entree is SteakosaurusBurger sb)
         {
             sb.HoldPickle();
         }
     }
 }
示例#2
0
 public void HoldPickle(object sender, RoutedEventArgs e)
 {
     if (DataContext is Order order)
     {
         if (CollectionViewSource.GetDefaultView(order.Items).CurrentItem is DinoDiner.Menu.CretaceousCombo Combo)
         {
             DinoDiner.Menu.SteakosaurusBurger b = (DinoDiner.Menu.SteakosaurusBurger)Combo.Entree;
             b.HoldPickle();
             Combo.Entree = b;
             CollectionViewSource.GetDefaultView(order.Items).Refresh();
         }
     }
 }