Esempio n. 1
0
        public void InitializeFile()
        {
            UserId = _userDataStorageService.GetUserEmail();
            if (UserId == null)
            {
                UserId = String.Empty;
            }
            string path = ApplicationData.Current.LocalFolder.Path + "/" + UserId + _resources["FavouriteDecksFileName"].ToString();

            if (!File.Exists(path))
            {
                File.Create(path);
            }
        }
        public void InitializeFiles()
        {
            UserId = _userDataStorageService.GetUserEmail();
            if (UserId == null)
            {
                UserId = String.Empty;
            }
            string path1 = ApplicationData.Current.LocalFolder.Path + "/" + UserId + _resources["TestedDecksFileName"].ToString();

            if (!File.Exists(path1))
            {
                File.Create(path1);
            }
            string path2 = ApplicationData.Current.LocalFolder.Path + "/" + UserId + _resources["StatisticsFileName"].ToString();

            if (!File.Exists(path2))
            {
                File.Create(path2);
            }
            string path3 = ApplicationData.Current.LocalFolder.Path + "/" + UserId + _resources["HistoryFileName"].ToString();

            if (!File.Exists(path3))
            {
                File.Create(path3);
            }
        }
Esempio n. 3
0
        public AccountService(IHttpService httpService, IUserDataStorageService userDataStorageService)
        {
            _httpService            = httpService;
            _userDataStorageService = userDataStorageService;

            if (_userDataStorageService.IsUserLoggedIn())
            {
                _httpService.SetAuthenticationHeader(_userDataStorageService.GetUserEmail(), _userDataStorageService.GetUserPassword());
            }
        }
        public AccountService(IEventAggregator eventAggregator, IHttpService httpService, IUserDataStorageService userDataStorageService)
        {
            _eventAggregator        = eventAggregator;
            _httpService            = httpService;
            _userDataStorageService = userDataStorageService;

            if (_userDataStorageService.IsUserSignedIn())
            {
                _httpService.SetAuthenticationHeader(_userDataStorageService.GetUserEmail(), _userDataStorageService.GetUserPassword());
            }
        }
Esempio n. 5
0
 public string GetUserEmail()
 {
     return(_userDataStorageService.GetUserEmail());
 }