public UserRecommendationsViewModel()
        {
            _likeUserCommand = new RelayCommand(LikeUser);
            _rejectUserCommand = new RelayCommand(RejectUser);

            if (TinderSession.CurrentSession != null && TinderSession.CurrentSession.IsAuthenticated && TinderSession.CurrentSession.Recommendations.Count > 0)
            {
                _currentRec = TinderSession.CurrentSession.Recommendations.Pop();

                RaisePropertyChanged("PhotoCount");
                RaisePropertyChanged("Name");
                RaisePropertyChanged("Age");
                RaisePropertyChanged("FriendCount");
                RaisePropertyChanged("LikeCount");
                RaisePropertyChanged("LikesBrush");
                RaisePropertyChanged("FriendsBrush");
                RaisePropertyChanged("PhotosBrush");
                RaisePropertyChanged("ProfilePhoto");
                RaisePropertyChanged("CurrentReccomendation");
            }
        }
Esempio n. 2
0
 public UserInfoViewModel()
 {
     if (System.ComponentModel.DesignerProperties.IsInDesignTool)
         _data = JsonConvert.DeserializeObject<UserResult>(@"{""_id"":""528326b8c9f97bc0740021ba"",""bio"":""We can tell everyone we met at a Star Wars convention."",""birth_date"":""1978-07-08T00:00:00.000Z"",""gender"":1,""name"":""Natalie"",""ping_time"":""2014-01-13T19:24:27.976Z"",""photos"":[{""id"":""f77097c0-3dcf-4ee3-86c8-19004405e147"",""main"":""main"",""shape"":""center_square"",""fileName"":""f77097c0-3dcf-4ee3-86c8-19004405e147.jpg"",""extension"":""jpg"",""processedFiles"":[{""width"":640,""height"":640,""url"":""http://images.gotinder.com/528326b8c9f97bc0740021ba/640x640_f77097c0-3dcf-4ee3-86c8-19004405e147.jpg""},{""width"":320,""height"":320,""url"":""http://images.gotinder.com/528326b8c9f97bc0740021ba/320x320_f77097c0-3dcf-4ee3-86c8-19004405e147.jpg""},{""width"":172,""height"":172,""url"":""http://images.gotinder.com/528326b8c9f97bc0740021ba/172x172_f77097c0-3dcf-4ee3-86c8-19004405e147.jpg""},{""width"":84,""height"":84,""url"":""http://images.gotinder.com/528326b8c9f97bc0740021ba/84x84_f77097c0-3dcf-4ee3-86c8-19004405e147.jpg""}],""url"":""http://images.gotinder.com/528326b8c9f97bc0740021ba/f77097c0-3dcf-4ee3-86c8-19004405e147.jpg""},{""id"":""98910d82-d7aa-43c2-b57e-6f943a6a19fa"",""shape"":""center_square"",""fileName"":""98910d82-d7aa-43c2-b57e-6f943a6a19fa.jpg"",""extension"":""jpg"",""processedFiles"":[{""width"":640,""height"":640,""url"":""http://images.gotinder.com/528326b8c9f97bc0740021ba/640x640_98910d82-d7aa-43c2-b57e-6f943a6a19fa.jpg""},{""width"":320,""height"":320,""url"":""http://images.gotinder.com/528326b8c9f97bc0740021ba/320x320_98910d82-d7aa-43c2-b57e-6f943a6a19fa.jpg""},{""width"":172,""height"":172,""url"":""http://images.gotinder.com/528326b8c9f97bc0740021ba/172x172_98910d82-d7aa-43c2-b57e-6f943a6a19fa.jpg""},{""width"":84,""height"":84,""url"":""http://images.gotinder.com/528326b8c9f97bc0740021ba/84x84_98910d82-d7aa-43c2-b57e-6f943a6a19fa.jpg""}],""url"":""http://images.gotinder.com/528326b8c9f97bc0740021ba/98910d82-d7aa-43c2-b57e-6f943a6a19fa.jpg""}],""birth_date_info"":""fuzzy birthdate active, not displaying real birth_date"",""id"":""528326b8c9f97bc0740021ba"",""common_friends"":[],""common_likes"":[""14352220141""],""common_like_count"":1,""common_friend_count"":0,""distance_mi"":29}");
 }
Esempio n. 3
0
 public UserInfoViewModel(UserResult data)
 {
     _data = data;
 }
        public async void NextRecommendation()
        {
            if (TinderSession.CurrentSession.Recommendations.Count > 0)
                _currentRec = TinderSession.CurrentSession.Recommendations.Pop();
            else
                _currentRec = null;
            RaisePropertyChanged("PhotoCount");
            RaisePropertyChanged("Name");
            RaisePropertyChanged("Age");
            RaisePropertyChanged("FriendCount");
            RaisePropertyChanged("LikeCount");
            RaisePropertyChanged("ProfilePhoto");
            RaisePropertyChanged("CurrentReccomendation");
            RaisePropertyChanged("LikesBrush");
            RaisePropertyChanged("FriendsBrush");
            RaisePropertyChanged("PhotosBrush");

            if (TinderSession.CurrentSession.Recommendations.Count == 0)
                await TinderSession.CurrentSession.GetRecommendations().ConfigureAwait(false);
        }