public static void SmsAlarm(string number) { //var skype = new SKYPE4COMLib.Skype(); //skype.Timeout = 120 * 1000; if (number.Length == 10) { number = "+90" + number; } else if (number.Length == 11) { number = "+9" + number; } //var smsType = SKYPE4COMLib.TSmsMessageType.smsMessageTypeOutgoing; //var message = skype.CreateSms(smsType, number); //message.Body = "Acil Durum:Evimde birileri var"; //message.Send(); AlertRequest request = new AlertRequest(); request.AlarmNumber = number; request.AlarmParameter = string.Empty; request.AlarmType = "SmsAlarm"; request.IsAlerted = false; request.Insert(); }
public static void PanicSms(string number, string adres) { //var skype = new SKYPE4COMLib.Skype(); //skype.Timeout = 120 * 1000; if (number.Length == 10) { number = "+90" + number; } else if (number.Length == 11) { number = "+9" + number; } //var smsType = SKYPE4COMLib.TSmsMessageType.smsMessageTypeOutgoing; //var message = skype.CreateSms(smsType, number); //message.Body = "Acil Durum! Güvende olmadığımı hissediyorum.Konum:"+adres; //message.Send(); AlertRequest request = new AlertRequest(); request.AlarmNumber = number; request.AlarmParameter = adres; request.AlarmType = "PanicSms"; request.IsAlerted = false; request.Insert(); }
public static void CallAlarm(string number) { //Skype skype; //skype = new SKYPE4COMLib.Skype(); if (number.Length == 10) { number = "+90" + number; } else if (number.Length == 11) { number = "+9" + number; } AlertRequest request = new AlertRequest(); request.AlarmNumber = number; request.AlarmParameter = string.Empty; request.AlarmType = "CallAlarm"; request.IsAlerted = false; request.Insert(); //Call call = skype.PlaceCall(number); }