private void listViewChannelNumbering_DoubleClick(object sender, EventArgs e) { if (listViewChannelNumbering.SelectedItems.Count > 0) { ListViewItem lvi = listViewChannelNumbering.SelectedItems[0]; if (lvi.Tag is ChannelTV) { ChannelReNumberingForm dlg = new ChannelReNumberingForm(); try { dlg.numericUpDownNumber.Value = decimal.Parse(lvi.SubItems[1].Text); } catch { dlg.numericUpDownNumber.Value = -1; } if (dlg.ShowDialog(this) == DialogResult.OK) { lvi.SubItems[1].Text = dlg.numericUpDownNumber.Value.ToString(); } } } }