Ejemplo n.º 1
0
 private void HandleTheCall(object sender, CallEventArgs e)
 {
     Console.WriteLine("I am the Call Handler, handling this call by;");
     Console.WriteLine("-ringing music");
     Console.WriteLine("-vibrate");
     Console.WriteLine("-show caller information on the scree");
 }
Ejemplo n.º 2
0
 public void NewCallHappened(string username, DateTime time, string usernumber)
 {
     // create event data
     CallEventArgs eventData = new CallEventArgs(username, time, usernumber);
     // raise the event
     OnNewCallEvent(eventData);
 }
 private void AddNewCallLog(Object sender, CallEventArgs e)
 {
     Console.WriteLine("I am CallsLog and handling this call by adding logs to the following data:");
     Console.WriteLine("Name: {0}", e.CallerName);
     Console.WriteLine("Call Time: {0}", e.CallStartTime);
     Console.WriteLine("Number: {0}", e.CallerNumber);
 }
Ejemplo n.º 4
0
 protected virtual void OnNewCallEvent(CallEventArgs e)
 {
     // make a copy of the event to make sure we don't call on null
     EventHandler<CallEventArgs> temp = System.Threading.Volatile.Read(ref NewCallEvent);
     if (temp != null)
         temp(this, e);
 }