private void lstNon_DoubleClick(object sender, EventArgs e) { TaskUI task = new TaskUI(); task.Text = lstNon.SelectedItem.ToString(); task.ShowDialog(); }
private void btSelect_Click(object sender, EventArgs e) { TaskUI task = new TaskUI(); if (lstFunc.SelectedIndex < 0) { task.Text = lstNon.SelectedItem.ToString(); } else { task.Text = lstFunc.SelectedItem.ToString(); } task.ShowDialog(); }