Exemplo n.º 1
0
        private void RaiseCallReseivedEvent(PhoneCall call)
        {
            var handler = CallReceived;

            if (handler != null)
            {
                handler(call);
            }
        }
Exemplo n.º 2
0
        public void MakeCall()
        {
            string    number   = GenerateNumber(AllContacts.ContactList);
            bool      incoming = GenerateIncoming();
            Contact   contact  = DetectContact(number, AllContacts.ContactList);
            PhoneCall call     = new PhoneCall(number, incoming, contact);

            RaiseCallReseivedEvent(call);
        }
Exemplo n.º 3
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (ReferenceEquals(obj, this))
            {
                return(true);
            }
            if (obj.GetType() != this.GetType())
            {
                return(false);
            }
            PhoneCall phc = obj as PhoneCall;

            return(this.CallNumber == phc.CallNumber && this.Incoming == phc.Incoming);
        }
Exemplo n.º 4
0
 public void Remove(PhoneCall call)
 {
     CallList.Remove(call);
     CallList.Sort(new CallsComparer());
     CallRemoved(call);
 }
Exemplo n.º 5
0
 public void Add(PhoneCall call)
 {
     CallList.Add(call);
     CallList.Sort(new CallsComparer());
     CallAdded(call);
 }