public MeasureEditViewModel(DomainModelService.Measure model, Action removeMeasureAction, ResponsibleSubjectViewModel[] responsibleSubjectViewModels,
                             IRelatedElementProvider[] relatedElementProvider)
     : base(model, responsibleSubjectViewModels, relatedElementProvider)
 {
     DisplayName                = TranslationProvider.Translate("TitleMeasureEditViewModel");
     m_Stati                    = Enum.GetValues(typeof(Status));
     m_RemoveMeasure            = removeMeasureAction;
     SelectedResponsibleSubject = responsibleSubjectViewModels.Single(rsvm => model.ResponsibleSubject == rsvm.Model);
 }
Beispiel #2
0
 public MeasureAddViewModel(DomainModelService.Measure model, IEnumerable <ResponsibleSubjectViewModel> responsibleSubjectViewModels, IRelatedElementProvider[] relatedElementProvider)
 {
     m_Model = model;
     if (m_Model.CreationDate == new DateTime())
     {
         m_Model.CreationDate = DateTime.Now;
         m_Model.DueDate      = DateTime.Now;
     }
     m_Priorities              = Enum.GetValues(typeof(Priority));
     m_ResponsibleSubjects     = responsibleSubjectViewModels;
     DisplayName               = TranslationProvider.Translate("TitleMeasureAddViewModel");
     m_RelatedElementProviders = relatedElementProvider;
 }
Beispiel #3
0
 public MeasureEditViewModel CreateEditViewModel(DomainModelService.Measure measure, Action removeMeasureAction)
 {
     return(new MeasureEditViewModel(measure, removeMeasureAction, CreateResponsibleSubjects(), m_RelatedElementProviders));
 }
Beispiel #4
0
 public MeasureViewModel CreateFromExisting(DomainModelService.Measure measure, CatalogViewModel catalog = null)
 {
     return(new MeasureViewModel(measure, m_RelatedElementProviders, catalog));
 }
Beispiel #5
0
        private void CreateMeasureViewModel(DomainModelService.Measure measure, CatalogViewModel cvm)
        {
            var mvm = m_MeasureViewModelFactory.CreateFromExisting(measure, cvm);

            m_Measures.Add(mvm);
        }
 public MeasureViewModel(DomainModelService.Measure measure, IEnumerable <IRelatedElementProvider> relatedElementProviders, CatalogViewModel catalog)
 {
     m_Model = measure;
     Catalog = catalog;
     m_RelatedElementProviders = relatedElementProviders;
 }