public void SetUserDetails(UserProfile tup)
 {
     if (!DesignerProperties.GetIsInDesignMode(this))
     {
         BitmapImage imgSource = new BitmapImage(new Uri(tup.ProfileImageUrl));
         imgUserPhoto.Source = imgSource;
         tbUserName.Text = tup.ScreenName;
         tbUserDesc.Text = tup.Description;
         tbLocation.Text = tup.Location;
         tbFollowers.Text = Convert.ToString((int)tup.FollowersCount);
         tbFollowing.Text = Convert.ToString((int)tup.FriendsCount);
         dmuserProfile.CommandParameter = tup.ScreenName;
         btnUnFollow.Visibility = Visibility.Visible;
         btnFollow.Visibility = Visibility.Collapsed;
         btnUnFollow.DataContext = tup;
     }
 }
Example #2
0
		private void detach_UserProfiles(UserProfile entity)
		{
			this.SendPropertyChanging();
			entity.Account = null;
		}
        private void SetUserProfile(UserProfile tup)
        {
            UserAllTweets profileView;

            if (_panelViewDict.ContainsKey("ProfileView"))
            {
                profileView = _panelViewDict["ProfileView"];
            }
            else
            {
                profileView = new UserAllTweets();
                profileView.DataTemplate = profileView.FindResource("SearchUsersListDataTemplate") as DataTemplate;
                _panelViewDict.Add("ProfileView", profileView);
            }

            //SortableObservableCollection<TOBEntityBase> collection = new SortableObservableCollection<TOBEntityBase>(_statusCollection.Where(s => (s as Status).UserProfile.ScreenName == tup.ScreenName).Cast<TOBEntityBase>());
            //profileView.Collection = collection;

            profileView.CollectionFilter = s => (s as Status).UserProfile.ScreenName == tup.ScreenName;
            profileView.Collection = _statusCollection;
            _mainWindow.frmTOBMain.Content = profileView;
            _tweetSender.UserSearch(tup);
            _userProfileView.SetUserDetails(tup);
            _userProfileView.Visibility = Visibility.Visible;
            _currentTweetsView = profileView;
        }
Example #4
0
 public void UserSearch(UserProfile tup)
 {
     ChangeGlobelSearchType(1);
     txtSearchBox.Text = tup.ScreenName;
 }
Example #5
0
partial         void InsertUserProfile(UserProfile instance);
Example #6
0
partial         void UpdateUserProfile(UserProfile instance);
Example #7
0
        //public override void GetMembersOfList(string userName, long listId)
        //{
        //    IFluentTwitter request = AuthenticateUser(Acc);
        //    var getMember = request.Lists().GetMembersOf(userName, listId).AsJson().Request().AsUsers();
        //}
        private UserProfile GetTOBUserFromTSUser(TwitterUser profile, UserProfile updateProfile)
        {
            UserProfile localProfile = null;

            if (profile != null)
            {
                if (updateProfile != null)
                {
                    localProfile = updateProfile;
                }
                else
                {
                    localProfile = new UserProfile();
                }

                localProfile.TwitterCreatedDate = profile.CreatedDate;
                localProfile.Description = profile.Description;
                localProfile.FavouritesCount = profile.FavouritesCount;
                localProfile.FollowersCount = profile.FollowersCount;
                localProfile.FriendsCount = profile.FriendsCount;
                localProfile.UserId = profile.Id;
                localProfile.IsProfileBackgroundTiled = profile.IsProfileBackgroundTiled;
                localProfile.IsProtected = profile.IsProtected;
                //localProfile.IsFollowing = profile;
                localProfile.Location = profile.Location;
                localProfile.Name = profile.Name;
                localProfile.ProfileBackgroundColor = profile.ProfileBackgroundColor;
                localProfile.ProfileBackgroundImageUrl = profile.ProfileBackgroundImageUrl;
                localProfile.ProfileImageUrl = profile.ProfileImageUrl;
                localProfile.ProfileLinkColor = profile.ProfileLinkColor;
                localProfile.ProfileSidebarBorderColor = profile.ProfileSidebarBorderColor;
                localProfile.ProfileSidebarFillColor = profile.ProfileSidebarFillColor;
                localProfile.ProfileTextColor = profile.ProfileTextColor;
                localProfile.ScreenName = profile.ScreenName;
                localProfile.StatusesCount = profile.StatusesCount;
                localProfile.TimeZone = profile.TimeZone;
                localProfile.UserUrl = profile.Url;
                localProfile.UtcOffset = profile.UtcOffset;
                //Associate current account id with either User's own profile or Friends User's profile
                localProfile.AccountId = Acc.Id;
                localProfile.LastUpdated = DateTime.Now;

            }
            return localProfile;
        }
Example #8
0
partial         void DeleteUserProfile(UserProfile instance);
Example #9
0
 private void RemoveMemberFromList(UserProfile tup)
 {
     if (tbListId.Text != "")
     {
         Account account = LocalAccountBO.Get(ac => ac.Username == cmbAccount.Text);
         TOBBaseObject Twitter = AccountManager.Instance.GetTOBObject(account);
         long listId = Int64.Parse(tbListId.Text);
         Twitter.RemoveMemberFromList(account.Username, listId, (long)tup.UserId);
     }
 }
Example #10
0
 void RemoveGroupMember(UserProfile tup)
 {
     _userProfileGroupList.Remove(tup);
     listGroupMembers.ItemsSource = _userProfileGroupList;
 }
Example #11
0
 void AddGroupMembers(UserProfile UserProfile)
 {
     _userProfileGroupList.Add(UserProfile);
     listGroupMembers.ItemsSource = _userProfileGroupList;
 }
Example #12
0
 void AddFollowingList(UserProfile tup)
 {
     _userProfileList.Add(tup);
     listGroupsFollowing.ItemsSource = _userProfileList;
 }
Example #13
0
 public void RemoveFollowing(UserProfile tup)
 {
     _userProfileList.Remove(tup);
     listGroupsFollowing.ItemsSource = _userProfileList;
 }