Ejemplo n.º 1
0
        public SignInViewModel(ISignInService signInService)
        {
            _publisher = Publisher.Instance;
            _publisher.SubscribeToPropertyChanges(this, "CurrentUser");
            _signInService = signInService;

            SignInCommand = new DelegateCommand(SignIn);
            SignOutCommand = new DelegateCommand(_signInService.SignOut);
        }
Ejemplo n.º 2
0
        public PlayerViewModel(IPlayerService playerService)
        {
            _publisher = Publisher.Instance;
            _publisher.SubscribeToPropertyChanges(this, "PlayingPosition", "Downloaded", "CurrentSong");
            _playerService = playerService;

            PlayCommand = new DelegateCommand(_playerService.Play);
            StopCommand = new DelegateCommand(_playerService.Stop);
            PauseCommand = new DelegateCommand(_playerService.Pause);
            NextCommand = new DelegateCommand(_playerService.NextSong);
            PreviousCommand = new DelegateCommand(_playerService.PreviousSong);
        }