示例#1
0
        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();
        }
示例#2
0
        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();
        }
示例#3
0
 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 + " )");
     }
 }
示例#4
0
文件: test.cs 项目: amir9979/sadna
        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));
        }