public MsmqGatewayMultiTestApplication()
 {
     InitializeComponent();
     this.mq = null;
     this.rmsg = null;
     this.receivedMessages = new Dictionary<string, ReceivedMessage>();
 }
        private void listViewReceivedMessages_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (listViewReceivedMessages.SelectedItems.Count > 0)
                {
                    ListViewItem selected = (ListViewItem)listViewReceivedMessages.SelectedItems[0];
                    string messageId = selected.Text;
                    ReceivedMessage message = receivedMessages[messageId];

                    this.rtxtBody.Text = HexUtils.FullHexFormat(message.Body);
                    this.rmsg = message;
                    //txtReceiveMessageXml.Text = XmlUtils.FormatXml(message.Body);
                }
            }
            catch (Exception)
            {
            }
        }