我写了这段代码来接收短信。但是如果有些短信一起接收,它就无法显示所有短信。我怎样才能阅读所有的短信?
private GSMModem oGsmModem
{
get { return withEventsField_oGsmModem; }
set
{
if (withEventsField_oGsmModem != null)
{
withEventsField_oGsmModem.NewMessageReceived -= oGsmModem_NewMessageReceived;
}
withEventsField_oGsmModem = value;
if (withEventsField_oGsmModem != null)
{
withEventsField_oGsmModem.NewMessageReceived += oGsmModem_NewMessageReceived;
}
}
}
private void oGsmModem_NewMessageReceived(ATSMS.NewMessageReceivedEventArgs e)
{
txtMsg.Text = "Message from " + e.MSISDN + ". Message - " + e.TextMessage ;
}
答案 0 :(得分:0)
您使用的是来自sourceforge的SMS AT Communication Library
请参阅oGsmModem对象的MessageStore属性以获取所有消息。 提示:使用刷新从调制解调器重新加载。