zoukankan      html  css  js  c++  java
  • checkedListBox筛选器

     ///转移全部
            private void buttonSendAll2Nosend_Click(object sender, EventArgs e)
            {
                for (int i = 0; i < this.checkedListBoxSend.Items.Count; i++)
                {
                    this.checkedListBoxSiftEmail.Items.AddRange(this.checkedListBoxSend.Items);
                    this.checkedListBoxSend.Items.Clear();
                }
            }
    
            private void buttonNosendToSendAll_Click(object sender, EventArgs e)
            {
                for (int i = 0; i < this.checkedListBoxSiftEmail.Items.Count; i++)
                {
                    this.checkedListBoxSend.Items.AddRange(this.checkedListBoxSiftEmail.Items);
                    this.checkedListBoxSiftEmail.Items.Clear();
                }
            }
    
            private void buttonSendChoickedToNosend_Click(object sender, EventArgs e)
            {
                for (int i = 0; i < this.checkedListBoxSend.Items.Count; i++)
                {
                    if (checkedListBoxSend.GetItemChecked(i))
                    {
                        this.checkedListBoxSiftEmail.Items.Add(checkedListBoxSend.GetItemText(checkedListBoxSend.Items[i]));
                        this.checkedListBoxSend.Items.RemoveAt(i);
                    }
                }
            }
    
            ///转移选中行
            private void buttonNosendToSend_Click(object sender, EventArgs e)
            {
                for (int i = 0; i < this.checkedListBoxSiftEmail.Items.Count; i++)
                {
                    if (checkedListBoxSiftEmail.GetItemChecked(i))
                    {
                        this.checkedListBoxSend.Items.Add(checkedListBoxSiftEmail.GetItemText(checkedListBoxSiftEmail.Items[i]));
                        this.checkedListBoxSiftEmail.Items.RemoveAt(i);
                    }
                }
            }
    
            ///设置选中行勾选
            private void checkedListBoxSend_MouseClick(object sender, MouseEventArgs e)
            {
                this.checkedListBoxSend.SetItemChecked(this.checkedListBoxSend.SelectedIndex,true);
            }
    
            private void checkedListBoxSiftEmail_MouseClick(object sender, MouseEventArgs e)
            {
                this.checkedListBoxSiftEmail.SetItemChecked(this.checkedListBoxSiftEmail.SelectedIndex, true);
            }
  • 相关阅读:
    联合省选 2020 题解
    [省选联考 2020 A 卷] 组合数问题
    【NOI2016】循环之美
    MySQL 之 json 数据操作
    使用Redis和定时实现延时消费
    事务,这次还有不清楚的吗,一次实战坑
    哨兵redis配置
    记录一次shell脚本的使用
    记录一次工作中的SQL优化,临时表和CountDownLatch
    JAVA流读取文件并保存数据
  • 原文地址:https://www.cnblogs.com/maijin/p/2816188.html
Copyright © 2011-2022 走看看