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; } }
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; }
public void UserSearch(UserProfile tup) { ChangeGlobelSearchType(1); txtSearchBox.Text = tup.ScreenName; }
partial void InsertUserProfile(UserProfile instance);
partial void UpdateUserProfile(UserProfile instance);
//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; }
partial void DeleteUserProfile(UserProfile instance);
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); } }
void RemoveGroupMember(UserProfile tup) { _userProfileGroupList.Remove(tup); listGroupMembers.ItemsSource = _userProfileGroupList; }
void AddGroupMembers(UserProfile UserProfile) { _userProfileGroupList.Add(UserProfile); listGroupMembers.ItemsSource = _userProfileGroupList; }
void AddFollowingList(UserProfile tup) { _userProfileList.Add(tup); listGroupsFollowing.ItemsSource = _userProfileList; }
public void RemoveFollowing(UserProfile tup) { _userProfileList.Remove(tup); listGroupsFollowing.ItemsSource = _userProfileList; }