Exemplo n.º 1
0
        private void sendCanPacketsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SendPacketForm sendPacketForm = new SendPacketForm(this.udpSender);

            sendPacketForm.MdiParent = this;
            sendPacketForm.Show();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            CanPacket currentPacket = (CanPacket)dataGridView1.CurrentRow.DataBoundItem;

            if (currentPacket == null)
            {
                MessageBox.Show("Please select a CanPacket");
            }
            else
            {
                SendPacketForm sendPacketForm = new SendPacketForm(this.udpSender, currentPacket.getRawBytesString());
                sendPacketForm.MdiParent = this.MdiParent;
                sendPacketForm.Show();
            }
        }