Exemple #1
0
 //选择项目事件
 private void ChkItemsBox_KeyDown(object sender, KeyEventArgs e)
 {
     cbExplain.Text = "";
     if (ChkItemsBox.GetItemChecked(this.ChkItemsBox.SelectedIndex) == false)
     {
         this.ChkItemsBox.SetItemChecked(this.ChkItemsBox.SelectedIndex, true);
     }
     else
     {
         this.ChkItemsBox.SetItemChecked(this.ChkItemsBox.SelectedIndex, false);
     }
     ChkItemsBox_SelectedIndexChanged(sender, e);
 }
 // 选择项目
 private void ChkItemsBox_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyValue != 13)
     {
         return;
     }
     if (ChkItemsBox.GetItemChecked(this.ChkItemsBox.SelectedIndex) == false)
     {
         this.ChkItemsBox.SetItemChecked(this.ChkItemsBox.SelectedIndex, true);
     }
     else
     {
         this.ChkItemsBox.SetItemChecked(this.ChkItemsBox.SelectedIndex, false);
     }
     ChkItemsBox_SelectedIndexChanged(sender, e);
 }