Esempio n. 1
0
 private void CreateRelayCommands(ViewManager viewManager)
 {
     _viewManager = viewManager;
     ShowMainWindowCommand = new RelayCommand(() => _viewManager.Show(View.Main));
     ShowCountriesListWindowCommand = new RelayCommand(() => _viewManager.Show(View.CountriesList));
     ShowHelpWindowCommand = new RelayCommand(() => _viewManager.Show(View.Help));
     ShowHistoryWindowCommand = new RelayCommand(() => _viewManager.Show(View.History));
 }
        public CountryDetailsWindowViewModel(ViewManager viewManager, ICountrySelector countrySelector)
        {
            CreateRelayCommands(viewManager);

            _countrySelector = countrySelector;

            Messenger.Default.Register<CountryToShowDetailsMessage>(this, SelectCountry);

            // For Expression Blend only
            if (IsInDesignModeStatic)
            {
                SelectedCountry = new Country {Tag = "no", Name = "Norway", Continent = "Europe", Capital = "Oslo"};
            }
        }
Esempio n. 3
0
        public ResultsWindowViewModel(ViewManager viewManager, ICountrySelector countrySelector)
        {
            CreateRelayCommands(viewManager);

            _countrySelector = countrySelector;

            Countries = new ObservableCollection<Country>();
            Messenger.Default.Register<SearchParamsMessage>(this, ParseMessageFromMainWindow);

            // For Expression Blend only
            if (IsInDesignModeStatic)
            {
                _countrySelector.GetCountriesByParams(Countries, 123, 345, 567);
            }
        }
        public CountriesListWindowViewModel(ViewManager viewManager, ICountrySelector countrySelector)
        {
            CreateRelayCommands(viewManager);

            _countrySelector = countrySelector;

            Countries = new ObservableCollection<Country>();
            _countrySelector.GetAllCountries(Countries);

            SelectedCountry = null;
            #if !WINDOWS_PHONE
            if (Countries.Count > 0)
                SelectedCountry = Countries[0];
            #endif

            CreateGroups();
        }
 private void CreateRelayCommands(ViewManager viewManager)
 {
     _viewManager = viewManager;
     ShowHelpWindowCommand = new RelayCommand(() => _viewManager.Show(View.Help));
 }
 private void CreateRelayCommands(ViewManager viewManager)
 {
     _viewManager = viewManager;
     ShowCountryDetailsWindowCommand = new RelayCommand(ShowCountryDetails);
     ShowHelpWindowCommand = new RelayCommand(() => _viewManager.Show(View.Help));
     SelectionChanged = new RelayCommand<object>(ChangeSelection);
 }
Esempio n. 7
0
 public MenuWindowViewModel(ViewManager viewManager)
 {
     CreateRelayCommands(viewManager);
 }
Esempio n. 8
0
 private void CreateRelayCommands(ViewManager viewManager)
 {
     _viewManager = viewManager;
     ShowInfoAboutCountryCommand = new RelayCommand<string>(ShowInfoAboutCountry);
 }
Esempio n. 9
0
 public MainWindowViewModel(ViewManager viewManager)
 {
     CreateRelayCommands(viewManager);
     ColorNumber = ShapeNumber = AddNumber = 0;
     ShowPleaseWaitInfo = false;
 }
Esempio n. 10
0
        private void CreateRelayCommands(ViewManager viewManager)
        {
            _viewManager = viewManager;

            ModifyColorNumberCommand = new RelayCommand<string>(ModifyColorNumber);
            ModifyShapeNumberCommand = new RelayCommand<string>(ModifyShapeNumber);
            ModifyAddNumberCommand = new RelayCommand<string>(ModifyAddNumber);
        }