private void listView_DoubleClick(object sender, EventArgs e) { if (listView.SelectedIndices.Count == 1) { Form frm = null; ListViewItem lvi = listView.SelectedItems[0]; if (lvi.Tag != null) { switch (currentType) { case TypeExploitant: frm = new FormExploitant(lvi.Tag as Exploitant); break; case TypeParcelle: frm = new FormParcelle(); break; case TypeTraitement: break; case TypePulverisation: frm = new FormEpendage(); break; } if (frm != null) frm.ShowDialog(); } } }
private void lvEpandages_DoubleClick(object sender, EventArgs e) { FormEpendage frm = new FormEpendage(); frm.ShowDialog(); }