public MainViewModel(IFutebolApiService futebolApiService) { _futebolApiService = futebolApiService; Ligas = new ObservableCollection <Liga>(); SobreCommand = new Command(ExecuteSobreCommand); LoginCommand = new Command(ExecuteLoginCommand); ShowLigaCommand = new Command <Liga>(ExecuteShowLigaCommand); Title = "Futebol App"; }
public LoginViewModel(IFutebolApiService futebolApiService) { _futebolApiService = futebolApiService; Title = "Login"; LoginCommand = new Command(ExecuteLoginCommand, CanExecuteLoginCommand); LogoutCommand = new Command(ExecuteLogoutCommand, CanExecuteLogoutCommand); LoadUserData(); }
public LigaDetalheViewModel(IFutebolApiService futebolApiService, Liga liga) { _futebolApiService = futebolApiService; _liga = liga; if (_liga.CurrentMatchday == 0) { _liga.CurrentMatchday = 1; } Title = _liga.Caption; JogosRodadaAtual = new ObservableCollection <Fixture>(); Classificacao = new ObservableCollection <LeagueTableStanding>(); ShowProximaRodadaCommand = new Command(ExecuteProximaRodadaCommand, CanExecuteProximaRodadaCommand); ShowRodadaAnteriorCommand = new Command(ExecuteRodadaAnteriorCommand, CanExecuteRodadaAnteriorCommand); RodadaAtual = _liga.CurrentMatchday; }