日期:2014-05-17  浏览次数:20985 次

c# winform如何实现下面的界面?

------解决方案--------------------
 public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            InitData();
        }
 
        /// <summary>
        /// Ctrl/shift实现多选
        /// </summary>
        void InitData()
        {
            listBox1.SelectionMode = listBox2.SelectionMode = SelectionMode.MultiExtended;
            listBox1.Items.Add("001");
            listBox1.Items.Add("002");
        }
 
        private void button1_Click(object sender, EventArgs e)
        {
            foreach(var selectItem in listBox1.SelectedItems)
            {             
                if(!listBox2.Items.Contains(selectItem))
                    listBox2.Items.Add(selectItem);
            } 
        }
 
        private void button2_Click(object sender, EventArgs e)
        {
            foreach (var selectItem in listBox2.SelectedItems)