Exemplo n.º 1
0
 public StartPageViewModel(IEntityViewModelFactory entityViewModelFactory, ICompanyViewModel companyViewModel, ICompanyListViewModel companyListViewModel)
 {
     _companyListViewModel   = companyListViewModel;
     _companyViewModel       = companyViewModel;
     _entityViewModelFactory = entityViewModelFactory;
     _firstColumnVisibility  = true;
     _secondColumnVisibility = true;
     _thirdColumnVisibility  = true;
     FirstColumnViewModel    = _companyListViewModel;
     SecondColumnViewModel   = _companyViewModel;
     ThirdColumnViewModel    = null;
     RegisterMessages();
     GoBackCommand    = new RelayCommand(GoBackInViewModels, CanGoBackInViewModels);
     GoForwardCommand = new RelayCommand(GoForwardInViewModels, CanGoForwardInViewModels);
 }
Exemplo n.º 2
0
        public CompaniesController(ICompanyService companyService, IImageService imageService, ICompanyViewModel companyViewModel)
        {
            if (companyService == null)
            {
                throw new ArgumentException("company");
            }

            if (imageService == null)
            {
                throw new ArgumentException("image");
            }

            if (companyViewModel == null)
            {
                throw new ArgumentException("viewmodel");
            }

            this.companyService = companyService;
            this.imageService = imageService;
            this.companyViewModel = companyViewModel;
        }