예제 #1
0
        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);
                }
            }
        }
예제 #2
0
 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();
 }
예제 #3
0
 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();
 }
예제 #4
0
 private void button1_Click(object sender, EventArgs e)
 {
     pI.navigateBack();
     posts = pI.getProfiles();
     getPosts();
 }