private void lstvChannel_DoubleClick(object sender, EventArgs e) { FChannel frm = new FChannel(this, channelSet, channelIndex); frm.ShowDialog(pMain); lstvChannel.Items[channelIndex].Selected = true; }
private void lstvChannel_DoubleClick(object sender, EventArgs e) { int selectIndex = lstvChannel.SelectedIndices[0]; int itemIndex = (int)lstvChannel.SelectedItems[0].Tag; FChannel frm = new FChannel(this, channelSet, itemIndex); frm.ShowDialog(pMain); lstvChannel.Items[selectIndex].Selected = true; }
private void btnChannelAdd_Click(object sender, EventArgs e) { int count = channelSet.Count; FChannel frm = new FChannel(this, channelSet); frm.ShowDialog(pMain); if (channelSet.Count > count) // Add successfully { channelIndex = count; lstvChannel.Items[channelIndex].Selected = true; } }
private void btnChannelCopy_Click(object sender, EventArgs e) { int count = channelSet.Count; FileOutChannel copyChannel = channelSet[channelIndex].Clone(); copyChannel.ChannelName += "_copy"; FChannel frm = new FChannel(this, channelSet, copyChannel); frm.ShowDialog(pMain); if (channelSet.Count > count) { // Add successfully channelIndex = count; lstvChannel.Items[channelIndex].Selected = true; } }
private void btnChannelAdd_Click(object sender, EventArgs e) { int count = channelSet.Count; FChannel frm = new FChannel(this, channelSet); frm.ShowDialog(pMain); if (channelSet.Count > count) // Add successfully { int i = 0; foreach (ListViewItem viewItem in lstvChannel.Items) { if ((int)viewItem.Tag == count) { lstvChannel.Items[i].Selected = true; break; } i++; } } }