private void listBox3_SelectedIndexChanged(object sender, EventArgs e) { List <PostInfo> AllComments = myConnection.WatchAllComments(CurrentState.currentPostInfo); TheNewCommetWindow NewCommetWindow = new TheNewCommetWindow(myConnection, this.CurrentState, AllComments.ElementAt(listBox3.SelectedIndex)); NewCommetWindow.Show(); }
private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { List <PostInfo> allPost = myConnection.WatchAllComments(ChoosenPost); TheNewCommetWindow newWind = new TheNewCommetWindow(myConnection, CurrentState, allPost.ElementAt(listBox1.SelectedIndex)); newWind.Show(); }
private void refreshAllPost() { listBox1.Items.Clear(); this.allPost = myConnection.WatchAllComments(SubjectPost); for (int i = 0; i < allPost.Count; i++) { listBox1.Items.Add(allPost.ElementAt(i).msg + " ( " + allPost.ElementAt(i).owner.fullname + " )"); } }
public void TestWatchAllComments() //need to return true only to values { List <PostInfo> posts = forum.WatchAllComments(makeTestPost(1)); Assert.AreEqual(3, posts.Count); Assert.IsTrue(testPost(posts[0], 1)); Assert.IsTrue(testPost(posts[1], 2)); Assert.IsTrue(testPost(posts[2], 3)); }