private void ListBox1_DoubleClick(object sender, EventArgs e) { if (listBox1.SelectedIndex != -1) { KeresesForm dialogus = new KeresesForm(radioButton1.Checked, (Elelmiszer)listBox1.SelectedItem); dialogus.ShowDialog(); } }
private void Button7_Click(object sender, EventArgs e) { if (listBox1.Items.Count > 0) { KeresesForm dialogus = new KeresesForm(radioButton1.Checked, null); dialogus.ShowDialog(); } }