private void tsmiOpenPacket_Click(object sender, EventArgs e) { ListView list = (ListView)tabControlMain.TabPages[tabControlMain.SelectedIndex].Controls[0]; var index = list.SelectedIndices[0]; var id = GetPacketIdFromTableItemIndex(list, index); var packet = PacketManager.PacketList[id]; Form showPacketForm = new ShowPacketForm(id, packet); showPacketForm.Show(); }
/// <summary> /// Al hacer click sobre una fila de la tabla, se abre el detalle del packet /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnMouseDoubleClick(object sender, MouseEventArgs e) { var list = (ListView)sender; if (list.SelectedIndices.Count <= 0) { return; } var index = list.SelectedIndices[0]; var id = GetPacketIdFromTableItemIndex(sender, index); var packet = PacketManager.PacketList[id]; Form showPacketForm = new ShowPacketForm(id, packet); showPacketForm.Show(); }