/// <summary>
 /// 初始化行情组件
 /// </summary>
 void InitRealtimeMarketComponent()
 {
     //登陆处理
     GTASocketSingletonForRealTime.StartLogin("rtuser", "11", ShowConnectMessage);
     //数据接受注册事件
     this.FEvent  += Event;
     SocketService = GTASocketSingletonForRealTime.SocketService;
     GTASocketSingletonForRealTime.SocketStateChanged += GTASocketSingleton_SocketStateChanged;
     //  SocketService.AddEventDelegate(this.FEvent);
     GTASocketSingletonForRealTime.SocketStatusHandle(SocketStatusChange);
     IRealtimeMarketService rms = RealtimeMarketServiceFactory.GetService();
 }
Esempio 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();
        }