Inheritance: RecipeableItem
 void OnProductionItemChanged(ProductionItem productionItem)
 {
     var viewmodel = (from vm in AllProductionItems where vm.Id == productionItem.Id select vm).FirstOrDefault();
     if (viewmodel == null)
     {
         viewmodel = new SingleProductionItemViewModel(productionItem);
         AllProductionItems.Add(viewmodel);
     }
     else
     {
         viewmodel.ExchangeData(productionItem);
     }
     OnPropertyChanged("ItemSelected");
     OnPropertyChanged("ItemsSelected");
 }
 public void ExchangeData(ProductionItem productionItem)
 {
     _productionItem = productionItem;
 }
 public SingleProductionItemViewModel(ProductionItem productionItem)
 {
     _productionItem = productionItem;
     base.DisplayName = productionItem.Name;
 }
Beispiel #4
0
 public EditProductionItem(ProductionItem productionItem)
 {
     ProductionItem = productionItem;
 }