Exemple #1
0
 public void SendSms(string phone, string message)
 {
     SmsEventArgs e = new SmsEventArgs();
     e.Message = message;
     e.ToPhone = phone;
     OnSmsEvent(e);
 }
Exemple #2
0
        protected virtual void OnSmsEvent(SmsEventArgs e)
        {
            //EventHandler<SmsEventArgs> handler = this.SmsEvent;
            //if (handler != null)
            //{
            //    handler(this, e);
            //}

            this.SmsEvent(this, e);
        }
Exemple #3
0
 void sms_SmsEvent(object sender, SmsEventArgs e)
 {
     Console.WriteLine(e.ToPhone + ":" + e.Message);
 }