Exemplo n.º 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            // 创建客户端
            TlqGetMsgApi getClient = TlqClientFactory.createGetMsgClient();
            // 初始化客户端
            var initFlag = getClient.initClient("TlqSdkConfig.xml");

            // 登录
            getClient.login("sysbktobt190815", "20190815");
            // 建立连接
            getClient.openConnection();
            int i = 0;

            while (true)
            {
                try
                {
                    i++;
                    // 获取消息
                    string msg = getClient.getMsg();
                    Console.WriteLine("读取第" + i + "条消息" + msg);
                    Thread.Sleep(10);
                }
                catch (Exception ex)
                {
                    throw;
                }
            }
        }
Exemplo n.º 2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            // 创建客户端
            TlqGetMsgApi getClient = TlqClientFactory.createGetMsgClient();
            // 初始化客户端

            var initFlag = getClient.initClient("TlqSdkConfig.xml");
        }
Exemplo n.º 3
0
        public ActionResult About()
        {
            // 创建客户端
            TlqGetMsgApi getClient = TlqClientFactory.createGetMsgClient();
            // 初始化客户端

            var initFlag = getClient.initClient("TlqSdkConfig.xml");

            ViewBag.Message = "Your application description page.";
            ViewBag.Message = getClient.ToString() + "123123123";
            return(View());
        }