private void PGridSend_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { var hti = PGridSend.HitTest(e.X, e.Y); PGridSend.ClearSelection(); PGridSend.Rows[hti.RowIndex].Selected = true; textBox1.Text = Program.SendPackets[hti.RowIndex].Dump(); } }
private void PGridSend_MouseDown(object sender, MouseEventArgs e) { if (e.Button != MouseButtons.Left) { return; } DataGridView.HitTestInfo hti = PGridSend.HitTest(e.X, e.Y); PGridSend.ClearSelection(); if (Program.SendPackets.Count < hti.RowIndex + 1) { textBox1.Text = ""; return; } PGridSend.Rows[hti.RowIndex].Selected = true; textBox1.Text = Program.SendPackets[hti.RowIndex].Dump(false); }