Example #1
0
        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";
        }
Example #2
0
        public LoginViewModel(IFutebolApiService futebolApiService)
        {
            _futebolApiService = futebolApiService;

            Title = "Login";

            LoginCommand  = new Command(ExecuteLoginCommand, CanExecuteLoginCommand);
            LogoutCommand = new Command(ExecuteLogoutCommand, CanExecuteLogoutCommand);

            LoadUserData();
        }
Example #3
0
        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;
        }