/// <summary> /// /// </summary> /// <param name="args"></param> public SMSEnity(SMSEventArgs args) { //TODO: _center = args.SmsInfo.Center; _number = args.SmsInfo.Number; _dateTime = args.SmsInfo.TimeStamp; _message = args.SmsInfo.Message; }
public void InvokeOnRecieved(SMSEventArgs args) { OnRecievedHandler handler = OnRecieved; if (handler != null) { handler(this, args); } }
/// <summary> /// modem received event. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void _gsmModem_OnRecieved(object sender, SMSEventArgs e) { SMSSendInfo smsInfo = new SMSSendInfo(); GsmModem gsmModem = sender as GsmModem; if (gsmModem != null) { smsInfo.Com = gsmModem.Name; smsInfo.Phone = e.SmsInfo.Number; smsInfo.Message = e.SmsInfo.Message; ReceiveEventArgs args = new ReceiveEventArgs(); args.SmsInfo = smsInfo; OnReceived(args); } }
public void InvokeOnRecieved(SMSEventArgs args) { OnRecievedHandler handler = OnRecieved; if (handler != null) handler(this, args); }