private void RawDataToolStripMenuItem_Click(object sender, EventArgs e)
 {
     receivePacketForm = new ReceivePacketForm()
     {
         MdiParent = this
     };
     receivePacketForm.Show();
 }
Esempio n. 2
0
        private void NetworkDefinitionView_NodeMouseDoubleClick(object sender,TreeNodeMouseClickEventArgs e)
        {
            ConfigService configManager = ConfigService.Instance;

            CanTreeTag tag = (CanTreeTag)e.Node.Tag;

            bool clickedNode = false;

            if (tag.NodeType == CanTreeTag.NODE)
            {
                clickedNode = true;
            }

            Form form = null;

            if (clickedNode)
            {
                form = configManager.FormForNode(tag.Node);
            }
            if (form != null)
            {
                form.MdiParent = this.ParentForm;
                form.Show();
            }
            else
            {
                // If we have clicked on an individual message then filter on that message
                if (tag.Message != null)
                {
                    ReceivePacketForm ReceivePacketForm = new ReceivePacketForm()
                    {
                        MdiParent = this.ParentForm
                    };

                    char[] _trim_hex = new char[] { '0','x' };

                    bool success = Int32.TryParse(tag.Message.id.TrimStart(_trim_hex),NumberStyles.HexNumber,CultureInfo.InvariantCulture,out int messageId);

                    ReceivePacketForm.SetFilter(messageId,messageId);
                    ReceivePacketForm.Show();
                }
            }
        }