private void modifyChannelToolStripMenuItem_Click(object sender, EventArgs e) { ListViewItem item = channelList.SelectedItems[0]; if (item == null) return; DialogResult dr = new DialogResult(); Channel c = (Channel)item.Tag; AddChannelDlg addChannelDlg = new AddChannelDlg(c.Number, c.VirtualNumber, c.ProxyProgram, c.Name, c.Callsign); dr = addChannelDlg.ShowDialog(); if (dr == DialogResult.OK) { c.Number = addChannelDlg.Number; c.Callsign = addChannelDlg.Callsign; c.Name = addChannelDlg.Name; c.ProxyProgram = addChannelDlg.Proxy; c.VirtualNumber = addChannelDlg.VirtualNumber; //RenderChannelList(); CacheChannels(); } }
private void addAChannelToolStripMenuItem_Click(object sender, EventArgs e) { DialogResult dr = new DialogResult(); AddChannelDlg addChannelDlg = new AddChannelDlg(); dr = addChannelDlg.ShowDialog(); if (dr == DialogResult.OK) { if (device == "") { device = device_tb.Text; } if (tuner == "") { tuner = tuner_cb.Text; } Channel c = new Channel(addChannelDlg.Number, device, tuner); c.Callsign = addChannelDlg.Callsign; c.Name = addChannelDlg.Name; c.ProxyProgram = addChannelDlg.Proxy; c.VirtualNumber = addChannelDlg.VirtualNumber; channels.Add(c); RenderChannelList(); CacheChannels(); } }