Esempio n. 1
0
        public MainViewModel(Community community, SynchronizationService synhronizationService, CompanySelectionModel companySelection, GameSelectionModel gameSelection)
        {
            _gameSelection = gameSelection;
            _community = community;
            _synhronizationService = synhronizationService;
            _companySelection = companySelection;

            if (synhronizationService.Individual != null)
            {
                _companySelectionVM = new CompanySelectionViewModel(
                    synhronizationService.Individual,
                    _companySelection);
            }
        }
        public ViewModelLocator()
        {
            _synchronizationService = new SynchronizationService();
            CompanySelectionModel companySelection = new CompanySelectionModel();
            GameSelectionModel gameSelection = new GameSelectionModel(companySelection);
            if (!DesignerProperties.IsInDesignTool)
            {
                _synchronizationService.Initialize();
                companySelection.SelectedCompany = _synchronizationService
                    .Individual.Companies
                    .Ensure()
                    .FirstOrDefault();
            }

            _main = new MainViewModel(
                _synchronizationService.Community,
                _synchronizationService,
                companySelection,
                gameSelection);
        }
Esempio n. 3
0
 public GameSelectionModel(CompanySelectionModel companySelection)
 {
     _companySelection = companySelection;
 }
 public GameSelectionModel(CompanySelectionModel companySelection)
 {
     _companySelection = companySelection;
 }
 public CompanySelectionViewModel(Individual individual, CompanySelectionModel selection)
 {
     _individual = individual;
     _selection = selection;
 }