//双击公告 private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e) { FmNewsDetail fmNewsDetail = new FmNewsDetail("公告内容", newsModelList[this.listBox1.SelectedIndex]); fmNewsDetail.ShowDialog(); }
//修改公告 private void button4_Click(object sender, EventArgs e) { //bug:未选中之前点击会空指针 FmNewsDetail fmNewsDetail = new FmNewsDetail("修改内容", newsModelList[this.checkedListBox1.SelectedIndex],true); fmNewsDetail.ShowDialog(); }