在Windows应用程序中读取消息 [英] read message in windows application

查看:104
本文介绍了在Windows应用程序中读取消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要使用(at命令)在c#windows应用程序中从手机中读取消息的完整语法。



这是起始代码,请填写完成我,如果可以的话:

 SerialPort port =  new  SerialPort(); 
if (sp.IsOpen)
{
sp.Close();
}

sp.PortName = COM14;
sp.BaudRate = 9600 ;
sp.Parity = Parity.None;
sp.DataBits = 8 ;
sp.StopBits = StopBits.One;
sp.Handshake = Handshake.XOnXOff;
sp.DtrEnable = true ;
sp.RtsEnable = true ;


sp.Open();

if (!sp.IsOpen)
{
MessageBox.Show( 未打开串口);
return ;
}

解决方案

这是一篇很好的文章,供您阅读作为入门者以获得基本想法:如何使用计算机/ PC接收短信? [ ^ ]

示例线程为您提供示例代码:使用AT命令接收短信 [ ^ ]



祝你好运,

OI


对不起,但我试图使用它,但我不知道如何继续,,,我会告诉你起始代码,如果你能,请完成它给我。





代码块移至问题。[/ EDIT]

亲爱的SoMad

首先,我想感谢你的通知,虽然你似乎很生气。

其次,你有兴趣评论我的写作方式但是你对我的主题没有帮助。



最后再次感谢,如果你对我的问题有很好的帮助,请给我你的帮助。

I want the complete syntax for using (at commands ) to read messages from phone in c# windows application.

Here is the starting code, please complete it to me if you can:

SerialPort port = new SerialPort();
if (sp.IsOpen)
{
    sp.Close();
}

sp.PortName = "COM14";
sp.BaudRate = 9600;
sp.Parity = Parity.None;
sp.DataBits = 8;
sp.StopBits = StopBits.One;
sp.Handshake = Handshake.XOnXOff;
sp.DtrEnable = true;
sp.RtsEnable = true;


sp.Open();

if (!sp.IsOpen)
{
    MessageBox.Show("Serial port is not opened");
    return;
}

解决方案

Here is a good article for you to read as a starter to get the basic idea: How to Receive SMS Messages Using a Computer / PC?[^]
And example thread to give you a sample code: receiving SMS using AT COMMANDS[^]

Good luck,
OI


sorry but i tried to use that but I don''t know how to continue ,,, I will show you the starting code and please complete it to me if you can.


[EDIT]Code block moved to question.[/EDIT]


Dear SoMad
firstly ,I wanna thank you for your notice although you seem angry.
secondly , you interested in commenting on my way of writing but you didn''t help me about my main topic.

finally thanks again and please if you have a good help for my question please give me your help.


这篇关于在Windows应用程序中读取消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆