예제 #1
0
        public EditarJogadorPopupViewModel(INavigationService navigationService,
                                           IDialogService dialogService,
                                           ITeeService teeService,
                                           IHandicapService handicapService,
                                           IGeneroService generoService,
                                           ICameraService cameraService)
            : base(navigationService, dialogService)
        {
            _teeService      = teeService;
            _handicapService = handicapService;
            _generoService   = generoService;
            _cameraService   = cameraService;

            InicializarComunicacaoMediador();

            Task.Run(async() => await InicializarDados());

            Email = new ValidatableObject <string>();
            Email.RegrasValidacao.AddRange(new List <IValidationRule <string> >()
            {
                new EmailValidationRule <string>(), new EspacoEmBrancoValidationRule <string>(), new EmptyValidationRule <string>()
            });

            Nome = new ValidatableObject <string>();
            Nome.RegrasValidacao.AddRange(new List <IValidationRule <string> >()
            {
                new EspacoEmBrancoValidationRule <string>(), new EmptyValidationRule <string>()
            });
        }
예제 #2
0
        protected override void LimparMemoria()
        {
            _teeService      = null;
            _handicapService = null;
            _generoService   = null;
            _cameraService   = null;

            TeesExistentes    = null;
            GenerosExistentes = null;
            HandicapMinimo    = null;
            HandicapMaximo    = null;

            _jogador = null;
            Nome     = null;
            Email    = null;
            Foto     = null;
            Genero   = null;
            Tee      = null;
            Handicap = null;

            TirarFotoCommand      = null;
            GuardarDadosCommand   = null;
            RemoverJogadorCommand = null;
            CancelarEdicaoCommand = null;
            ResetEmailCommand     = null;

            base.LimparMemoria();
        }
예제 #3
0
 public HandicapsController(IHandicapService handicapService)
 {
     this._handicapService = handicapService;
 }