/// <summary>
        /// Upon the application form loading, setup the TTGate and TTOrderSet objects.
        /// </summary>
        public frmServerMode()
        {
            // Required for Windows Form Designer support
            InitializeComponent();

            // Instantiate the TTGate.
            m_TTGate = new XTAPI.TTGateClass();

            // Enable Server Mode (X_TRADER does not need to be running).
            m_TTGate.EnableServerMode();

            // Instantiate the TTOrderSet object.
            m_TTOrderSet = new XTAPI.TTOrderSetClass();

            // Set normal level of detail in our order status events
            m_TTOrderSet.OrderStatusNotifyMode = XTAPI.enumOrderStatusNotifyMode.ORD_NOTIFY_NORMAL;

            // Subscribe to OrderSet events (for all available events, see the OrderUpdate sample)
            m_TTOrderSet.OnOrderSubmitted += new XTAPI._ITTOrderSetEvents_OnOrderSubmittedEventHandler(m_TTOrderSet_OnOrderSubmitted);
            m_TTOrderSet.OnOrderUpdated += new XTAPI._ITTOrderSetEvents_OnOrderUpdatedEventHandler(m_TTOrderSet_OnOrderUpdated);
            m_TTOrderSet.OnOrderDeleted += new XTAPI._ITTOrderSetEvents_OnOrderDeletedEventHandler(m_TTOrderSet_OnOrderDeleted);
            m_TTOrderSet.OnOrderFilled += new XTAPI._ITTOrderSetEvents_OnOrderFilledEventHandler(m_TTOrderSet_OnOrderFilled);

            txtOrderAuditTrail.Text = "Order State:   Acct, OrdStatus, OrdAction, Contract$, BuySell, OrderQty, Price, SiteOrderKey, OrderNo\r\n\r\n";
        }