Beispiel #1
0
 public bool UnregisterReciever(ITimeEventReciever rcv)
 {
     if (rcv != null && _eventReceiverList.FindIndex(item => item.recv == rcv) == -1)
     {
         return(false);
     }
     _eventReceiverList.RemoveAll(item => item.recv == rcv);
     return(true);
 }
Beispiel #2
0
 public bool RegisterNewReciever(ITimeEventReciever rcv, bool songEvents = true, bool userEvents = true)
 {
     if (rcv != null && _eventReceiverList.FindIndex(item => item.recv == rcv) != -1)
     {
         return(false);
     }
     _eventReceiverList.Add(new EventRecievers(rcv, songEvents, userEvents));
     return(true);
 }
Beispiel #3
0
 public EventRecievers(ITimeEventReciever receiver, bool songEvent, bool userEvent)
 {
     recv       = receiver;
     songEvents = songEvent;
     userEvents = userEvent;
 }
Beispiel #4
0
 public EventRecievers(ITimeEventReciever receiver, bool songEvent, bool userEvent)
 {
     recv = receiver;
     songEvents = songEvent;
     userEvents = userEvent;
 }
Beispiel #5
0
 public bool UnregisterReciever(ITimeEventReciever rcv)
 {
     if (rcv != null && _eventReceiverList.FindIndex(item => item.recv == rcv) == -1)
         return false;
     _eventReceiverList.RemoveAll(item => item.recv == rcv);
     return true;
 }
Beispiel #6
0
 public bool RegisterNewReciever(ITimeEventReciever rcv, bool songEvents = true, bool userEvents = true)
 {
     if (rcv != null && _eventReceiverList.FindIndex(item => item.recv == rcv) != -1)
         return false;
     _eventReceiverList.Add(new EventRecievers(rcv, songEvents, userEvents));
     return true;
 }