乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      在C#中實現(xiàn)兩個listbox的項移動(winform)

       昵稱10504424 2013-02-20
          1. using System;  
          2. using System.Collections.Generic;  
          3. using System.ComponentModel;  
          4. using System.Data;  
          5. using System.Drawing;  
          6. using System.Linq;  
          7. using System.Text;  
          8. using System.Windows.Forms;  
          9.   
          10. namespace arblistbox  
          11. {  
          12.     public partial class Form1 : Form  
          13.     {  
          14.         public Form1()  
          15.         {  
          16.             InitializeComponent();  
          17.   
          18.         }  
          19.   
          20.         private void button1_Click(object sender, EventArgs e)  
          21.         {  
          22.             if (listBox1.Items.Count == 0)  
          23.                 return;  
          24.             if (listBox1.SelectedItem == null)  
          25.                 return;  
          26.             listBox2.Items.Add(listBox1.SelectedItem);  
          27.             listBox1.Items.Remove(listBox1.SelectedItem);  
          28.               
          29.   
          30.         }  
          31.   
          32.         private void button2_Click(object sender, EventArgs e)  
          33.         {  
          34.             if (listBox1.Items.Count == 0)  
          35.                 return;  
          36.             for(int i=0;i<listBox1.Items.Count;i++)  
          37.             {  
          38.                listBox2.Items.Add(listBox1.Items[i]);  
          39.             }  
          40.   
          41.             for (int j = 0; j< listBox2.Items.Count;j++)  
          42.             {  
          43.                 listBox1.Items.Remove(listBox2.Items[j]);  
          44.             }  
          45.   
          46.         }  
          47.   
          48.         private void button3_Click(object sender, EventArgs e)  
          49.         {  
          50.             if (listBox2.Items.Count == 0)  
          51.                 return;  
          52.             if (listBox2.SelectedItem == null)  
          53.                 return;  
          54.             listBox1.Items.Add(listBox2.SelectedItem);  
          55.             listBox2.Items.Remove(listBox2.SelectedItem);  
          56.   
          57.         }  
          58.   
          59.         private void button4_Click(object sender, EventArgs e)  
          60.         {  
          61.             if (listBox2.Items.Count == 0)  
          62.                 return;  
          63.             for (int i = 0; i < listBox2.Items.Count; i++)  
          64.             {  
          65.                 listBox1.Items.Add(listBox2.Items[i]);  
          66.             }  
          67.   
          68.             for (int j = 0; j < listBox1.Items.Count; j++)  
          69.             {  
          70.                 listBox2.Items.Remove(listBox1.Items[j]);  
          71.             }  
          72.   
          73.         }  
          74.     }  
          75. }  

        本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多