Exemplo n.º 1
0
        private void MSMManage_Load(object sender, EventArgs e)
        {
            api = new SMSAPI();
            api.ReceiveMessage += api_ReceiveMessage;
            api.ReceiveCallId  += api_ReceiveCallId;
            Thread th = new Thread(() => {
                ms = new MSMListener();
                //ms.Start(Test);//客户端发送消息后展示到窗体上
                ms.Start(api.SendCNSM);
            });

            th.TrySetApartmentState(ApartmentState.STA);
            th.Start();
        }