Main
using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms; namespace TestTwinBox{ public partial class Form1 : Form { public Form1() { InitializeComponent(); ruTwinListbox1.listBoxLeft.Items.Add("Item 1"); ruTwinListbox1.listBoxLeft.Items.Add("Item 2"); ruTwinListbox1.listBoxLeft.Items.Add("Item 3"); } private void buttonOK_Click(object sender, EventArgs e) { string[] result = new string[3]; Console.WriteLine("\nNew result"); if (ruTwinListbox1.listBoxRight.Items.Count > 0) { for (int i = 0; i < ruTwinListbox1.listBoxRight.Items.Count; i++) { result[i] = ruTwinListbox1.listBoxRight.Items[i].ToString(); Console.WriteLine(result[i]); } } } }}
|