Exemplo n.º 1
0
        public LoginViewModel(ILoginService loginService, ISettingsService settingsService)
        {
            this.loginService = loginService;
            this.settingsService = settingsService;
            this.LoginCommand = new RelayCommand(async () =>
            {
                Debug.WriteLine("Login...");
                var token = await loginService.GetAccessTokenAsync(Username, Password);
                await this.settingsService.SaveItemAsync(token, "access_token");

                Messenger.Default.Send(new NavigationMessage(typeof(FriendsPage), null));
            });
        }