public DangerManagementViewModel(IDialogManager dialogManager, IDangerRepository contextRepository, IDangerViewModelFactory dangerViewModelFactory, ICompanyContext companyContext) { Dialogs = dialogManager; m_Repository = contextRepository; m_DangerViewModelFactory = dangerViewModelFactory; m_CompanyContext = companyContext; SelectedCompanyViewModel = m_CompanyContext.companyViewModel; m_CompanyContext.CompanyChanged += (s, e) => UpdateSelectedCompanyViewModel(); }
public AssessmentManagementViewModel(IDangerRepository repository, IAssessmentViewModelFactory assessmentViewModelFactory, ICompanyContext companyContext) { m_Repository = repository; m_CompanyContext = companyContext; SelectedCompanyViewModel = m_CompanyContext.companyViewModel; m_CompanyContext.CompanyChanged += (s, e) => UpdateSelectedCompanyViewModel(); m_AssessmentViewModelFactory = assessmentViewModelFactory; m_Status = Enum.GetValues(typeof(Status)); }
public CompanyManagementViewModelFactory(IDialogManager dialogManager, IDangerRepository repository, IDangerViewModelFactory dangerViewModelFactory, IAssessmentViewModelFactory assessmentViewModelFactory, ICompanyContext companyContext) { m_DialogManager = dialogManager; m_Repository = repository; m_DangerViewModelFactory = dangerViewModelFactory; m_AssessmentViewModelFactory = assessmentViewModelFactory; m_CompanyContext = companyContext; }
public OverViewManagementViewModel(IDangerRepository repository, IAssessmentViewModelFactory assessmentViewModelFactory) { m_AssessmentViewModelFactory = assessmentViewModelFactory; m_Repository = repository; m_Repository.SaveCompleted += (s, e) => Application.Current.Dispatcher.Invoke(CheckIsEnabled); //m_CompanyContext.CompanyChanged += (s, e) => UpdateSelectedCompanyViewModel(); m_Status = Enum.GetValues(typeof(Status)); CheckIsEnabled(); m_Assessments = m_Repository.Assessments; }
public CompanyManagementViewModel(IDialogManager dialogManager, [Import] IDangerRepository mRepository, [Import] ICompanyManagementViewModelFactory companyManagementViewModelFactory, [Import] IDangerViewModelFactory dangerViewModelFactory, [Import] ICompanyContext companyContext) { m_Repository = mRepository; m_Repository.ContextChanged += (s, e) => Application.Current.Dispatcher.Invoke(LoadData); m_CompanyManagementViewModelFactory = companyManagementViewModelFactory; m_DangerViewModelFactory = dangerViewModelFactory; m_CompanyContext = companyContext; m_CompanyContext.CompanyChanged += (s, e) => UpdateSelectedCompanyViewModel(); ActivatedManagementViewModel = 0; AddNewCompany = new AddNewCompanyCommand(this); LoadData(); Dialogs = dialogManager; SelectFirstCompanyViewModel(); }
public ActionManagementViewModel(IDialogManager dialogManager, IAssessmentViewModelFactory assessmentViewModelFactory, IDangerRepository repository, ICompanyContext companyContext) { m_Repository = repository; m_CompanyContext = companyContext; m_VMFactory = new ViewModelFactory(); m_Status = Enum.GetValues(typeof(Status)); m_CompanyContext.CompanyChanged += (s, e) => UpdateSelectedCompanyViewModel(); SelectedCompanyViewModel = m_CompanyContext.companyViewModel; m_AssessmentViewModelFactory = assessmentViewModelFactory; vmFactory = new ViewModelFactory(); m_SelectedAction = new Action() { DueDate = DateTime.Now }; Dialogs = dialogManager; }
public ImportManagementViewModel([Import] ISettingsProvider settingsProvider, [Import] IDangerRepository contextRepository, [Import] ISurveyTypeViewModelFactory surveytypeViewModelFactory) { m_SurveyTypeViewModelFactory = surveytypeViewModelFactory; m_Repository = contextRepository; m_Repository.ContextChanged += (s, e) => Application.Current.Dispatcher.Invoke(LoadSurveyTypes); m_SettingsProvider = settingsProvider; m_SurveyTypeList = new BindableCollection <SurveyTypeViewModel>(); Initialize(); if (m_SurveyTypeList != null && m_SurveyTypeList.Any()) { SelectedSurvey = m_SurveyTypeViewModelFactory.CreateSurveyTypeViewModelFromExisting(m_SurveyTypeList.First() .Model); } }
public DangerViewModelFactory([Import] IDangerRepository repository, [Import] ISurveyTypeViewModelFactory surveytypeViewModelFactory) { m_Repository = repository; m_SurveyTypeViewModelFactory = surveytypeViewModelFactory; }
public AssessmentViewModelFactory([Import] IDangerRepository repository) { m_Repository = repository; }