private void InitializeViewModel()
 {
     if (_viewModel == null)
     {
         _viewModel = ForView.Unwrap<CompanySelectionViewModel>(DataContext);
         if (_viewModel != null)
         {
             _viewModel.DisplayCompanyEdit += DisplayCompanyEdit;
             _viewModel.HideCompanyEdit += HideCompanyEdit;
         }
     }
 }
Пример #2
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);
            }
        }
Пример #3
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);
            }
        }