Ejemplo n.º 1
0
        /// <summary>
        /// 初始化行情组件
        /// </summary>
        private void InitRealtimeMarketComponent()
        {
            //登陆处理

            GTASocketSingletonForRealTime.StartLogin("Apex", "Apex", ShowConnectMessage);
            //数据接受注册事件
            this.FEvent  += Event;
            SocketService = GTASocketSingletonForRealTime.SocketService;
            GTASocketSingletonForRealTime.SocketStateChanged += GTASocketSingleton_SocketStateChanged;
            SocketService.AddEventDelegate(this.FEvent);
            GTASocketSingletonForRealTime.SocketStatusHandle(SocketStatusChange);
            IRealtimeMarketService rms = RealtimeMarketServiceFactory.GetService();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 初始化行情组件1
        /// </summary>
        private void InitRealtimeMarketComponent1()
        {
            //登陆处理
            //string username = "******";
            //string password = "******";
            string username = Utils.GetRealTimeUserName();
            string password = Utils.GetRealTimePassword();

            GTASocketSingletonForRealTime.StartLogin(username, password, ShowConnectMessage);
            //数据接受注册事件
            this.FEvent  += Event;
            SocketService = GTASocketSingletonForRealTime.SocketService;
            GTASocketSingletonForRealTime.SocketStateChanged += GTASocketSingleton_SocketStateChanged;
            SocketService.AddEventDelegate(this.FEvent);
            GTASocketSingletonForRealTime.SocketStatusHandle(SocketStatusChange);
            IRealtimeMarketService rms = RealtimeMarketServiceFactory.GetService();
        }