private void button1_Click(object sender, EventArgs e) { if (textBox1.Text != "") { searcheduser = userService.getUser(textBox1.Text); if (searcheduser != null) { button4.Show(); profileView1.Show(); searcheduser.Clone(userService.getPosts(searcheduser), userService.getFollowers(searcheduser), userService.getFollowing(searcheduser)); if (searcheduser.followers.Contains(currentUser.username)) { follower = true; button4.Text = "unfollow"; } else { follower = false; button4.Text = "follow"; } pI = new ProfileIterator(searcheduser.publication, 2); pI.resetIterator(); posts = new List <string>(); posts = pI.getProfiles(); getPosts(); profileView1.sendUser(searcheduser); } } }
public void update(User u, UserService us) { currentUser = u; userService = us; pI = new ProfileIterator(u.publication, 3); pI.resetIterator(); posts = new List <string>(); posts = pI.getProfiles(); getPosts(); }
public void logOut() { profileView1.Hide(); viewPublication1.Hide(); viewPublication2.Hide(); button2.Hide(); button3.Hide(); textBox1.Text = ""; currentUser = null; searcheduser = null; button4.Hide(); posts = new List <string>(); pI = new ProfileIterator(posts, 2); pI.getProfiles(); getPosts(); }
private void button1_Click(object sender, EventArgs e) { pI.navigateBack(); posts = pI.getProfiles(); getPosts(); }