コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            var message = new OcphSMSLib.Models.SMSMessage {
                DateTime = DateTime.Now, DestinationNumber = textBox1.Text, MessageText = textBox2.Text
            };

            this.modem.SendMessage(message);
        }
コード例 #2
0
 internal SMSMessage GetClone()
 {
     if (this.MemberwiseClone() != null)
     {
         sms = (SMSMessage)this.MemberwiseClone();
     }
     return(sms);
 }
コード例 #3
0
        private void HandleMessage(Inbox inbox)
        {
            var data = inbox.MessageText.Split(' ');

            switch (data[0])
            {
            case "INFO":

                var text = "INFO = Daftar Perintah" + Environment.NewLine +
                           "PINDAH SHIFT2= M       xqinta Pindah Jam";
                var message = new OcphSMSLib.Models.SMSMessage {
                    DateTime = DateTime.Now, DestinationNumber = inbox.SenderNumber, MessageText = text
                };
                this.modem.SendMessage(message);
                break;

            default:
                break;
            }
        }