Ejemplo n.º 1
0
        static void loadEventHandlers()
        {
            onNewFormDataEvent  += new NewStringDataHandler(ShowStatus);
            onNewSecurityEvent  += new NewStringDataHandler(ShowStatus);
            onNewTimeframeEvent += new NewStringDataHandler(ShowStatus);
            onNewStatusEvent    += new NewBoolDataHandler(ConnectionStatusReflect);
            onPositionSuscriber += new PositionDelegate(setTakingClosingPosition);

            bConnected  = false;
            bConnecting = false;
        }
Ejemplo n.º 2
0
        public static void ConnectorSetCallback(NewStringDataHandler new_form_data
                                                , NewStringDataHandler new_security
                                                , NewStringDataHandler new_timeframe
                                                , NewBoolDataHandler new_status)
        {
            if (!SetCallback(myCallbackDelegate))
            {
                throw (new Exception(EX_SETTING_CALLBACK));
            }

            TXmlConnector.send_new_form_data = new_form_data;
            TXmlConnector.send_new_security  = new_security;
            TXmlConnector.send_new_timeframe = new_timeframe;
            TXmlConnector.send_new_status    = new_status;
        }