示例#1
0
        private void CreateProductionItemViewModel(ProductionItem newItem)
        {
            var pivm = new ProductionItemViewModel(newItem);

            pivm.PropertyChanged += ProductionItemPropertyChanged;
            m_ProductionItemViewModels.Add(pivm);
        }
 public EvaluationManagementViewModel([Import] IDiscardRepository contextRepository)
 {
     m_Repository = contextRepository;
     m_Repository.ContextChanged += (s, e) => Application.Current.Dispatcher.Invoke(Reload);
     Reload();
     if (m_ProductionItemViewModels.Any())
     {
         m_SelectedProductionItemViewModel = m_ProductionItemViewModels.First();
     }
     if (m_SelectedInspectionViewModel != null)
     {
         m_SelectedInspectionViewModel = InspectionsFromSelectedProductionItems.First();
         NotifyOfPropertyChange(() => InspectionName);
     }
 }