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"}; } }
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); }
public MenuWindowViewModel(ViewManager viewManager) { CreateRelayCommands(viewManager); }
private void CreateRelayCommands(ViewManager viewManager) { _viewManager = viewManager; ShowInfoAboutCountryCommand = new RelayCommand<string>(ShowInfoAboutCountry); }
public MainWindowViewModel(ViewManager viewManager) { CreateRelayCommands(viewManager); ColorNumber = ShapeNumber = AddNumber = 0; ShowPleaseWaitInfo = false; }
private void CreateRelayCommands(ViewManager viewManager) { _viewManager = viewManager; ModifyColorNumberCommand = new RelayCommand<string>(ModifyColorNumber); ModifyShapeNumberCommand = new RelayCommand<string>(ModifyShapeNumber); ModifyAddNumberCommand = new RelayCommand<string>(ModifyAddNumber); }