/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel(IOpenLigaService openLigaService, ILeagueAndSeasonInfoService leageAndSeasonInfoService) { _openLigaService = openLigaService; _leagueAndSeasonInfoService = leageAndSeasonInfoService; if (IsInDesignMode) { // Code runs in Blend --> create design time data. } else { this.MessengerInstance.Register <ModalDialogMessage>(this, ShowDialog); this.MessengerInstance.Register <TabMessage>(this, HandleTab); // Code runs "for real" } Tabs.Add(CreateLeaguesTab()); }
public LeaguesViewModel(ILeagueAndSeasonInfoService leagueAndSeasonInfoService) { _leagueAndSeasonInfoService = leagueAndSeasonInfoService; AddAllLeagues(); }