예제 #1
0
 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();
             }
         }
     }
 }
예제 #2
0
파일: WizardForm.cs 프로젝트: dgis/CodeTV
 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();
             }
         }
     }
 }