コード例 #1
0
        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();
        }
コード例 #2
0
        /// <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();
        }