Public Class MyQuickFixApp Inherits MessageCracker : Implements IApplication Dim _session As Session = Nothing Public Sub FromAdmin(message As Message, sessionID As SessionID) Implements IApplication.FromAdmin ClientGUI.RichTextBox1.AppendText("") ClientGUI.RichTextBox1.AppendText("IN (ADMIN): " + message.ToString()) Try Crack(message, sessionID) Catch ex As Exception ClientGUI.RichTextBox1.AppendText("") ClientGUI.RichTextBox1.AppendText("==Cracker exception==") ClientGUI.RichTextBox1.AppendText(ex.ToString()) ClientGUI.RichTextBox1.AppendText(ex.StackTrace) End Try End Sub Public Sub FromApp(message As Message, sessionID As SessionID) Implements IApplication.FromApp ClientGUI.RichTextBox1.AppendText("") ClientGUI.RichTextBox1.AppendText("IN (APP): " + message.ToString()) Try Crack(message, sessionID) Catch ex As Exception ClientGUI.RichTextBox1.AppendText("") ClientGUI.RichTextBox1.AppendText("==Cracker exception==") ClientGUI.RichTextBox1.AppendText(ex.ToString()) ClientGUI.RichTextBox1.AppendText(ex.StackTrace) End Try End Sub Public Sub ToApp(message As Message, sessionId As SessionID) Implements IApplication.ToApp Try Dim possDupFlag As Boolean = False If (message.Header.IsSetField(Tags.PossDupFlag)) Then possDupFlag = Converters.BoolConverter.Convert(message.Header.GetField(Tags.PossDupFlag)) End If If (possDupFlag) Then Throw New DoNotSend() End If Catch ex As FieldNotFoundException ClientGUI.RichTextBox1.AppendText("OUT (APP): " + message.ToString()) End Try End Sub Public Sub OnCreate(sessionID As SessionID) Implements IApplication.OnCreate '_session = Session.LookupSession(sessionID) ClientGUI.RichTextBox1.AppendText("Session created - " + sessionID.ToString()) End Sub Public Sub OnLogon(sessionID As SessionID) Implements IApplication.OnLogon ClientGUI.RichTextBox1.AppendText("Logon - " + sessionID.ToString()) ClientGUI.ToolStripDropDownButton1.Text = "Connected" ClientGUI.ToolStripDropDownButton1.Image = My.Resources.Connected 'MsgBox("onlogon") End Sub Public Sub OnLogout(sessionID As SessionID) Implements IApplication.OnLogout ClientGUI.RichTextBox1.AppendText("Logout - " + sessionID.ToString()) ClientGUI.ToolStripDropDownButton1.Text = "Disconnected" ClientGUI.ToolStripDropDownButton1.Image = My.Resources.Disconnected End Sub Public Sub ToAdmin(message As Message, sessionID As SessionID) Implements IApplication.ToAdmin ClientGUI.RichTextBox1.AppendText("OUT (ADMIN): " + message.ToString()) End Sub Public Sub OnMessage(message As FIX42.Heartbeat, sessionID As SessionID) ClientGUI.RichTextBox1.AppendText("HEARTBEAT") End Sub End Class