public CreatTask(ScheduleForm form, ListView view) { InitializeComponent(); scheduleform = form; listView = view; int i = 1; ComboBox.ObjectCollection Macs = new ComboBox.ObjectCollection(Computers); Macs.Insert(0, ""); foreach(ListViewItem item in view.Items) { if (i != view.Items.Count) { Macs.Insert(i, item.SubItems[1].Text); i++; } } Computers.DataSource = Macs; }
private void button1_Click(object sender, EventArgs e) { pythonListener.Send("GetSchedule#"); scheduleform = new ScheduleForm(this, ListViewComps); scheduleform.ShowDialog(); }