예제 #1
0
 private void button3_Click(object sender, EventArgs e)
 {
     if (listBox1.SelectedIndex >= 0)
     {
         myConnection.deletePost(this.allPost.ElementAt(listBox1.SelectedIndex));
     }
     refreshAllPost();
 }
예제 #2
0
        private void button5_Click(object sender, EventArgs e)
        {
            int ind = listBox2.SelectedIndex;

            if (ind >= 0)
            {
                PostInfo p = CurrentState.currentPostInfo;
                myConnection.deletePost(p);
                CurrentState.currentPostInfo = null;
                listBox3.Items.Clear(); listBox2.Items.Clear();
                this.allThreads = myConnection.WatchAllThreads(this.CurrentState.currentSubForumInfo);
                for (int i = 0; i < this.allThreads.Count; i++)
                {
                    listBox2.Items.Add(allThreads.ElementAt(i).msg);
                }
            }
        }
예제 #3
0
파일: test.cs 프로젝트: amir9979/sadna
        public void TestdeletePost() //need to return true only to values
        {
            Assert.IsTrue(forum.deletePost(makeTestPost(1)));

            Assert.IsFalse(forum.deletePost(makeTestPost(3)));
        }