短信发送申请 [英] sms sending application

查看:451
本文介绍了短信发送申请的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在哪里使用dis代码

public static Int16 Comm_Port = 0;
       public static Int32 Comm_BaudRate = 0;
       public static Int32 Comm_TimeOut = 0;
       public static GsmCommMain comm;
   }



请帮忙......

i已包含命名空间中的所有gsm comm lib






please help...
i had included all the gsm comm lib in namespace


private void button1_Click(object sender, EventArgs e)
        {
            GsmCommMain comm = new GsmCommMain("COM4", 19200, 300);

            try
            {
                comm.Open();

                string CELL_Number, SMS_Message;

                SmsSubmitPdu pdu1;
            
                if (comm.IsConnected() == true)
                {
                    if (number.Text.ToString() == "")
                    {
                        MessageBox.Show("Kindly Add Cell Number\r\n\nFor Example\n\n+9231234567", "Information", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        return;
                    }
                    else if (message.Text.ToString() == "")
                    {
                        MessageBox.Show("Kindly Add Your Message Text", "Information", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        return;
                    }

                    CELL_Number = number.Text.ToString();
                    SMS_Message = message.Text.ToString();

                    MessageBox.Show("Kindly Re-Check Your SMS & CELL NUMBER \r\n\nCELL # : " + CELL_Number + "\r\n\nMESSAGE TEXT : " + SMS_Message, "SMS INFO", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);

                        Cursor.Current = Cursors.WaitCursor;

                        pdu1 = new SmsSubmitPdu(SMS_Message, CELL_Number, "");

                        comm.SendMessage(pdu1);

                        Cursor.Current = Cursors.Default;

                        MessageBox.Show("M E S S A G E - S E N T", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        comm.Close();
                }
            }

                    catch (Exception )
                    {
                        MessageBox.Show("Error Sending SMS To Destination Address\r\n\n Connection Has Been Terminated !!!\r\n\n", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        
                    }
                }
            }
           
        }



plz帮我发送消息。 ..

调制解调器显示消息框后连接...

发送按钮显示错误plz help。


plz help me in sending message...
after the modem shows message box connected ...
the send button showing error plz help.

推荐答案

这看起来非常类似于此代码项目文章 [< a href =http://www.codeproject.com/script/Articles/ViewDownloads.aspx?aid=325731target =_ blanktitle =New Window> ^ ]

如果您仔细阅读文章并浏览提供的代码(请参阅文章左上角的浏览代码链接),那么您的问题将得到全面解答
This looks remarkably similar to a code segment from this code project article[^]
If you read the article carefully and browse the code that is supplied (see the Browse Code link at the top left of the article) then your question will be answered in full


这篇关于短信发送申请的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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