コード例 #1
0
        private void MessageDisplay(QuickFix.Message msg, SessionID sessionID, MessageDisplayer msgDisplayer)
        {
            if (msgDisplayer == MessageDisplayer.Sender)
            {
                DataContainer.form1.AppendSenderBox($@"=================={msg.GetType()}==================");
                DataContainer.form1.AppendSenderBox("@" + sessionID.ToString());
                var msgLst       = msg.ToList();
                var msgHeaderLst = msg.Header.ToList();

                foreach (var item in msgHeaderLst)
                {
                    DataContainer.form1.AppendSenderBox(Fix44XmlParser.getFieldName(item.Key.ToString()) + @": " + Fix44XmlParser.getFieldValueName(item.Key.ToString(), item.Value.ToString()));
                }
                foreach (var item in msgLst)
                {
                    DataContainer.form1.AppendSenderBox(Fix44XmlParser.getFieldName(item.Key.ToString()) + @": " + Fix44XmlParser.getFieldValueName(item.Key.ToString(), item.Value.ToString()));
                }
            }
            else if (msgDisplayer == MessageDisplayer.Receiver)
            {
                DataContainer.form1.AppendReceiverBox($@"=================={msg.GetType()}==================");
                DataContainer.form1.AppendReceiverBox("@" + sessionID.ToString());
                var msgLst       = msg.ToList();
                var msgHeaderLst = msg.Header.ToList();

                foreach (var item in msgHeaderLst)
                {
                    DataContainer.form1.AppendReceiverBox(Fix44XmlParser.getFieldName(item.Key.ToString()) + @": " + Fix44XmlParser.getFieldValueName(item.Key.ToString(), item.Value.ToString()));
                }
                foreach (var item in msgLst)
                {
                    DataContainer.form1.AppendReceiverBox(Fix44XmlParser.getFieldName(item.Key.ToString()) + @": " + Fix44XmlParser.getFieldValueName(item.Key.ToString(), item.Value.ToString()));
                }
            }
        }